--- /srv/rebuilderd/tmp/rebuilderd2iDsUE/inputs/libstdc++-13-doc_13.4.0-4_all.deb +++ /srv/rebuilderd/tmp/rebuilderd2iDsUE/out/libstdc++-13-doc_13.4.0-4_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2025-09-10 05:15:11.000000 debian-binary │ --rw-r--r-- 0 0 0 186460 2025-09-10 05:15:11.000000 control.tar.xz │ --rw-r--r-- 0 0 0 10143096 2025-09-10 05:15:11.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 187004 2025-09-10 05:15:11.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 10180796 2025-09-10 05:15:11.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ │ │ │ ├── line order │ │ │ │ @@ -452,70 +452,66 @@ │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00323_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00326.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00326_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00329.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00329.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00329_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00332.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00332.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00332_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00335.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00335_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00338.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00338.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00338_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00341.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00341_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00344.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00344.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00344_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00347.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00347_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00350.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00350_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00353.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00353.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00353_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00356.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00356_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00359.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00359.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00359_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00362.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00362.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00362_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00365.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00365.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00365_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00368.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00368_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00371.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00371.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00371_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00374.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00374.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00374_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00377.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00377_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00380.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00380.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00380_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00383.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00383.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00383_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00386.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00386.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00386_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00389.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00389_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00392.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00392.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00392_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00395.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00395.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00395_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00398.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00398.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00398_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00401.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00401.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00401_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00404.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00404.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00404_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00407.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00407.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00407_source.html │ │ │ │ @@ -534,301 +530,307 @@ │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00422.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00422.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00422_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00425.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00425.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00425_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00428.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00428.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00428_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00431.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00431.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00431_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00434.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00434_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00437.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00437.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00437_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00440.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00440_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00443.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00443.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00443_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00446.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00446.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00446_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00449.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00449_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00452.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00452_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00455.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00455_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00458.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00458_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00461.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00461_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00464.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00464_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00467.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00467.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00467_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00470.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00470.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00470_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00473.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00473.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00473_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00476.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00476.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00476_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00479.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00479.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00479_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00482.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00482.js │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00482_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00485.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00485.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00485_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00488.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00488.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00488_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00491.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00491.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00491_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00497.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00497.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00497_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00500.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00500.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00500_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00503.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00503.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00503_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00506.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00506.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00506_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00509.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00509.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00509_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00512.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00512_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00515.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00515.js │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00515_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00518.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00518.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00518_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00521.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00521_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00524.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00524.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00524_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00527.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00527_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00530.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00530.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00530_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00533.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00533_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00536.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00536.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00536_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00539.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00539.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00539_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00542.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00542.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00542_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00545.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00545_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00548.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00548.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00548_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00551.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00551.js │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00551_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00554.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00554_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00557.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00557.js │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00557_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00560.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00560.js │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00560_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00563.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00563_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00566.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00566.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00566_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00569.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00569.js │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00569_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00572.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00572_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00575.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00575_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00578.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00578_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00581.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00581.js │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00581_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00584.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00584_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00587.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00587.js │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00587_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00590.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00590_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00593.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00593.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00593_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00596.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00596.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00596_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00599.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00599.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00599_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00602.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00602.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00602_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00605.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00605_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00608.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00608.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00608_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00611.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00611.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00611_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00614.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00614.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00614_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00617.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00617.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00617_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00620.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00620.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00620_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00623.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00623.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00623_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00626.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00626_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00629.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00629.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00629_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00632.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00632.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00632_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00635.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00635_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00638.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00638_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00641.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00641_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00644.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00644.js │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00644_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00647.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00647_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00650.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00650.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00650_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00653.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00653.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00653_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00656.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00656.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00656_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00659.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00659.js │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00659_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00662.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00662.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00662_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00665.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00665.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00665_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00668.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00668.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00668_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00671.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00671.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00671_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00674.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00674.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00674_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00677.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00677.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00677_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00680.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00680.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00680_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00683.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00683.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00683_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00686.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00686_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00689.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00689.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00689_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00692.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00692.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00692_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00695.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00695.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00695_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00698.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00698.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00698_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00701.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00701_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00704.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00704.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00704_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00707.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00707.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00707_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00710.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00710.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00710_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00713.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00713.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00713_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00716.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00716.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00716_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00719.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00719_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00722.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00722.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00722_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00725.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00725.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00725_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00728.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00728_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00731.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00731.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00731_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00734.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00734.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00734_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00737.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00737_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00740.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00740_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00743.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00743.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00743_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00746.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00746.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00746_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00749.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00749.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00749_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00752.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00752.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00752_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00755.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00755_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00758.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00758_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00761.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00761.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00761_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00764.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00764.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00764_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00767.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00767_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00770.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00770_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00773.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00773.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00773_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00776.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00776.js │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00776_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00779.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00779_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00782.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00782.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00782_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00785.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00785.js │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00785_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00788.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00788_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00791.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00791.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00791_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00794.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00794_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00797.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00797_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00800.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00800_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00803.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00803_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00806.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00806_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00809.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00809_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00815.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00812.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00812_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00815_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00818.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00818_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00821.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00821_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00824.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00824.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00824_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00827.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00827_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00830.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00830_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00833.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00833_source.html │ │ │ │ @@ -837,30 +839,28 @@ │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00839.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00839_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00842.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00842_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00845.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00845_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00848.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00848.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00848_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00851.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00851_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00854.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00854_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00857.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00857_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00860.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00860.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00860_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00863.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00863_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00866.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00866.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00866_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00869.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00869.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00869_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00872.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00872.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00872_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00875.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00875_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00878.html │ │ │ │ @@ -875,57 +875,57 @@ │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00890.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00890.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00890_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00893.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00893.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00893_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00896.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00896.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00896_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00899.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00899.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00899_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00902.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00902.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00902_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00905.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00905.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00905_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00908.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00908_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00911.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00911.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00911_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00914.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00914.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00914_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00917.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00917.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00917_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00920.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00920.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00920_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00923.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00923.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00923_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00926.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00926.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00926_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00929.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00929.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00929_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00932.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00932.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00932_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00935.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00935.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00935_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00938.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00938.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00938_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00941.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00941.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00941_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00944.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00944.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00944_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00947.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00947_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00950.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00950_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00953.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00953_source.html │ │ │ │ @@ -944,48 +944,48 @@ │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00968.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00968.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00968_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00971.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00971.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00971_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00974.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00974.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00974_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00977.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00977.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00977_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00980.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00980.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00980_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00983.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00983.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00983_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00986.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00986.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00986_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00989.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00989.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00989_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00992.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a00992.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00992_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00995.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00995.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00995_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00998.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a00998.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a00998_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01001.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01001.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01001_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01004.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01004.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01004_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01007.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01007.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01007_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01010.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01010.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01010_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01013.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01013.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01013_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01016.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01016.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01016_source.html │ │ │ │ @@ -998,15 +998,14 @@ │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01025.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01025.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01025_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01028.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01028.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01028_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01031.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01031.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01031_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01034.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01034.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01034_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01037.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01037.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01037_source.html │ │ │ │ @@ -1022,205 +1021,206 @@ │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01049.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01049.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01049_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01052.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01052.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01052_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01055.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01055.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01055_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01058.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01058.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01058_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01061.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01061.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01061_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01064.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01064.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01064_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01067.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01067.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01067_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01070.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01070.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01070_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01073.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01073.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01073_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01076.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01076.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01076_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01079.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01079.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01079_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01082.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01082.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01082_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01085.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01085.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01085_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01088_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01091_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01094.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01094_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01097_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01100_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01103_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01106_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01109_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01112_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01115_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01118_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01124.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01121_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01124_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01127.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01127_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01130.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01130_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01133.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01133_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01136.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01136.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01136_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01139.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01139.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01139_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01142.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01142_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01145.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01145.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01145_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01148.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01148_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01151.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01151.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01151_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01154.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01154.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01154_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01157.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01157_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01160.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01160.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01160_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01163.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01163.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01163_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01166.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01166.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01166_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01169.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01169.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01169_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01172.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01172.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01172_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01175.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01175_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01178.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01178_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01181.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01181.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01181_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01184.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01184.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01184_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01187.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01187.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01187_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01190.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01190.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01190_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01193.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01193.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01193_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01196.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01196_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01199.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01199.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01199_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01202.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01202.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01202_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01205.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01205.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01205_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01208.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01208.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01208_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01211.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01211_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01214.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01214.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01214_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01217.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01217.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01217_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01220.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01220.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01220_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01223.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01223_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01226.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01226.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01226_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01229.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01229.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01229_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01232.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01232.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01232_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01235.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01235.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01235_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01238.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01238_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01241.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01241_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01244.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01244.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01244_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01247.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01247.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01247_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01250.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01250.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01250_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01253.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01253_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01256.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01256.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01256_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01259.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01259.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01259_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01268.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01268.js │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01268_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01289.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01289.js │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01289_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01292.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01292.js │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01292_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01307.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01307_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01265.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01265.js │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01265_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01274.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01274.js │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01274_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01280.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01280_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01298.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01298.js │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01298_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01310.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01310_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01313.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01313.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01313_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01325.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01325.js │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01325_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01331.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01331_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01322.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01322_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01328.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01328.js │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01328_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01334.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01334.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01334_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01337.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01337.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01337_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01340.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01340_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01352.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01352_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01367.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01367_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01385.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01385.js │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01385_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01388.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01388_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01376.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01376.js │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01376_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01391.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01391_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01394.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01394.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01394_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01397.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01397.js │ │ │ │ @@ -1237,46 +1237,46 @@ │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01412.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01412.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01412_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01415.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01415.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01415_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01418.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01418.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01418_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01421.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01421.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01421_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01424.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01424.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01424_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01427.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01427_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01430.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01430.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01430_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01433.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01433.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01433_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01436.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01436.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01436_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01439.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01439.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01439_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01442.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01442.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01442_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01445.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01445.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01445_source.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01451.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01451.js │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01451_source.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01448.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01448.js │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01448_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01454.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01454.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01454_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01457.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01457.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01457_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01460.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01460.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01460_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01463.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01463.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01463_source.html │ │ │ │ @@ -1287,44 +1287,44 @@ │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01469_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01472.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01472_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01475.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01475.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01475_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01478.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01478.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01478_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01481.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01481.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01481_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01484.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01484_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01487.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01487_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01490.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01490_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01493.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01493.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01493_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01496.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01496.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01496_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01499.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01499.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01499_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01502.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01502.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01502_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01505.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01505.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01505_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01508.html │ │ │ │ +usr/share/doc/gcc-13-base/libstdc++/user/a01508.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01508_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01511.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01511_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01514.html │ │ │ │ -usr/share/doc/gcc-13-base/libstdc++/user/a01514.js │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01514_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01517.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01517_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01520.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01520_source.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01523.html │ │ │ │ usr/share/doc/gcc-13-base/libstdc++/user/a01523_source.html ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -193,28 +193,28 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 24047 2025-06-05 16:03:03.000000 ./usr/share/doc/gcc-13-base/libstdc++/manual/using_exceptions.html │ │ │ -rw-r--r-- 0 root (0) root (0) 34008 2025-06-05 16:03:03.000000 ./usr/share/doc/gcc-13-base/libstdc++/manual/using_headers.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11067 2025-06-05 16:03:03.000000 ./usr/share/doc/gcc-13-base/libstdc++/manual/using_macros.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6686 2025-06-05 16:03:03.000000 ./usr/share/doc/gcc-13-base/libstdc++/manual/using_namespaces.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5620 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/manual/utilities.html │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/ │ │ │ -rw-r--r-- 0 root (0) root (0) 2188 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/_formulas.tex.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 2857 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/_formulas_dark.log │ │ │ +-rw-r--r-- 0 root (0) root (0) 2856 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/_formulas_dark.log │ │ │ -rw-r--r-- 0 root (0) root (0) 2203 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/_formulas_dark.tex.gz │ │ │ --rw-r--r-- 0 root (0) root (0) 2799 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00002.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16501 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00002_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2811 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00005.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29536 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00005_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2791 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00002.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13914 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00002_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4127 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00005.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10021 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00005_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2791 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00008.html │ │ │ -rw-r--r-- 0 root (0) root (0) 64578 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00008_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4119 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00011.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9059 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00011_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2791 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00014.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13914 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00014_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4127 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00017.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10021 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00017_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2799 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00011.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16501 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00011_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4119 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00014.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9059 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00014_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2811 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00017.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29536 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00017_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 31307 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00020_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 25538 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00023.html │ │ │ -rw-r--r-- 0 root (0) root (0) 183 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00023.js │ │ │ -rw-r--r-- 0 root (0) root (0) 160603 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00023_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 26070 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00026.html │ │ │ -rw-r--r-- 0 root (0) root (0) 97 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00026.js │ │ │ -rw-r--r-- 0 root (0) root (0) 112801 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00026_source.html │ │ │ @@ -451,912 +451,912 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 12456 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00311_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7543 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00314.html │ │ │ -rw-r--r-- 0 root (0) root (0) 36787 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00314_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4470 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00317.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15324 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00317_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4969 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00320.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15313 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00320_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5684 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00323.html │ │ │ --rw-r--r-- 0 root (0) root (0) 186 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00323.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49316 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00323_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5010 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00326.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12015 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00326_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6748 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00329.html │ │ │ --rw-r--r-- 0 root (0) root (0) 272 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00329.js │ │ │ --rw-r--r-- 0 root (0) root (0) 53459 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00329_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6525 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00332.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9558 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00332_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3970 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00335.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16914 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00335_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7673 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00338.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14772 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00338_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3544 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00341.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11952 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00341_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7533 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00344.html │ │ │ --rw-r--r-- 0 root (0) root (0) 105 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00344.js │ │ │ --rw-r--r-- 0 root (0) root (0) 12985 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00344_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4794 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00347.html │ │ │ --rw-r--r-- 0 root (0) root (0) 172117 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00347_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 173648 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00350.html │ │ │ --rw-r--r-- 0 root (0) root (0) 95486 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00350_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3838 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00353.html │ │ │ --rw-r--r-- 0 root (0) root (0) 119483 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00353_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14006 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00356.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37863 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00356_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 125056 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00359.html │ │ │ --rw-r--r-- 0 root (0) root (0) 111904 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00359_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35531 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00362.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 73652 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00323.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3593 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00323.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 307497 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00323_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3838 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00326.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 119483 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00326_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12655 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00329.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 476 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00329.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 80283 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00329_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14541 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00332.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 738 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00332.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 72858 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00332_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5499 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00335.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 122528 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00335_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29340 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00338.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6073 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00338.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 97639 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00338_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18989 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00341.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 136572 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00341_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14006 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00344.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37863 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00344_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4028 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00350.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 46068 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00350_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 49406 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00353.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5907 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00353.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 276570 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00353_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7673 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00356.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14772 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00356_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17849 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00359.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 476 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00359.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 156710 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00359_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 45967 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00362.html │ │ │ -rw-r--r-- 0 root (0) root (0) 177 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00362.js │ │ │ --rw-r--r-- 0 root (0) root (0) 435155 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00362_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 45967 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00365.html │ │ │ --rw-r--r-- 0 root (0) root (0) 177 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00365.js │ │ │ --rw-r--r-- 0 root (0) root (0) 507947 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00365_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4028 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00368.html │ │ │ --rw-r--r-- 0 root (0) root (0) 46068 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00368_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5955 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00371.html │ │ │ --rw-r--r-- 0 root (0) root (0) 170 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00371.js │ │ │ --rw-r--r-- 0 root (0) root (0) 25202 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00371_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5883 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00374.html │ │ │ --rw-r--r-- 0 root (0) root (0) 319 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00374.js │ │ │ --rw-r--r-- 0 root (0) root (0) 20289 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00374_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6928 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00377.html │ │ │ --rw-r--r-- 0 root (0) root (0) 34176 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00377_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11864 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00380.html │ │ │ --rw-r--r-- 0 root (0) root (0) 104181 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00380_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4379 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00383.html │ │ │ --rw-r--r-- 0 root (0) root (0) 56504 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00383_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19115 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00386.html │ │ │ --rw-r--r-- 0 root (0) root (0) 612 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00386.js │ │ │ --rw-r--r-- 0 root (0) root (0) 395955 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00386_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11063 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00389.html │ │ │ --rw-r--r-- 0 root (0) root (0) 389559 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00389_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7534 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00392.html │ │ │ --rw-r--r-- 0 root (0) root (0) 277 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00392.js │ │ │ --rw-r--r-- 0 root (0) root (0) 55031 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00392_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12655 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00395.html │ │ │ --rw-r--r-- 0 root (0) root (0) 476 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00395.js │ │ │ --rw-r--r-- 0 root (0) root (0) 80283 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00395_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17200 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00398.html │ │ │ --rw-r--r-- 0 root (0) root (0) 547 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00398.js │ │ │ --rw-r--r-- 0 root (0) root (0) 239962 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00398_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17849 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00401.html │ │ │ --rw-r--r-- 0 root (0) root (0) 476 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00401.js │ │ │ --rw-r--r-- 0 root (0) root (0) 156710 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00401_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17335 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00404.html │ │ │ --rw-r--r-- 0 root (0) root (0) 547 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00404.js │ │ │ --rw-r--r-- 0 root (0) root (0) 228606 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00404_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17947 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00407.html │ │ │ --rw-r--r-- 0 root (0) root (0) 547 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00407.js │ │ │ --rw-r--r-- 0 root (0) root (0) 261562 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00407_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19132 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00410.html │ │ │ --rw-r--r-- 0 root (0) root (0) 547 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00410.js │ │ │ --rw-r--r-- 0 root (0) root (0) 338653 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00410_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15854 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00413.html │ │ │ --rw-r--r-- 0 root (0) root (0) 917 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00413.js │ │ │ --rw-r--r-- 0 root (0) root (0) 414713 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00413_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14537 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00416.html │ │ │ --rw-r--r-- 0 root (0) root (0) 781 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00416.js │ │ │ --rw-r--r-- 0 root (0) root (0) 444983 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00416_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8689 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00419.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00419.js │ │ │ --rw-r--r-- 0 root (0) root (0) 280927 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00419_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6005 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00422.html │ │ │ --rw-r--r-- 0 root (0) root (0) 209 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00422.js │ │ │ --rw-r--r-- 0 root (0) root (0) 66558 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00422_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6719 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00425.html │ │ │ --rw-r--r-- 0 root (0) root (0) 251 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00425.js │ │ │ --rw-r--r-- 0 root (0) root (0) 45892 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00425_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10323 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00428.html │ │ │ --rw-r--r-- 0 root (0) root (0) 284 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00428.js │ │ │ --rw-r--r-- 0 root (0) root (0) 147262 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00428_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6609 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00431.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27536 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00431_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4803 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00434.html │ │ │ --rw-r--r-- 0 root (0) root (0) 64245 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00434_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 49406 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00437.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5907 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00437.js │ │ │ --rw-r--r-- 0 root (0) root (0) 276570 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00437_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4293 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00440.html │ │ │ --rw-r--r-- 0 root (0) root (0) 66764 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00440_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28964 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00443.html │ │ │ --rw-r--r-- 0 root (0) root (0) 485 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00443.js │ │ │ --rw-r--r-- 0 root (0) root (0) 359001 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00443_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36051 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00446.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2024 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00446.js │ │ │ --rw-r--r-- 0 root (0) root (0) 141335 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00446_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4236 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00452.html │ │ │ --rw-r--r-- 0 root (0) root (0) 45162 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00452_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3029 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00455.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8478 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00455_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3839 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00458.html │ │ │ --rw-r--r-- 0 root (0) root (0) 93448 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00458_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4371 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00461.html │ │ │ --rw-r--r-- 0 root (0) root (0) 56561 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00461_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5564 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00464.html │ │ │ --rw-r--r-- 0 root (0) root (0) 96074 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00464_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4666 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00467.html │ │ │ --rw-r--r-- 0 root (0) root (0) 99461 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00467_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3843 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00470.html │ │ │ --rw-r--r-- 0 root (0) root (0) 43795 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00470_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8829 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00473.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1714 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00473.js │ │ │ --rw-r--r-- 0 root (0) root (0) 63568 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00473_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3835 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00476.html │ │ │ --rw-r--r-- 0 root (0) root (0) 89382 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00476_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4335 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00479.html │ │ │ --rw-r--r-- 0 root (0) root (0) 47732 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00479_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12317 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00482.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2872 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00482.js │ │ │ --rw-r--r-- 0 root (0) root (0) 41543 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00482_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29340 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00485.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6073 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00485.js │ │ │ --rw-r--r-- 0 root (0) root (0) 97639 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00485_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5499 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00488.html │ │ │ --rw-r--r-- 0 root (0) root (0) 122528 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00488_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 51413 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00491.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2434 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00491.js │ │ │ --rw-r--r-- 0 root (0) root (0) 666908 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00491_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 42654 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00497.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3355 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00497.js │ │ │ --rw-r--r-- 0 root (0) root (0) 1278459 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00497_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7791 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00500.html │ │ │ --rw-r--r-- 0 root (0) root (0) 328 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00500.js │ │ │ --rw-r--r-- 0 root (0) root (0) 36054 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00500_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9048 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00503.html │ │ │ --rw-r--r-- 0 root (0) root (0) 614 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00503.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49403 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00503_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3541 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00506.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25492 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00506_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5944 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00509.html │ │ │ --rw-r--r-- 0 root (0) root (0) 93 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00509.js │ │ │ --rw-r--r-- 0 root (0) root (0) 92780 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00509_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6316 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00512.html │ │ │ --rw-r--r-- 0 root (0) root (0) 75816 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00512_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3044 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00518.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36838 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00518_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7454 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00521.html │ │ │ --rw-r--r-- 0 root (0) root (0) 54439 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00521_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9358 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00524.html │ │ │ --rw-r--r-- 0 root (0) root (0) 111 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00524.js │ │ │ --rw-r--r-- 0 root (0) root (0) 113695 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00524_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4023 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00527.html │ │ │ --rw-r--r-- 0 root (0) root (0) 51116 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00527_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15131 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00530.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1207 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00530.js │ │ │ --rw-r--r-- 0 root (0) root (0) 44458 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00530_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4898 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00533.html │ │ │ --rw-r--r-- 0 root (0) root (0) 357831 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00533_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7532 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00536.html │ │ │ --rw-r--r-- 0 root (0) root (0) 312 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00536.js │ │ │ --rw-r--r-- 0 root (0) root (0) 411541 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00536_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7710 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00539.html │ │ │ --rw-r--r-- 0 root (0) root (0) 254517 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00539_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27105 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00542.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1319 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00542.js │ │ │ --rw-r--r-- 0 root (0) root (0) 584859 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00542_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12563 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00545.html │ │ │ --rw-r--r-- 0 root (0) root (0) 128229 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00545_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7871 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00548.html │ │ │ --rw-r--r-- 0 root (0) root (0) 170 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00548.js │ │ │ --rw-r--r-- 0 root (0) root (0) 70674 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00548_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5136 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00551.html │ │ │ --rw-r--r-- 0 root (0) root (0) 141 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00551.js │ │ │ --rw-r--r-- 0 root (0) root (0) 167978 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00551_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5940 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00554.html │ │ │ --rw-r--r-- 0 root (0) root (0) 125856 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00554_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7664 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00557.html │ │ │ --rw-r--r-- 0 root (0) root (0) 162 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00557.js │ │ │ --rw-r--r-- 0 root (0) root (0) 234570 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00557_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 31398 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00560.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1993 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00560.js │ │ │ --rw-r--r-- 0 root (0) root (0) 233148 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00560_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4043 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00563.html │ │ │ --rw-r--r-- 0 root (0) root (0) 50545 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00563_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3580 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00566.html │ │ │ --rw-r--r-- 0 root (0) root (0) 329553 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00566_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4033 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00572.html │ │ │ --rw-r--r-- 0 root (0) root (0) 51558 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00572_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3990 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00575.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37623 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00575_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4803 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00578.html │ │ │ --rw-r--r-- 0 root (0) root (0) 206944 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00578_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7128 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00593.html │ │ │ --rw-r--r-- 0 root (0) root (0) 93 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00593.js │ │ │ --rw-r--r-- 0 root (0) root (0) 91983 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00593_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16003 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00596.html │ │ │ --rw-r--r-- 0 root (0) root (0) 870 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00596.js │ │ │ --rw-r--r-- 0 root (0) root (0) 306343 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00596_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6300 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00599.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13826 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00599_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29032 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00602.html │ │ │ --rw-r--r-- 0 root (0) root (0) 232565 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00602_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5432 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00605.html │ │ │ --rw-r--r-- 0 root (0) root (0) 751247 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00605_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6136 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00608.html │ │ │ --rw-r--r-- 0 root (0) root (0) 556 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00608.js │ │ │ --rw-r--r-- 0 root (0) root (0) 154140 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00608_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 32320 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00611.html │ │ │ --rw-r--r-- 0 root (0) root (0) 335 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00611.js │ │ │ --rw-r--r-- 0 root (0) root (0) 429063 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00611_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 73652 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00614.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3593 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00614.js │ │ │ --rw-r--r-- 0 root (0) root (0) 307497 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00614_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5419 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00617.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22086 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00617_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8241 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00620.html │ │ │ --rw-r--r-- 0 root (0) root (0) 167 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00620.js │ │ │ --rw-r--r-- 0 root (0) root (0) 180773 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00620_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 58366 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00623.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2699 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00623.js │ │ │ --rw-r--r-- 0 root (0) root (0) 790228 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00623_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4815 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00626.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37125 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00626_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4978 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00629.html │ │ │ --rw-r--r-- 0 root (0) root (0) 108757 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00629_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16094 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00632.html │ │ │ --rw-r--r-- 0 root (0) root (0) 72944 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00632_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16974 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00635.html │ │ │ --rw-r--r-- 0 root (0) root (0) 73506 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00635_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3499 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00638.html │ │ │ --rw-r--r-- 0 root (0) root (0) 62205 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00638_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3536 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00641.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21943 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00641_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17580 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00644.html │ │ │ --rw-r--r-- 0 root (0) root (0) 423 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00644.js │ │ │ --rw-r--r-- 0 root (0) root (0) 48961 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00644_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11413 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00647.html │ │ │ --rw-r--r-- 0 root (0) root (0) 48764 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00647_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36666 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00650_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 24852 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00653.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1414 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00653.js │ │ │ --rw-r--r-- 0 root (0) root (0) 238993 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00653_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4867 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00656.html │ │ │ --rw-r--r-- 0 root (0) root (0) 102 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00656.js │ │ │ --rw-r--r-- 0 root (0) root (0) 87263 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00656_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13629 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00662.html │ │ │ --rw-r--r-- 0 root (0) root (0) 934 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00662.js │ │ │ --rw-r--r-- 0 root (0) root (0) 194334 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00662_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6744 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00665.html │ │ │ --rw-r--r-- 0 root (0) root (0) 323 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00665.js │ │ │ --rw-r--r-- 0 root (0) root (0) 26486 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00665_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4088 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00668.html │ │ │ --rw-r--r-- 0 root (0) root (0) 102 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00668.js │ │ │ --rw-r--r-- 0 root (0) root (0) 25047 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00668_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22212 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00671.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1256 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00671.js │ │ │ --rw-r--r-- 0 root (0) root (0) 227458 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00671_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23754 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00674.html │ │ │ --rw-r--r-- 0 root (0) root (0) 942 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00674.js │ │ │ --rw-r--r-- 0 root (0) root (0) 95767 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00674_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14541 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00677.html │ │ │ --rw-r--r-- 0 root (0) root (0) 738 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00677.js │ │ │ --rw-r--r-- 0 root (0) root (0) 72858 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00677_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9306 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00680.html │ │ │ --rw-r--r-- 0 root (0) root (0) 103 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00680.js │ │ │ --rw-r--r-- 0 root (0) root (0) 54884 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00680_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14157 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00683.html │ │ │ --rw-r--r-- 0 root (0) root (0) 165 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00683.js │ │ │ --rw-r--r-- 0 root (0) root (0) 44403 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00683_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27518 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00689.html │ │ │ --rw-r--r-- 0 root (0) root (0) 310 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00689.js │ │ │ --rw-r--r-- 0 root (0) root (0) 274630 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00689_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11083 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00692.html │ │ │ --rw-r--r-- 0 root (0) root (0) 320 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00692.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49284 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00692_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 119671 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00695.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2070 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00695.js │ │ │ --rw-r--r-- 0 root (0) root (0) 376802 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00695_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 186721 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00698.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10387 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00698.js │ │ │ --rw-r--r-- 0 root (0) root (0) 1024899 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00698_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 507947 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00362_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16003 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00365.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 870 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00365.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 306343 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00365_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4033 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00368.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 51558 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00368_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4379 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00371.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 56504 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00371_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6719 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00374.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 251 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00374.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 45892 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00374_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4803 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00377.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 206944 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00377_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7533 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00380.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 105 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00380.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12985 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00380_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36051 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00383.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2024 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00383.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 141335 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00383_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28964 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00386.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 485 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00386.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 359001 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00386_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4794 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00392.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 172117 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00392_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16094 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00395.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 72944 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00395_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11336 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00398.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15823 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00398_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4803 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00401.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 64245 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00401_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19115 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00404.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 612 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00404.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 395955 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00404_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 42654 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00407.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3355 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00407.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 1278459 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00407_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7871 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00410.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 170 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00410.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 70674 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00410_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4088 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00413.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 102 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00413.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25047 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00413_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15702 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00416.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 622 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00416.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 42649 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00416_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 58366 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00419.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2699 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00419.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 790228 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00419_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15937 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00422.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 847 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00422.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 310647 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00422_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15854 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00425.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 917 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00425.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 414713 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00425_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5419 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00428.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22086 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00428_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17200 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00431.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 547 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00431.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 239962 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00431_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3541 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00434.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25492 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00434_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4236 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00437.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 45162 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00437_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4898 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00440.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 357831 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00440_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7865 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00443.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 263 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00443.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 172757 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00443_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3835 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00446.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 89382 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00446_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 173648 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00449.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 95486 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00449_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7454 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00452.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 54439 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00452_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 125056 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00455.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 111904 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00455_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4666 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00461.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 99461 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00461_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6316 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00464.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 75816 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00464_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7128 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00467.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 93 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00467.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 91983 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00467_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10367 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00470.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00470.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 54859 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00470_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3520 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00473.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16209 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00473_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8829 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00476.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1714 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00476.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 63568 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00476_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8689 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00479.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00479.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 280927 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00479_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13629 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00485.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 934 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00485.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 194334 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00485_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5883 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00488.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 319 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00488.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 20289 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00488_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22212 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00491.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1256 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00491.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 227458 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00491_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 38455 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00497.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 111705 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00497_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 66356 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00500.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 905 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00500.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 183670 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00500_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4293 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00503.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 66764 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00503_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31398 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00506.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1993 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00506.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 233148 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00506_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3990 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00509.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37623 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00509_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6609 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00512.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27536 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00512_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23754 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00515.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 942 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00515.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 95767 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00515_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27518 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00518.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 310 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00518.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 274630 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00518_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6386 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00524.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 171 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00524.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24473 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00524_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3970 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00527.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16914 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00527_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35531 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00530.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 177 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00530.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 435155 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00530_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3020 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00533.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8434 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00533_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4371 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00536.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 56561 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00536_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25568 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00539.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 864 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00539.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 181114 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00539_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6988 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00542.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 47139 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00542_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29032 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00545.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 232565 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00545_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5944 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00548.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 93 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00548.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 92780 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00548_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7710 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00563.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 254517 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00563_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5684 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00566.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 186 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00566.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49316 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00566_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9306 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00569.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 103 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00569.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 54884 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00569_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11063 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00572.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 389559 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00572_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6928 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00575.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 34176 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00575_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4815 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00578.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37125 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00578_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11967 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00581.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 251 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00581.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 51710 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00581_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36133 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00584.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 57920 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00584_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5136 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00587.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 141 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00587.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 167978 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00587_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3022 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00590.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 141614 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00590_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4023 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00593.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 51116 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00593_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5564 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00596.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 96074 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00596_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8241 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00599.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 167 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00599.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 180773 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00599_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14537 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00602.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 781 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00602.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 444983 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00602_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13839 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00605.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23848 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00605_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17947 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00608.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 547 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00608.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 261562 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00608_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9048 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00611.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 614 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00611.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49403 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00611_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6744 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00614.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 323 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00614.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 26486 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00614_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19132 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00617.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 547 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00617.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 338653 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00617_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4978 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00620.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 108757 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00620_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6136 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00623.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 556 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00623.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 154140 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00623_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3048 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00626.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 97407 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00626_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7532 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00629.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 312 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00629.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 411541 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00629_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 51413 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00632.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2434 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00632.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 666908 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00632_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4335 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00635.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 47732 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00635_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5010 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00638.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12015 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00638_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4043 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00641.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 50545 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00641_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5432 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00647.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 751247 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00647_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6974 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00650.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 392 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00650.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39105 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00650_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28548 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00653.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 163 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00653.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 147403 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00653_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11083 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00656.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 320 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00656.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49284 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00656_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5955 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00659.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 170 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00659.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 25202 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00659_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3499 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00662.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 62205 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00662_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6748 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00665.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 272 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00665.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 53459 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00665_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5662 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00668.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 53672 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00668_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3029 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00671.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8478 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00671_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7791 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00674.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 328 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00674.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 36054 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00674_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27105 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00677.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1319 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00677.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 584859 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00677_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14157 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00680.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 165 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00680.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44403 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00680_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3044 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00683.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36838 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00683_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5851 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00686.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 89927 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00686_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3843 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00689.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 43795 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00689_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6300 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00692.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13826 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00692_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 186721 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00695.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10387 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00695.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 1024899 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00695_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12317 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00698.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2872 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00698.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 41543 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00698_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4935 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00701.html │ │ │ -rw-r--r-- 0 root (0) root (0) 76223 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00701_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28548 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00704.html │ │ │ --rw-r--r-- 0 root (0) root (0) 163 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00704.js │ │ │ --rw-r--r-- 0 root (0) root (0) 147403 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00704_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3048 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00707.html │ │ │ --rw-r--r-- 0 root (0) root (0) 97407 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00707_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6974 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00710.html │ │ │ --rw-r--r-- 0 root (0) root (0) 392 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00710.js │ │ │ --rw-r--r-- 0 root (0) root (0) 39105 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00710_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 66356 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00713.html │ │ │ --rw-r--r-- 0 root (0) root (0) 905 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00713.js │ │ │ --rw-r--r-- 0 root (0) root (0) 183670 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00713_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 38455 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00716.html │ │ │ --rw-r--r-- 0 root (0) root (0) 111705 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00716_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 139871 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00719.html │ │ │ --rw-r--r-- 0 root (0) root (0) 659867 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00719_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 32097 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00722.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2238 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00722.js │ │ │ --rw-r--r-- 0 root (0) root (0) 81089 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00722_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11967 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00725.html │ │ │ --rw-r--r-- 0 root (0) root (0) 251 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00725.js │ │ │ --rw-r--r-- 0 root (0) root (0) 51710 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00725_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6988 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00728.html │ │ │ --rw-r--r-- 0 root (0) root (0) 47139 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00728_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36133 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00731.html │ │ │ --rw-r--r-- 0 root (0) root (0) 57920 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00731_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15702 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00734.html │ │ │ --rw-r--r-- 0 root (0) root (0) 622 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00734.js │ │ │ --rw-r--r-- 0 root (0) root (0) 42649 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00734_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3520 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00737.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16209 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00737_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3022 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00740.html │ │ │ --rw-r--r-- 0 root (0) root (0) 141614 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00740_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25568 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00743.html │ │ │ --rw-r--r-- 0 root (0) root (0) 864 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00743.js │ │ │ --rw-r--r-- 0 root (0) root (0) 181114 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00743_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11767 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00746.html │ │ │ --rw-r--r-- 0 root (0) root (0) 92 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00746.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32310 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00746_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10367 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00749.html │ │ │ --rw-r--r-- 0 root (0) root (0) 77 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00749.js │ │ │ --rw-r--r-- 0 root (0) root (0) 54859 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00749_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13839 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00752.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23848 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00752_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 119671 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00704.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2070 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00704.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 376802 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00704_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11767 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00707.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 92 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00707.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32310 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00707_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17580 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00710.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 423 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00710.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 48961 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00710_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7534 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00713.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 277 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00713.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 55031 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00713_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4867 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00716.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 102 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00716.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 87263 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00716_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3536 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00719.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21943 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00719_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9358 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00722.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 111 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00722.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 113695 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00722_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3544 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00725.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11952 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00725_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11864 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00728.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 104181 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00728_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17335 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00731.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 547 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00731.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 228606 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00731_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 139871 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00734.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 659867 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00734_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3839 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00737.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 93448 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00737_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 36666 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00740_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7664 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00743.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 162 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00743.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 234570 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00743_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5940 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00746.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 125856 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00746_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 32097 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00749.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2238 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00749.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 81089 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00749_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10323 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00752.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 284 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00752.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 147262 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00752_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3539 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00755.html │ │ │ -rw-r--r-- 0 root (0) root (0) 48518 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00755_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5851 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00758.html │ │ │ --rw-r--r-- 0 root (0) root (0) 89927 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00758_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7865 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00761.html │ │ │ --rw-r--r-- 0 root (0) root (0) 263 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00761.js │ │ │ --rw-r--r-- 0 root (0) root (0) 172757 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00761_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11336 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00764.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15823 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00764_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18989 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00767.html │ │ │ --rw-r--r-- 0 root (0) root (0) 136572 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00767_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3020 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00770.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8434 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00770_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15937 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00773.html │ │ │ --rw-r--r-- 0 root (0) root (0) 847 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00773.js │ │ │ --rw-r--r-- 0 root (0) root (0) 310647 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00773_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5662 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00779.html │ │ │ --rw-r--r-- 0 root (0) root (0) 53672 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00779_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6386 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00782.html │ │ │ --rw-r--r-- 0 root (0) root (0) 171 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00782.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24473 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00782_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 128552 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00788_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 128546 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00791_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 43804 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00794_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 26768 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00797_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 337224 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00800.html │ │ │ --rw-r--r-- 0 root (0) root (0) 340702 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00800_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2859 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00803_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3640 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00806.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15799 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00806_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3656 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00809.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29163 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00809_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4324 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00815.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21530 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00815_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7518 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00818.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21411 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00818_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4782 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00821.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11478 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00821_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4566 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00824.html │ │ │ --rw-r--r-- 0 root (0) root (0) 100 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00824.js │ │ │ --rw-r--r-- 0 root (0) root (0) 13383 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00824_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3629 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00827.html │ │ │ --rw-r--r-- 0 root (0) root (0) 24715 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00827_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3632 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00830.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35370 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00830_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3021 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00833.html │ │ │ --rw-r--r-- 0 root (0) root (0) 22003 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00833_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3033 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00836.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13296 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00836_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3021 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00839.html │ │ │ --rw-r--r-- 0 root (0) root (0) 52141 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00839_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6355 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00842.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27936 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00842_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3120 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00845.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7891 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00845_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13873 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00848.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11749 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00848_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6735 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00851.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8869 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00851_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5514 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00854.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16206 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00854_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3640 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00857.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18935 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00857_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4117 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00860.html │ │ │ --rw-r--r-- 0 root (0) root (0) 64 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00860.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14705 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00860_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16974 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00761.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 73506 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00761_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15131 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00764.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1207 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00764.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44458 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00764_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12563 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00767.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 128229 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00767_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11413 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00770.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 48764 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00770_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6525 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00773.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9558 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00773_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6005 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00776.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 209 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00776.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 66558 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00776_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3580 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00779.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 329553 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00779_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 32320 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00782.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 335 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00782.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 429063 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00782_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24852 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00785.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1414 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00785.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 238993 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00785_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3021 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00788.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 22003 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00788_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4117 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00791.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 64 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00791.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14705 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00791_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6355 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00794.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27936 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00794_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3120 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00797.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7891 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00797_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 26768 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00800_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4782 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00803.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11478 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00803_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3033 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00806.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13296 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00806_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 128552 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00809_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3021 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00812.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 52141 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00812_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 43804 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00815_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6735 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00818.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8869 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00818_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3640 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00824.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15799 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00824_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13873 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00827.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11749 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00827_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4324 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00830.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21530 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00830_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5514 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00833.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16206 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00833_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3629 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00836.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24715 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00836_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7518 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00839.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21411 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00839_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3656 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00842.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29163 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00842_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 337224 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00845.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 340702 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00845_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4566 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00848.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 100 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00848.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 13383 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00848_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3640 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00851.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18935 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00851_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3632 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00854.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35370 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00854_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 128546 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00857_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2859 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00860_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4162 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00863.html │ │ │ -rw-r--r-- 0 root (0) root (0) 27344 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00863_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3036 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00866.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12461 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00866_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6122 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00869.html │ │ │ --rw-r--r-- 0 root (0) root (0) 166 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00869.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35733 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00869_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4302 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00872.html │ │ │ --rw-r--r-- 0 root (0) root (0) 74 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00872.js │ │ │ --rw-r--r-- 0 root (0) root (0) 66495 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00872_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4302 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00866.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 74 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00866.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 66495 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00866_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3036 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00869.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12461 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00869_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6122 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00872.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 166 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00872.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35733 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00872_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11126 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00875.html │ │ │ -rw-r--r-- 0 root (0) root (0) 75701 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00875_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11086 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00878.html │ │ │ -rw-r--r-- 0 root (0) root (0) 72461 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00878_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4136 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00881.html │ │ │ -rw-r--r-- 0 root (0) root (0) 31990 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00881_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18848 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00884.html │ │ │ --rw-r--r-- 0 root (0) root (0) 96 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00884.js │ │ │ --rw-r--r-- 0 root (0) root (0) 124905 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00884_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4917 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00887.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19934 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00887_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4044 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00890.html │ │ │ --rw-r--r-- 0 root (0) root (0) 105 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00890.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34608 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00890_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4302 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00893.html │ │ │ --rw-r--r-- 0 root (0) root (0) 171 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00893.js │ │ │ --rw-r--r-- 0 root (0) root (0) 41308 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00893_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4829 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00896.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33841 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00896_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5184 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00899.html │ │ │ --rw-r--r-- 0 root (0) root (0) 381 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00899.js │ │ │ --rw-r--r-- 0 root (0) root (0) 31340 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00899_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4877 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00902.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19369 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00902_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8327 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00905.html │ │ │ --rw-r--r-- 0 root (0) root (0) 190 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00905.js │ │ │ --rw-r--r-- 0 root (0) root (0) 100628 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00905_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28489 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00908.html │ │ │ --rw-r--r-- 0 root (0) root (0) 91545 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00908_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5184 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00884.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 381 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00884.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31340 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00884_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8699 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00887.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 97331 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00887_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4041 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00890.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 138 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00890.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 26250 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00890_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19673 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00893.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 106 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00893.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 131951 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00893_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 70091 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00896.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1364 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00896.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 89411 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00896_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4829 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00899.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33841 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00899_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8327 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00902.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 190 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00902.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 100628 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00902_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4302 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00905.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 171 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00905.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 41308 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00905_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4877 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00908.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19369 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00908_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 16183 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00911.html │ │ │ -rw-r--r-- 0 root (0) root (0) 347 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00911.js │ │ │ -rw-r--r-- 0 root (0) root (0) 200403 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00911_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4041 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00914.html │ │ │ --rw-r--r-- 0 root (0) root (0) 138 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00914.js │ │ │ --rw-r--r-- 0 root (0) root (0) 26250 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00914_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4954 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00917.html │ │ │ --rw-r--r-- 0 root (0) root (0) 241 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00917.js │ │ │ --rw-r--r-- 0 root (0) root (0) 64225 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00917_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18983 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00920.html │ │ │ --rw-r--r-- 0 root (0) root (0) 101 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00920.js │ │ │ --rw-r--r-- 0 root (0) root (0) 123558 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00920_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19673 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00923.html │ │ │ --rw-r--r-- 0 root (0) root (0) 106 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00923.js │ │ │ --rw-r--r-- 0 root (0) root (0) 131951 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00923_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19538 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00926.html │ │ │ --rw-r--r-- 0 root (0) root (0) 101 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00926.js │ │ │ --rw-r--r-- 0 root (0) root (0) 153948 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00926_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 70091 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00929.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1364 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00929.js │ │ │ --rw-r--r-- 0 root (0) root (0) 89411 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00929_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21820 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00932.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1318 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00932.js │ │ │ --rw-r--r-- 0 root (0) root (0) 63282 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00932_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25461 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00935.html │ │ │ --rw-r--r-- 0 root (0) root (0) 196 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00935.js │ │ │ --rw-r--r-- 0 root (0) root (0) 81785 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00935_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8699 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00938.html │ │ │ --rw-r--r-- 0 root (0) root (0) 97331 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00938_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37586 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00941.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27381 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00941_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10640 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00944.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13102 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00944_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10640 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00914.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13102 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00914_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18848 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00917.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 96 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00917.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 124905 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00917_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25461 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00920.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 196 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00920.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 81785 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00920_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4044 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00923.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 105 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00923.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34608 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00923_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4917 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00926.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19934 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00926_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4954 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00929.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 241 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00929.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 64225 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00929_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28489 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00932.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 91545 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00932_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37586 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00935.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27381 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00935_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 18983 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00938.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 101 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00938.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 123558 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00938_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21820 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00941.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1318 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00941.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 63282 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00941_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19538 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00944.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 101 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00944.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 153948 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00944_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5298 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00947.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14654 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00947_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 50444 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00950.html │ │ │ -rw-r--r-- 0 root (0) root (0) 374809 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00950_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14274 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00953.html │ │ │ -rw-r--r-- 0 root (0) root (0) 135249 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00953_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6663 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00956.html │ │ │ --rw-r--r-- 0 root (0) root (0) 203 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00956.js │ │ │ --rw-r--r-- 0 root (0) root (0) 58187 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00956_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5135 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00959.html │ │ │ --rw-r--r-- 0 root (0) root (0) 194 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00959.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34463 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00959_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10552 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00962.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3298 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00962.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34833 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00962_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8894 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00965.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1255 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00965.js │ │ │ --rw-r--r-- 0 root (0) root (0) 44167 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00965_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9694 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00968.html │ │ │ --rw-r--r-- 0 root (0) root (0) 590 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00968.js │ │ │ --rw-r--r-- 0 root (0) root (0) 48961 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00968_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8442 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00971.html │ │ │ --rw-r--r-- 0 root (0) root (0) 172 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00971.js │ │ │ --rw-r--r-- 0 root (0) root (0) 91723 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00971_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8298 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00974.html │ │ │ --rw-r--r-- 0 root (0) root (0) 79321 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00974_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5109 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00977.html │ │ │ --rw-r--r-- 0 root (0) root (0) 181 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00977.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32010 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00977_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9518 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00980.html │ │ │ --rw-r--r-- 0 root (0) root (0) 836 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00980.js │ │ │ --rw-r--r-- 0 root (0) root (0) 114861 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00980_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4035 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00983.html │ │ │ --rw-r--r-- 0 root (0) root (0) 82 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00983.js │ │ │ --rw-r--r-- 0 root (0) root (0) 26180 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00983_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6308 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00986.html │ │ │ --rw-r--r-- 0 root (0) root (0) 286 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00986.js │ │ │ --rw-r--r-- 0 root (0) root (0) 36292 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00986_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5379 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00989.html │ │ │ --rw-r--r-- 0 root (0) root (0) 193 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00989.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35924 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00989_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7300 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00992.html │ │ │ --rw-r--r-- 0 root (0) root (0) 366 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00992.js │ │ │ --rw-r--r-- 0 root (0) root (0) 79607 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00992_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6163 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00995.html │ │ │ --rw-r--r-- 0 root (0) root (0) 299 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00995.js │ │ │ --rw-r--r-- 0 root (0) root (0) 44128 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00995_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3005 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00998.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10443 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00998_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4629 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01001.html │ │ │ --rw-r--r-- 0 root (0) root (0) 119 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01001.js │ │ │ --rw-r--r-- 0 root (0) root (0) 26868 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01001_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4696 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01004.html │ │ │ --rw-r--r-- 0 root (0) root (0) 132 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01004.js │ │ │ --rw-r--r-- 0 root (0) root (0) 22961 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01004_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4638 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01007.html │ │ │ --rw-r--r-- 0 root (0) root (0) 125 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01007.js │ │ │ --rw-r--r-- 0 root (0) root (0) 22831 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01007_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 38827 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01010.html │ │ │ --rw-r--r-- 0 root (0) root (0) 40828 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01010_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7825 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01013.html │ │ │ --rw-r--r-- 0 root (0) root (0) 790 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01013.js │ │ │ --rw-r--r-- 0 root (0) root (0) 98377 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01013_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37409 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01016.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2542 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01016.js │ │ │ --rw-r--r-- 0 root (0) root (0) 354247 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01016_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7825 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01019.html │ │ │ --rw-r--r-- 0 root (0) root (0) 371 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01019.js │ │ │ --rw-r--r-- 0 root (0) root (0) 104271 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01019_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7951 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01022.html │ │ │ --rw-r--r-- 0 root (0) root (0) 455 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01022.js │ │ │ --rw-r--r-- 0 root (0) root (0) 48661 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01022_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8183 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01025.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1311 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01025.js │ │ │ --rw-r--r-- 0 root (0) root (0) 175080 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01025_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5960 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01028.html │ │ │ --rw-r--r-- 0 root (0) root (0) 258 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01028.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32975 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01028_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4420 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01031.html │ │ │ --rw-r--r-- 0 root (0) root (0) 248 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01031.js │ │ │ --rw-r--r-- 0 root (0) root (0) 37044 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01031_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9675 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01034.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1564 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01034.js │ │ │ --rw-r--r-- 0 root (0) root (0) 79303 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01034_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4899 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01037.html │ │ │ --rw-r--r-- 0 root (0) root (0) 116 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01037.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24126 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01037_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5283 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01040.html │ │ │ --rw-r--r-- 0 root (0) root (0) 399 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01040.js │ │ │ --rw-r--r-- 0 root (0) root (0) 43145 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01040_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7090 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01043.html │ │ │ --rw-r--r-- 0 root (0) root (0) 344 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01043.js │ │ │ --rw-r--r-- 0 root (0) root (0) 71376 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01043_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14310 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01046.html │ │ │ --rw-r--r-- 0 root (0) root (0) 849 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01046.js │ │ │ --rw-r--r-- 0 root (0) root (0) 19523 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01046_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14310 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00956.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 849 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00956.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 19523 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00956_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9694 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00959.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 590 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00959.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 48961 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00959_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5379 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00962.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 193 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00962.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35924 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00962_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4638 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00965.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 125 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00965.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22831 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00965_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 188779 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00968.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 165 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00968.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 440035 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00968_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10552 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00971.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3298 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00971.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34833 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00971_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9518 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00974.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 836 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00974.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 114861 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00974_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8298 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00977.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 79321 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00977_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4899 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00980.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 116 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00980.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24126 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00980_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8183 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00983.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1311 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00983.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 175080 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00983_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10842 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00986.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 575 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00986.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15208 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00986_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 38827 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00989.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 40828 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00989_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 41024 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00992.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83898 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00992_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13968 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00995.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1422 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00995.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 88333 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00995_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9675 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00998.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1564 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00998.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 79303 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a00998_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7825 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01001.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 790 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01001.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 98377 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01001_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5135 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01004.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 194 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01004.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34463 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01004_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4370 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01007.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01007.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14471 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01007_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8894 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01010.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1255 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01010.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44167 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01010_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5109 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01013.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 181 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01013.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32010 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01013_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6308 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01016.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 286 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01016.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 36292 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01016_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5960 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01019.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 258 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01019.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32975 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01019_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4035 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01022.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 82 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01022.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 26180 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01022_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8442 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01025.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 172 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01025.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 91723 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01025_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6663 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01028.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 203 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01028.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 58187 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01028_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3005 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01031.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10443 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01031_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4420 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01034.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 248 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01034.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 37044 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01034_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7300 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01037.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 366 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01037.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 79607 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01037_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4696 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01040.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 132 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01040.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 22961 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01040_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7951 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01043.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 455 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01043.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 48661 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01043_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7974 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01046.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 436 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01046.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 96089 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01046_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 5271 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01049.html │ │ │ -rw-r--r-- 0 root (0) root (0) 186 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01049.js │ │ │ -rw-r--r-- 0 root (0) root (0) 18657 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01049_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10842 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01052.html │ │ │ --rw-r--r-- 0 root (0) root (0) 575 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01052.js │ │ │ --rw-r--r-- 0 root (0) root (0) 15208 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01052_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4370 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01055.html │ │ │ --rw-r--r-- 0 root (0) root (0) 94 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01055.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14471 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01055_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3048 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01058.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9659 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01058_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13968 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01061.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1422 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01061.js │ │ │ --rw-r--r-- 0 root (0) root (0) 88333 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01061_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7974 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01064.html │ │ │ --rw-r--r-- 0 root (0) root (0) 436 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01064.js │ │ │ --rw-r--r-- 0 root (0) root (0) 96089 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01064_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 41024 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01067.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83898 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01067_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 188779 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01070.html │ │ │ --rw-r--r-- 0 root (0) root (0) 165 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01070.js │ │ │ --rw-r--r-- 0 root (0) root (0) 440035 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01070_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6477 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01073.html │ │ │ --rw-r--r-- 0 root (0) root (0) 94 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01073.js │ │ │ --rw-r--r-- 0 root (0) root (0) 49646 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01073_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5030 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01076.html │ │ │ --rw-r--r-- 0 root (0) root (0) 44161 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01076_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6163 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01052.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 299 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01052.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 44128 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01052_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3048 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01055.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9659 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01055_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4629 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01058.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 119 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01058.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 26868 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01058_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5283 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01061.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 399 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01061.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 43145 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01061_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7825 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01064.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 371 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01064.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 104271 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01064_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7090 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01067.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 344 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01067.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 71376 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01067_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37409 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01070.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2542 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01070.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 354247 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01070_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5030 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01073.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 44161 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01073_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6477 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01076.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01076.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 49646 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01076_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 19204 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01079.html │ │ │ -rw-r--r-- 0 root (0) root (0) 71 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01079.js │ │ │ -rw-r--r-- 0 root (0) root (0) 39145 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01079_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14951 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01082.html │ │ │ -rw-r--r-- 0 root (0) root (0) 799 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01082.js │ │ │ -rw-r--r-- 0 root (0) root (0) 151454 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01082_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 284529 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01085.html │ │ │ -rw-r--r-- 0 root (0) root (0) 286 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01085.js │ │ │ -rw-r--r-- 0 root (0) root (0) 66277 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01085_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 364537 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01088_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 936342 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01091_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 141292 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01094_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27318 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01097_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 87636 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01100_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 255317 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01103_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 335598 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01106_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 56182 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01109_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 61513 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01112_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 483072 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01115_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 918545 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01118_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3083 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01124.html │ │ │ --rw-r--r-- 0 root (0) root (0) 13153 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01124_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 918545 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01091_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3083 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01094.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13153 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01094_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 364537 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01097_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 141292 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01100_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 61513 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01103_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 87636 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01106_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 936342 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01109_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27318 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01112_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 335598 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01115_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 483072 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01118_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 255317 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01121_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 56182 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01124_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 28406 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01127.html │ │ │ -rw-r--r-- 0 root (0) root (0) 76123 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01127_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4661 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01130.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13966 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01130_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3544 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01133.html │ │ │ --rw-r--r-- 0 root (0) root (0) 32155 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01133_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12430 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01136.html │ │ │ --rw-r--r-- 0 root (0) root (0) 547 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01136.js │ │ │ --rw-r--r-- 0 root (0) root (0) 136019 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01136_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37439 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01139.html │ │ │ --rw-r--r-- 0 root (0) root (0) 2420 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01139.js │ │ │ --rw-r--r-- 0 root (0) root (0) 583225 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01139_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10335 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01142.html │ │ │ --rw-r--r-- 0 root (0) root (0) 17257 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01142_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16493 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01145.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1207 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01145.js │ │ │ --rw-r--r-- 0 root (0) root (0) 171503 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01145_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5179 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01148.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23278 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01148_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4006 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01151.html │ │ │ --rw-r--r-- 0 root (0) root (0) 59737 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01151_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3981 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01154.html │ │ │ --rw-r--r-- 0 root (0) root (0) 34311 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01154_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3556 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01157.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85327 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01157_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7965 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01160.html │ │ │ --rw-r--r-- 0 root (0) root (0) 252306 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01160_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4081 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01163.html │ │ │ --rw-r--r-- 0 root (0) root (0) 103 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01163.js │ │ │ --rw-r--r-- 0 root (0) root (0) 115437 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01163_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5179 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01166.html │ │ │ --rw-r--r-- 0 root (0) root (0) 77 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01166.js │ │ │ --rw-r--r-- 0 root (0) root (0) 51456 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01166_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6361 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01169.html │ │ │ --rw-r--r-- 0 root (0) root (0) 184 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01169.js │ │ │ --rw-r--r-- 0 root (0) root (0) 38010 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01169_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8661 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01172.html │ │ │ --rw-r--r-- 0 root (0) root (0) 429 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01172.js │ │ │ --rw-r--r-- 0 root (0) root (0) 126614 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01172_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4028 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01175.html │ │ │ --rw-r--r-- 0 root (0) root (0) 38324 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01175_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5147 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01178.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37039 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01178_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3962 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01181.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01181.js │ │ │ --rw-r--r-- 0 root (0) root (0) 15460 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01181_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3982 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01184.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35109 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01184_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6071 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01187.html │ │ │ --rw-r--r-- 0 root (0) root (0) 235 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01187.js │ │ │ --rw-r--r-- 0 root (0) root (0) 96192 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01187_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11741 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01190.html │ │ │ --rw-r--r-- 0 root (0) root (0) 783 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01190.js │ │ │ --rw-r--r-- 0 root (0) root (0) 183076 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01190_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 65951 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01193.html │ │ │ --rw-r--r-- 0 root (0) root (0) 98 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01193.js │ │ │ --rw-r--r-- 0 root (0) root (0) 85609 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01193_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 5295 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01196.html │ │ │ --rw-r--r-- 0 root (0) root (0) 43253 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01196_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28724 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01199.html │ │ │ --rw-r--r-- 0 root (0) root (0) 517 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01199.js │ │ │ --rw-r--r-- 0 root (0) root (0) 105198 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01199_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6307 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01202.html │ │ │ --rw-r--r-- 0 root (0) root (0) 73 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01202.js │ │ │ --rw-r--r-- 0 root (0) root (0) 47658 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01202_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10335 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01133.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17257 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01133_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3982 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01136.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35109 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01136_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6307 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01139.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 73 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01139.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 47658 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01139_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4028 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01142.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 38324 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01142_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37439 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01145.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 2420 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01145.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 583225 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01145_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3544 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01148.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 32155 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01148_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6071 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01151.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 235 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01151.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 96192 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01151_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5179 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01154.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 77 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01154.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 51456 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01154_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3467 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01157.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23152 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01157_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11741 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01160.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 783 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01160.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 183076 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01160_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6361 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01163.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 184 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01163.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 38010 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01163_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 65951 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01166.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01166.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 85609 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01166_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5147 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01169.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37039 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01169_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3962 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01172.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01172.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15460 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01172_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3981 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01175.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 34311 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01175_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9307 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01178.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21266 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01178_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16493 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01181.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1207 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01181.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 171503 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01181_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4081 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01184.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 103 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01184.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 115437 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01184_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8661 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01187.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 429 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01187.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 126614 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01187_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3556 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01190.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85327 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01190_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5179 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01193.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23278 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01193_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4006 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01196.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 59737 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01196_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7965 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01199.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 252306 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01199_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28724 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01202.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 517 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01202.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 105198 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01202_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9215 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01205.html │ │ │ -rw-r--r-- 0 root (0) root (0) 254 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01205.js │ │ │ -rw-r--r-- 0 root (0) root (0) 23602 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01205_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9307 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01208.html │ │ │ --rw-r--r-- 0 root (0) root (0) 21266 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01208_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3467 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01211.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23152 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01211_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11430 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01214.html │ │ │ --rw-r--r-- 0 root (0) root (0) 382 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01214.js │ │ │ --rw-r--r-- 0 root (0) root (0) 75992 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01214_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7474 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01217.html │ │ │ --rw-r--r-- 0 root (0) root (0) 137 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01217.js │ │ │ --rw-r--r-- 0 root (0) root (0) 31698 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01217_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16200 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01220.html │ │ │ --rw-r--r-- 0 root (0) root (0) 116 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01220.js │ │ │ --rw-r--r-- 0 root (0) root (0) 92000 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01220_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4070 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01223.html │ │ │ --rw-r--r-- 0 root (0) root (0) 31833 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01223_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4408 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01226.html │ │ │ --rw-r--r-- 0 root (0) root (0) 185 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01226.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32559 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01226_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27114 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01229.html │ │ │ --rw-r--r-- 0 root (0) root (0) 887 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01229.js │ │ │ --rw-r--r-- 0 root (0) root (0) 126105 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01229_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6803 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01232.html │ │ │ --rw-r--r-- 0 root (0) root (0) 19647 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01232_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10190 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01235.html │ │ │ --rw-r--r-- 0 root (0) root (0) 173563 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01235_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7937 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01238.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28297 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01238_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12430 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01208.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 547 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01208.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 136019 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01208_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 5295 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01211.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 43253 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01211_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10190 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01214.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 173563 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01214_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4408 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01217.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 185 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01217.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32559 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01217_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27114 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01220.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 887 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01220.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 126105 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01220_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6803 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01223.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 19647 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01223_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4070 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01226.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 31833 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01226_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11430 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01229.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 382 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01229.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 75992 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01229_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16200 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01232.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 116 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01232.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 92000 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01232_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7474 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01235.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 137 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01235.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31698 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01235_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3131 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01238.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 54067 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01238_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7664 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01241.html │ │ │ -rw-r--r-- 0 root (0) root (0) 41705 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01241_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3126 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01244.html │ │ │ --rw-r--r-- 0 root (0) root (0) 30512 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01244_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9726 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01247.html │ │ │ --rw-r--r-- 0 root (0) root (0) 660 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01247.js │ │ │ --rw-r--r-- 0 root (0) root (0) 40270 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01247_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 8375 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01250.html │ │ │ --rw-r--r-- 0 root (0) root (0) 549 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01250.js │ │ │ --rw-r--r-- 0 root (0) root (0) 31274 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01250_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3131 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01253.html │ │ │ --rw-r--r-- 0 root (0) root (0) 54067 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01253_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 23221 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01256.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1823 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01256.js │ │ │ --rw-r--r-- 0 root (0) root (0) 80485 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01256_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4165 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01259.html │ │ │ --rw-r--r-- 0 root (0) root (0) 98 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01259.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17088 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01259_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4280 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01268.html │ │ │ --rw-r--r-- 0 root (0) root (0) 89 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01268.js │ │ │ --rw-r--r-- 0 root (0) root (0) 39195 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01268_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4608 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01289.html │ │ │ --rw-r--r-- 0 root (0) root (0) 199 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01289.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17471 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01289_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4934 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01292.html │ │ │ --rw-r--r-- 0 root (0) root (0) 308 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01292.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18255 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01292_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11063 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01307.html │ │ │ --rw-r--r-- 0 root (0) root (0) 57839 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01307_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4165 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01244.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01244.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17088 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01244_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23221 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01247.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1823 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01247.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 80485 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01247_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3126 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01250.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 30512 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01250_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7937 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01253.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 28297 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01253_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9726 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01256.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 660 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01256.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 40270 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01256_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 8375 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01259.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 549 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01259.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 31274 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01259_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4608 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01265.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 199 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01265.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17471 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01265_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4280 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01274.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 89 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01274.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39195 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01274_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11063 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01280.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 57839 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01280_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4934 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01298.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 308 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01298.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18255 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01298_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6647 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01310.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23865 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01310_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10689 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01313.html │ │ │ -rw-r--r-- 0 root (0) root (0) 117 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01313.js │ │ │ -rw-r--r-- 0 root (0) root (0) 39097 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01313_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9312 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01325.html │ │ │ --rw-r--r-- 0 root (0) root (0) 384 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01325.js │ │ │ --rw-r--r-- 0 root (0) root (0) 57562 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01325_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10651 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01331.html │ │ │ --rw-r--r-- 0 root (0) root (0) 70322 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01331_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4329 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01334.html │ │ │ --rw-r--r-- 0 root (0) root (0) 112 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01334.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14465 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01334_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4624 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01337.html │ │ │ --rw-r--r-- 0 root (0) root (0) 211 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01337.js │ │ │ --rw-r--r-- 0 root (0) root (0) 24143 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01337_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3274 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01340.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12350 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01340_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3287 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01367.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16040 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01367_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4367 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01385.html │ │ │ --rw-r--r-- 0 root (0) root (0) 98 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01385.js │ │ │ --rw-r--r-- 0 root (0) root (0) 16489 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01385_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3276 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01388.html │ │ │ --rw-r--r-- 0 root (0) root (0) 15815 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01388_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11866 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01391.html │ │ │ --rw-r--r-- 0 root (0) root (0) 113754 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01391_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4632 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01394.html │ │ │ --rw-r--r-- 0 root (0) root (0) 199 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01394.js │ │ │ --rw-r--r-- 0 root (0) root (0) 21568 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01394_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4249 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01397.html │ │ │ --rw-r--r-- 0 root (0) root (0) 94 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01397.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14863 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01397_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10651 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01322.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 70322 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01322_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9312 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01328.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 384 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01328.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 57562 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01328_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4624 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01334.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 211 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01334.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 24143 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01334_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4329 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01337.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 112 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01337.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14465 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01337_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3287 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01340.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16040 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01340_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3274 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01352.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12350 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01352_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11866 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01367.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 113754 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01367_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4367 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01376.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 98 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01376.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 16489 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01376_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3276 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01391.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 15815 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01391_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4249 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01394.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 94 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01394.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14863 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01394_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4632 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01397.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 199 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01397.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 21568 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01397_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3293 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01400.html │ │ │ -rw-r--r-- 0 root (0) root (0) 15071 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01400_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11890 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01403.html │ │ │ --rw-r--r-- 0 root (0) root (0) 117015 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01403_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3348 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01406.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10402 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01406_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4270 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01409.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01409.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18425 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01409_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4279 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01412.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01412.js │ │ │ --rw-r--r-- 0 root (0) root (0) 15315 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01412_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4273 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01415.html │ │ │ --rw-r--r-- 0 root (0) root (0) 86 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01415.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17613 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01415_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4244 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01418.html │ │ │ --rw-r--r-- 0 root (0) root (0) 80 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01418.js │ │ │ --rw-r--r-- 0 root (0) root (0) 16044 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01418_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9652 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01421.html │ │ │ --rw-r--r-- 0 root (0) root (0) 390 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01421.js │ │ │ --rw-r--r-- 0 root (0) root (0) 53098 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01421_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14217 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01424.html │ │ │ --rw-r--r-- 0 root (0) root (0) 466 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01424.js │ │ │ --rw-r--r-- 0 root (0) root (0) 56889 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01424_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3260 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01427.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11260 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01427_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4256 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01430.html │ │ │ --rw-r--r-- 0 root (0) root (0) 92 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01430.js │ │ │ --rw-r--r-- 0 root (0) root (0) 12813 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01430_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4317 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01433.html │ │ │ --rw-r--r-- 0 root (0) root (0) 105 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01433.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14615 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01433_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3348 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01403.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10402 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01403_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11890 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01406.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 117015 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01406_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4244 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01409.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 80 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01409.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 16044 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01409_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 14217 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01412.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 466 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01412.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 56889 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01412_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4317 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01415.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 105 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01415.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14615 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01415_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3248 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01418.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11244 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01418_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3292 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01421.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11908 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01421_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4256 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01424.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 92 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01424.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12813 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01424_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3296 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01427.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11921 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01427_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3260 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01430.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11260 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01430_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4273 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01433.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 86 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01433.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17613 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01433_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4322 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01436.html │ │ │ -rw-r--r-- 0 root (0) root (0) 106 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01436.js │ │ │ -rw-r--r-- 0 root (0) root (0) 18876 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01436_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3248 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01439.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11244 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01439_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3292 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01442.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11908 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01442_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3296 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01445.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11921 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01445_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6779 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01451.html │ │ │ --rw-r--r-- 0 root (0) root (0) 142 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01451.js │ │ │ --rw-r--r-- 0 root (0) root (0) 50895 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01451_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 9650 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01454.html │ │ │ --rw-r--r-- 0 root (0) root (0) 120 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01454.js │ │ │ --rw-r--r-- 0 root (0) root (0) 59795 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01454_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3791 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01457.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12231 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01457_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4279 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01439.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01439.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 15315 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01439_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9652 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01442.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 390 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01442.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 53098 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01442_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4270 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01445.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01445.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18425 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01445_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6779 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01448.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 142 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01448.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 50895 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01448_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3791 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01454.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12231 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01454_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 9650 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01457.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 120 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01457.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 59795 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01457_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4302 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01460.html │ │ │ -rw-r--r-- 0 root (0) root (0) 85 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01460.js │ │ │ -rw-r--r-- 0 root (0) root (0) 18684 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01460_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4645 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01463.html │ │ │ -rw-r--r-- 0 root (0) root (0) 189 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01463.js │ │ │ -rw-r--r-- 0 root (0) root (0) 17654 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01463_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10173 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01466.html │ │ │ -rw-r--r-- 0 root (0) root (0) 155 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01466.js │ │ │ -rw-r--r-- 0 root (0) root (0) 89793 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01466_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9133 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01469.html │ │ │ -rw-r--r-- 0 root (0) root (0) 34406 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01469_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3239 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01472.html │ │ │ --rw-r--r-- 0 root (0) root (0) 11592 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01472_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3234 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01472.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 37521 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01472_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6775 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01475.html │ │ │ -rw-r--r-- 0 root (0) root (0) 118 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01475.js │ │ │ -rw-r--r-- 0 root (0) root (0) 35373 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01475_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3234 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01478.html │ │ │ --rw-r--r-- 0 root (0) root (0) 37521 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01478_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16993 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01481.html │ │ │ --rw-r--r-- 0 root (0) root (0) 1411 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01481.js │ │ │ --rw-r--r-- 0 root (0) root (0) 219595 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01481_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16993 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01478.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 1411 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01478.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 219595 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01478_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3239 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01481.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 11592 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01481_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 11089 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01484.html │ │ │ -rw-r--r-- 0 root (0) root (0) 96802 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01484_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3258 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01487.html │ │ │ -rw-r--r-- 0 root (0) root (0) 68829 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01487_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10927 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01490.html │ │ │ -rw-r--r-- 0 root (0) root (0) 42817 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01490_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4227 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01493.html │ │ │ --rw-r--r-- 0 root (0) root (0) 88 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01493.js │ │ │ --rw-r--r-- 0 root (0) root (0) 39398 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01493_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 7707 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01496.html │ │ │ --rw-r--r-- 0 root (0) root (0) 32820 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01496_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4271 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01499.html │ │ │ --rw-r--r-- 0 root (0) root (0) 83 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01499.js │ │ │ --rw-r--r-- 0 root (0) root (0) 18309 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01499_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4295 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01502.html │ │ │ --rw-r--r-- 0 root (0) root (0) 86 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01502.js │ │ │ --rw-r--r-- 0 root (0) root (0) 35066 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01502_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4292 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01505.html │ │ │ --rw-r--r-- 0 root (0) root (0) 85 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01505.js │ │ │ --rw-r--r-- 0 root (0) root (0) 32564 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01505_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3304 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01508.html │ │ │ --rw-r--r-- 0 root (0) root (0) 35706 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01508_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3289 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01511.html │ │ │ --rw-r--r-- 0 root (0) root (0) 29876 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01511_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4432 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01514.html │ │ │ --rw-r--r-- 0 root (0) root (0) 128 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01514.js │ │ │ --rw-r--r-- 0 root (0) root (0) 17868 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01514_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 7707 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01493.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 32820 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01493_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4227 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01496.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 88 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01496.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 39398 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01496_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4292 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01499.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 85 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01499.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 32564 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01499_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4271 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01502.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 83 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01502.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 18309 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01502_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4295 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01505.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 86 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01505.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 35066 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01505_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4432 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01508.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 128 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01508.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 17868 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01508_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3304 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01511.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 35706 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01511_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3289 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01514.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 29876 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01514_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3317 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01517.html │ │ │ -rw-r--r-- 0 root (0) root (0) 45541 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01517_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3313 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01520.html │ │ │ --rw-r--r-- 0 root (0) root (0) 16432 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01520_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3365 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01523.html │ │ │ --rw-r--r-- 0 root (0) root (0) 33770 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01523_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10969 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01526.html │ │ │ --rw-r--r-- 0 root (0) root (0) 47674 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01526_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 3239 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01529.html │ │ │ --rw-r--r-- 0 root (0) root (0) 39985 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01529_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3365 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01520.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 33770 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01520_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3313 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01523.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 16432 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01523_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 3239 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01526.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 39985 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01526_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10969 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01529.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 47674 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01529_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 13096 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01532.html │ │ │ -rw-r--r-- 0 root (0) root (0) 55743 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01532_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4346 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01535.html │ │ │ -rw-r--r-- 0 root (0) root (0) 130 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01535.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13526 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01535_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 6666 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01544.html │ │ │ --rw-r--r-- 0 root (0) root (0) 126 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01544.js │ │ │ --rw-r--r-- 0 root (0) root (0) 34618 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01544_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 4341 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01544.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 129 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01544.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 14778 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01544_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3353 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01547.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17083 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01547_source.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4341 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01550.html │ │ │ --rw-r--r-- 0 root (0) root (0) 129 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01550.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14778 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01550_source.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 6666 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01550.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 126 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01550.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 34618 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01550_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4299 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01553.html │ │ │ -rw-r--r-- 0 root (0) root (0) 90 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01553.js │ │ │ -rw-r--r-- 0 root (0) root (0) 17921 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01553_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3310 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01556.html │ │ │ -rw-r--r-- 0 root (0) root (0) 24370 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01556_source.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3414 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01559.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23563 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/a01559_source.html │ │ │ @@ -8359,60 +8359,60 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 153 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/nav_f.png │ │ │ -rw-r--r-- 0 root (0) root (0) 169 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/nav_fd.png │ │ │ -rw-r--r-- 0 root (0) root (0) 95 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/nav_g.png │ │ │ -rw-r--r-- 0 root (0) root (0) 98 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/nav_h.png │ │ │ -rw-r--r-- 0 root (0) root (0) 114 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/nav_hd.png │ │ │ -rw-r--r-- 0 root (0) root (0) 2167 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtree.css │ │ │ -rw-r--r-- 0 root (0) root (0) 15935 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtree.js │ │ │ --rw-r--r-- 0 root (0) root (0) 5206 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreedata.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 5240 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreedata.js │ │ │ -rw-r--r-- 0 root (0) root (0) 10938 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex0.js │ │ │ --rw-r--r-- 0 root (0) root (0) 9968 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex1.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 11768 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex1.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14102 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex10.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15749 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex11.js │ │ │ -rw-r--r-- 0 root (0) root (0) 16703 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex12.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13295 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex13.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15165 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex14.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14062 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex15.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15167 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex16.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15180 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex17.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15204 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex18.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15134 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex19.js │ │ │ --rw-r--r-- 0 root (0) root (0) 14471 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex2.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 11407 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex2.js │ │ │ -rw-r--r-- 0 root (0) root (0) 12137 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex20.js │ │ │ -rw-r--r-- 0 root (0) root (0) 10965 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex21.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13672 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex22.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15474 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex23.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13789 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex24.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14841 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex25.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15067 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex26.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14490 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex27.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15307 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex28.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14187 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex29.js │ │ │ --rw-r--r-- 0 root (0) root (0) 11635 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex3.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12881 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex3.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13172 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex30.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14106 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex31.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15084 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex32.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15047 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex33.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15383 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex34.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13838 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex35.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14905 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex36.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13127 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex37.js │ │ │ -rw-r--r-- 0 root (0) root (0) 12225 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex38.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13903 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex39.js │ │ │ --rw-r--r-- 0 root (0) root (0) 12051 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex4.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 12038 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex4.js │ │ │ -rw-r--r-- 0 root (0) root (0) 12901 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex40.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14038 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex41.js │ │ │ -rw-r--r-- 0 root (0) root (0) 13110 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex42.js │ │ │ -rw-r--r-- 0 root (0) root (0) 12609 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex43.js │ │ │ -rw-r--r-- 0 root (0) root (0) 12963 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex44.js │ │ │ -rw-r--r-- 0 root (0) root (0) 11988 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex45.js │ │ │ -rw-r--r-- 0 root (0) root (0) 8209 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex46.js │ │ │ -rw-r--r-- 0 root (0) root (0) 8782 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex47.js │ │ │ -rw-r--r-- 0 root (0) root (0) 7525 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex48.js │ │ │ --rw-r--r-- 0 root (0) root (0) 10483 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex5.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 10514 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex5.js │ │ │ -rw-r--r-- 0 root (0) root (0) 11495 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex6.js │ │ │ -rw-r--r-- 0 root (0) root (0) 15021 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex7.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14912 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex8.js │ │ │ -rw-r--r-- 0 root (0) root (0) 14528 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/navtreeindex9.js │ │ │ -rw-r--r-- 0 root (0) root (0) 123 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/open.png │ │ │ -rw-r--r-- 0 root (0) root (0) 2935 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/pages.html │ │ │ -rw-r--r-- 0 root (0) root (0) 696 2025-09-10 05:15:11.000000 ./usr/share/doc/gcc-13-base/libstdc++/user/plus.svg │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/_formulas_dark.log │ │ │ @@ -1,8 +1,8 @@ │ │ │ -This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025/Debian) (preloaded format=latex 2025.9.10) 10 SEP 2025 09:02 │ │ │ +This is pdfTeX, Version 3.141592653-2.6-1.40.28 (TeX Live 2025/Debian) (preloaded format=latex 2025.10.4) 4 OCT 2025 08:27 │ │ │ entering extended mode │ │ │ restricted \write18 enabled. │ │ │ %&-line parsing enabled. │ │ │ **_formulas_dark │ │ │ (./_formulas_dark.tex │ │ │ LaTeX2e <2025-06-01> patch level 1 │ │ │ L3 programming layer <2025-07-19> │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00002.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stdlib.h File Reference │ │ │ +libstdc++: fenv.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,27 +45,27 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stdlib.h File Reference
│ │ │ +
fenv.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

│ │ │

Detailed Description

│ │ │

This is a Standard C++ Library header.

│ │ │ │ │ │ -

Definition in file stdlib.h.

│ │ │ +

Definition in file fenv.h.

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

Go to the source code of this file.

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

│ │ │ +Macros

#define _GLIBCXX_COMPLEX_H
 
│ │ │

Detailed Description

│ │ │

This is a Standard C++ Library header.

│ │ │ │ │ │ -

Definition in file stdatomic.h.

│ │ │ -
│ │ │ +

Definition in file complex.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _GLIBCXX_COMPLEX_H

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

Definition at line 46 of file complex.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,8 +1,16 @@ │ │ │ │ libstdc++ │ │ │ │ -stdatomic.h File Reference │ │ │ │ +_M_a_c_r_o_s │ │ │ │ +complex.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  ___G_L_I_B_C_X_X___C_O_M_P_L_E_X___H │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is a Standard C++ Library header. │ │ │ │ -Definition in file _s_t_d_a_t_o_m_i_c_._h. │ │ │ │ - * _s_t_d_a_t_o_m_i_c_._h │ │ │ │ +Definition in file _c_o_m_p_l_e_x_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__CCOOMMPPLLEEXX__HH ********** │ │ │ │ +#define _GLIBCXX_COMPLEX_H │ │ │ │ +Definition at line _4_6 of file _c_o_m_p_l_e_x_._h. │ │ │ │ + * _c_o_m_p_l_e_x_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00005_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stdatomic.h Source File │ │ │ +libstdc++: complex.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stdatomic.h
│ │ │ +
complex.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// C compatibility header <stdatomic.h> -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// -*- C++ -*- compatibility header.
│ │ │
2
│ │ │ -
3// Copyright The GNU Toolchain Authors.
│ │ │ +
3// Copyright (C) 2007-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,143 +72,44 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file include/stdatomic.h
│ │ │ +
25/** @file complex.h
│ │ │
26 * This is a Standard C++ Library header.
│ │ │
27 */
│ │ │
28
│ │ │ -
29#ifndef _GLIBCXX_STDATOMIC_H
│ │ │ -
30#define _GLIBCXX_STDATOMIC_H
│ │ │ -
31
│ │ │ -
32#if __cplusplus > 202002L
│ │ │ -
33#include <atomic>
│ │ │ +
29#include <bits/c++config.h>
│ │ │ +
30
│ │ │ +
31#if __cplusplus >= 201103L
│ │ │ +
32# include <ccomplex>
│ │ │ +
33#endif
│ │ │
34
│ │ │ -
35#define __cpp_lib_stdatomic_h 202011L
│ │ │ -
36
│ │ │ -
37#define _Atomic(_Tp) ::std::atomic<_Tp>
│ │ │ -
38
│ │ │ - │ │ │ -
40using std::memory_order_relaxed;
│ │ │ -
41using std::memory_order_consume;
│ │ │ -
42using std::memory_order_acquire;
│ │ │ -
43using std::memory_order_release;
│ │ │ -
44using std::memory_order_acq_rel;
│ │ │ -
45using std::memory_order_seq_cst;
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
53using std::atomic_int;
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
59#ifdef _GLIBCXX_USE_CHAR8_T
│ │ │ - │ │ │ -
61#endif
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
65#ifdef _GLIBCXX_USE_C99_STDINT_TR1
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
90#endif
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
95#ifdef _GLIBCXX_USE_C99_STDINT_TR1
│ │ │ - │ │ │ - │ │ │ -
98#endif
│ │ │ -
99using std::atomic_is_lock_free;
│ │ │ -
100using std::atomic_load;
│ │ │ -
101using std::atomic_load_explicit;
│ │ │ -
102using std::atomic_store;
│ │ │ -
103using std::atomic_store_explicit;
│ │ │ -
104using std::atomic_exchange;
│ │ │ -
105using std::atomic_exchange_explicit;
│ │ │ -
106using std::atomic_compare_exchange_strong;
│ │ │ -
107using std::atomic_compare_exchange_strong_explicit;
│ │ │ -
108using std::atomic_compare_exchange_weak;
│ │ │ -
109using std::atomic_compare_exchange_weak_explicit;
│ │ │ -
110using std::atomic_fetch_add;
│ │ │ -
111using std::atomic_fetch_add_explicit;
│ │ │ -
112using std::atomic_fetch_sub;
│ │ │ -
113using std::atomic_fetch_sub_explicit;
│ │ │ -
114using std::atomic_fetch_or;
│ │ │ -
115using std::atomic_fetch_or_explicit;
│ │ │ -
116using std::atomic_fetch_xor;
│ │ │ -
117using std::atomic_fetch_xor_explicit;
│ │ │ -
118using std::atomic_fetch_and;
│ │ │ -
119using std::atomic_fetch_and_explicit;
│ │ │ -
120using std::atomic_flag_test_and_set;
│ │ │ -
121using std::atomic_flag_test_and_set_explicit;
│ │ │ -
122using std::atomic_flag_clear;
│ │ │ -
123using std::atomic_flag_clear_explicit;
│ │ │ -
124using std::atomic_thread_fence;
│ │ │ -
125using std::atomic_signal_fence;
│ │ │ -
126
│ │ │ -
127#elif defined __clang__
│ │ │ -
128# include_next <stdatomic.h>
│ │ │ -
129#endif // C++23
│ │ │ -
130#endif // _GLIBCXX_STDATOMIC_H
│ │ │ - │ │ │ -
memory_order
Enumeration for memory_order.
Definition atomic_base.h:63
│ │ │ -
atomic<bool>
Definition atomic:63
│ │ │ -
Explicit specialization for char.
Definition atomic:708
│ │ │ -
Explicit specialization for signed char.
Definition atomic:731
│ │ │ -
Explicit specialization for unsigned char.
Definition atomic:754
│ │ │ -
Explicit specialization for short.
Definition atomic:777
│ │ │ -
Explicit specialization for unsigned short.
Definition atomic:800
│ │ │ -
Explicit specialization for int.
Definition atomic:823
│ │ │ -
Explicit specialization for unsigned int.
Definition atomic:846
│ │ │ -
Explicit specialization for long.
Definition atomic:869
│ │ │ -
Explicit specialization for unsigned long.
Definition atomic:892
│ │ │ -
Explicit specialization for long long.
Definition atomic:915
│ │ │ -
Explicit specialization for unsigned long long.
Definition atomic:938
│ │ │ -
Explicit specialization for wchar_t.
Definition atomic:961
│ │ │ -
Explicit specialization for char16_t.
Definition atomic:1010
│ │ │ -
Explicit specialization for char32_t.
Definition atomic:1034
│ │ │ -
atomic_flag
│ │ │ - │ │ │ +
35#if __cplusplus >= 201103L && defined(__STRICT_ANSI__)
│ │ │ +
36// For strict modes do not include the C library's <complex.h>, see PR 82417.
│ │ │ +
37#elif _GLIBCXX_HAVE_COMPLEX_H
│ │ │ +
38# include_next <complex.h>
│ │ │ +
39# ifdef _GLIBCXX_COMPLEX
│ │ │ +
40// See PR56111, keep the macro in C++03 if possible.
│ │ │ +
41# undef complex
│ │ │ +
42# endif
│ │ │ +
43#endif
│ │ │ +
44
│ │ │ +
45#ifndef _GLIBCXX_COMPLEX_H
│ │ │ +
46#define _GLIBCXX_COMPLEX_H 1
│ │ │ +
47
│ │ │ +
48#endif
│ │ │ + │ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -stdatomic.h │ │ │ │ +complex.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// C compatibility header -*- C++ -*- │ │ │ │ +1// -*- C++ -*- compatibility header. │ │ │ │ 2 │ │ │ │ -3// Copyright The GNU Toolchain Authors. │ │ │ │ +3// Copyright (C) 2007-2023 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,170 +21,35 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file include/stdatomic.h │ │ │ │ +25/** @file complex.h │ │ │ │ 26 * This is a Standard C++ Library header. │ │ │ │ 27 */ │ │ │ │ 28 │ │ │ │ -29#ifndef _GLIBCXX_STDATOMIC_H │ │ │ │ -30#define _GLIBCXX_STDATOMIC_H │ │ │ │ -31 │ │ │ │ -32#if __cplusplus > 202002L │ │ │ │ -33#include <_a_t_o_m_i_c> │ │ │ │ +29#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ +30 │ │ │ │ +31#if __cplusplus >= 201103L │ │ │ │ +32# include <_c_c_o_m_p_l_e_x> │ │ │ │ +33#endif │ │ │ │ 34 │ │ │ │ -35#define __cpp_lib_stdatomic_h 202011L │ │ │ │ -36 │ │ │ │ -37#define _Atomic(_Tp) ::std::atomic<_Tp> │ │ │ │ -38 │ │ │ │ -39using _s_t_d_:_:_m_e_m_o_r_y___o_r_d_e_r; │ │ │ │ -40using std::memory_order_relaxed; │ │ │ │ -41using std::memory_order_consume; │ │ │ │ -42using std::memory_order_acquire; │ │ │ │ -43using std::memory_order_release; │ │ │ │ -44using std::memory_order_acq_rel; │ │ │ │ -45using std::memory_order_seq_cst; │ │ │ │ -46using _s_t_d_:_:_a_t_o_m_i_c___f_l_a_g; │ │ │ │ -47using _s_t_d_:_:_a_t_o_m_i_c___b_o_o_l; │ │ │ │ -48using _s_t_d_:_:_a_t_o_m_i_c___c_h_a_r; │ │ │ │ -49using _s_t_d_:_:_a_t_o_m_i_c___s_c_h_a_r; │ │ │ │ -50using _s_t_d_:_:_a_t_o_m_i_c___u_c_h_a_r; │ │ │ │ -51using _s_t_d_:_:_a_t_o_m_i_c___s_h_o_r_t; │ │ │ │ -52using _s_t_d_:_:_a_t_o_m_i_c___u_s_h_o_r_t; │ │ │ │ -53using _s_t_d_:_:_a_t_o_m_i_c___i_n_t; │ │ │ │ -54using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t; │ │ │ │ -55using _s_t_d_:_:_a_t_o_m_i_c___l_o_n_g; │ │ │ │ -56using _s_t_d_:_:_a_t_o_m_i_c___u_l_o_n_g; │ │ │ │ -57using _s_t_d_:_:_a_t_o_m_i_c___l_l_o_n_g; │ │ │ │ -58using _s_t_d_:_:_a_t_o_m_i_c___u_l_l_o_n_g; │ │ │ │ -59#ifdef _GLIBCXX_USE_CHAR8_T │ │ │ │ -60using _s_t_d_:_:_a_t_o_m_i_c___c_h_a_r_8___t; │ │ │ │ -61#endif │ │ │ │ -62using _s_t_d_:_:_a_t_o_m_i_c___c_h_a_r_1_6___t; │ │ │ │ -63using _s_t_d_:_:_a_t_o_m_i_c___c_h_a_r_3_2___t; │ │ │ │ -64using _s_t_d_:_:_a_t_o_m_i_c___w_c_h_a_r___t; │ │ │ │ -65#ifdef _GLIBCXX_USE_C99_STDINT_TR1 │ │ │ │ -66using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_8___t; │ │ │ │ -67using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_8___t; │ │ │ │ -68using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_1_6___t; │ │ │ │ -69using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_1_6___t; │ │ │ │ -70using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_3_2___t; │ │ │ │ -71using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_3_2___t; │ │ │ │ -72using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_6_4___t; │ │ │ │ -73using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_6_4___t; │ │ │ │ -74using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___l_e_a_s_t_8___t; │ │ │ │ -75using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___l_e_a_s_t_8___t; │ │ │ │ -76using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___l_e_a_s_t_1_6___t; │ │ │ │ -77using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___l_e_a_s_t_1_6___t; │ │ │ │ -78using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___l_e_a_s_t_3_2___t; │ │ │ │ -79using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___l_e_a_s_t_3_2___t; │ │ │ │ -80using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___l_e_a_s_t_6_4___t; │ │ │ │ -81using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___l_e_a_s_t_6_4___t; │ │ │ │ -82using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___f_a_s_t_8___t; │ │ │ │ -83using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___f_a_s_t_8___t; │ │ │ │ -84using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___f_a_s_t_1_6___t; │ │ │ │ -85using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___f_a_s_t_1_6___t; │ │ │ │ -86using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___f_a_s_t_3_2___t; │ │ │ │ -87using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___f_a_s_t_3_2___t; │ │ │ │ -88using _s_t_d_:_:_a_t_o_m_i_c___i_n_t___f_a_s_t_6_4___t; │ │ │ │ -89using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t___f_a_s_t_6_4___t; │ │ │ │ -90#endif │ │ │ │ -91using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_p_t_r___t; │ │ │ │ -92using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_p_t_r___t; │ │ │ │ -93using _s_t_d_:_:_a_t_o_m_i_c___s_i_z_e___t; │ │ │ │ -94using _s_t_d_:_:_a_t_o_m_i_c___p_t_r_d_i_f_f___t; │ │ │ │ -95#ifdef _GLIBCXX_USE_C99_STDINT_TR1 │ │ │ │ -96using _s_t_d_:_:_a_t_o_m_i_c___i_n_t_m_a_x___t; │ │ │ │ -97using _s_t_d_:_:_a_t_o_m_i_c___u_i_n_t_m_a_x___t; │ │ │ │ -98#endif │ │ │ │ -99using std::atomic_is_lock_free; │ │ │ │ -100using std::atomic_load; │ │ │ │ -101using std::atomic_load_explicit; │ │ │ │ -102using std::atomic_store; │ │ │ │ -103using std::atomic_store_explicit; │ │ │ │ -104using std::atomic_exchange; │ │ │ │ -105using std::atomic_exchange_explicit; │ │ │ │ -106using std::atomic_compare_exchange_strong; │ │ │ │ -107using std::atomic_compare_exchange_strong_explicit; │ │ │ │ -108using std::atomic_compare_exchange_weak; │ │ │ │ -109using std::atomic_compare_exchange_weak_explicit; │ │ │ │ -110using std::atomic_fetch_add; │ │ │ │ -111using std::atomic_fetch_add_explicit; │ │ │ │ -112using std::atomic_fetch_sub; │ │ │ │ -113using std::atomic_fetch_sub_explicit; │ │ │ │ -114using std::atomic_fetch_or; │ │ │ │ -115using std::atomic_fetch_or_explicit; │ │ │ │ -116using std::atomic_fetch_xor; │ │ │ │ -117using std::atomic_fetch_xor_explicit; │ │ │ │ -118using std::atomic_fetch_and; │ │ │ │ -119using std::atomic_fetch_and_explicit; │ │ │ │ -120using std::atomic_flag_test_and_set; │ │ │ │ -121using std::atomic_flag_test_and_set_explicit; │ │ │ │ -122using std::atomic_flag_clear; │ │ │ │ -123using std::atomic_flag_clear_explicit; │ │ │ │ -124using std::atomic_thread_fence; │ │ │ │ -125using std::atomic_signal_fence; │ │ │ │ -126 │ │ │ │ -127#elif defined __clang__ │ │ │ │ -128# include_next │ │ │ │ -129#endif // C++23 │ │ │ │ -130#endif // _GLIBCXX_STDATOMIC_H │ │ │ │ -_a_t_o_m_i_c │ │ │ │ -_s_t_d_:_:_m_e_m_o_r_y___o_r_d_e_r │ │ │ │ -memory_order │ │ │ │ -Enumeration for memory_order. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c___b_a_s_e_._h_:_6_3 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _b_o_o_l_ _> │ │ │ │ -atomic │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_6_3 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _c_h_a_r_ _> │ │ │ │ -Explicit specialization for char. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_7_0_8 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ -Explicit specialization for signed char. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_7_3_1 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _c_h_a_r_ _> │ │ │ │ -Explicit specialization for unsigned char. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_7_5_4 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _s_h_o_r_t_ _> │ │ │ │ -Explicit specialization for short. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_7_7_7 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _s_h_o_r_t_ _> │ │ │ │ -Explicit specialization for unsigned short. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_0_0 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _i_n_t_ _> │ │ │ │ -Explicit specialization for int. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_2_3 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _i_n_t_ _> │ │ │ │ -Explicit specialization for unsigned int. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_4_6 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _l_o_n_g_ _> │ │ │ │ -Explicit specialization for long. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_6_9 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _l_o_n_g_ _> │ │ │ │ -Explicit specialization for unsigned long. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_8_9_2 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _l_o_n_g_ _l_o_n_g_ _> │ │ │ │ -Explicit specialization for long long. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_9_1_5 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _u_n_s_i_g_n_e_d_ _l_o_n_g_ _l_o_n_g_ _> │ │ │ │ -Explicit specialization for unsigned long long. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_9_3_8 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _w_c_h_a_r___t_ _> │ │ │ │ -Explicit specialization for wchar_t. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_9_6_1 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _c_h_a_r_1_6___t_ _> │ │ │ │ -Explicit specialization for char16_t. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_1_0_1_0 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c_<_ _c_h_a_r_3_2___t_ _> │ │ │ │ -Explicit specialization for char32_t. │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c_:_1_0_3_4 │ │ │ │ -_s_t_d_:_:_a_t_o_m_i_c___f_l_a_g │ │ │ │ -atomic_flag │ │ │ │ -DDeeffiinniittiioonn _a_t_o_m_i_c___b_a_s_e_._h_:_2_1_3 │ │ │ │ -_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ -DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ - * _s_t_d_a_t_o_m_i_c_._h │ │ │ │ +35#if __cplusplus >= 201103L && defined(__STRICT_ANSI__) │ │ │ │ +36// For strict modes do not include the C library's , see PR 82417. │ │ │ │ +37#elif _GLIBCXX_HAVE_COMPLEX_H │ │ │ │ +38# include_next │ │ │ │ +39# ifdef _GLIBCXX_COMPLEX │ │ │ │ +40// See PR56111, keep the macro in C++03 if possible. │ │ │ │ +41# undef complex │ │ │ │ +42# endif │ │ │ │ +43#endif │ │ │ │ +44 │ │ │ │ +45#ifndef _GLIBCXX_COMPLEX_H │ │ │ │ +46#define _GLIBCXX_COMPLEX_H 1 │ │ │ │ +47 │ │ │ │ +48#endif │ │ │ │ +_c_+_+_c_o_n_f_i_g_._h │ │ │ │ +_c_c_o_m_p_l_e_x │ │ │ │ + * _c_o_m_p_l_e_x_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00008_source.html │ │ │ @@ -247,78 +247,78 @@ │ │ │
complex< _Tp > exp(const complex< _Tp > &)
Return complex base e exponential of z.
Definition complex:1058
│ │ │
complex< _Tp > cosh(const complex< _Tp > &)
Return complex hyperbolic cosine of z.
Definition complex:1032
│ │ │
complex< _Tp > tanh(const complex< _Tp > &)
Return complex hyperbolic tangent of z.
Definition complex:1249
│ │ │
complex< _Tp > pow(const complex< _Tp > &, int)
Return x to the y'th power.
Definition complex:1280
│ │ │
complex< _Tp > sinh(const complex< _Tp > &)
Return complex hyperbolic sine of z.
Definition complex:1150
│ │ │
complex< _Tp > cos(const complex< _Tp > &)
Return complex cosine of z.
Definition complex:1002
│ │ │
complex< _Tp > sqrt(const complex< _Tp > &)
Return complex square root of z.
Definition complex:1194
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type sph_bessel(unsigned int __n, _Tp __x)
Definition specfun.h:1100
│ │ │ -
long double sph_bessell(unsigned int __n, long double __x)
Definition specfun.h:1081
│ │ │ -
float betaf(float __a, float __b)
Definition specfun.h:310
│ │ │ -
long double expintl(long double __x)
Definition specfun.h:852
│ │ │ -
float cyl_bessel_jf(float __nu, float __x)
Definition specfun.h:548
│ │ │ -
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_k(_Tpnu __nu, _Tp __x)
Definition specfun.h:631
│ │ │ -
float ellint_3f(float __k, float __nu, float __phi)
Return the incomplete elliptic integral of the third kind for float argument.
Definition specfun.h:790
│ │ │ -
long double legendrel(unsigned int __l, long double __x)
Definition specfun.h:985
│ │ │ -
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:461
│ │ │ -
long double riemann_zetal(long double __s)
Definition specfun.h:1030
│ │ │ -
float cyl_bessel_kf(float __nu, float __x)
Definition specfun.h:594
│ │ │ -
float comp_ellint_2f(float __k)
Definition specfun.h:404
│ │ │ -
long double hermitel(unsigned int __n, long double __x)
Definition specfun.h:893
│ │ │ -
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_1(_Tp __k, _Tpp __phi)
Definition specfun.h:727
│ │ │ -
long double sph_legendrel(unsigned int __l, unsigned int __m, long double __theta)
Definition specfun.h:1126
│ │ │ -
float ellint_1f(float __k, float __phi)
Definition specfun.h:694
│ │ │ -
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_neumann(_Tpnu __nu, _Tp __x)
Definition specfun.h:679
│ │ │ -
float assoc_legendref(unsigned int __l, unsigned int __m, float __x)
Definition specfun.h:265
│ │ │ -
long double sph_neumannl(unsigned int __n, long double __x)
Definition specfun.h:1172
│ │ │ -
long double comp_ellint_2l(long double __k)
Definition specfun.h:414
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type comp_ellint_2(_Tp __k)
Definition specfun.h:436
│ │ │ -
float sph_besself(unsigned int __n, float __x)
Definition specfun.h:1071
│ │ │ -
long double assoc_legendrel(unsigned int __l, unsigned int __m, long double __x)
Definition specfun.h:274
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type legendre(unsigned int __l, _Tp __x)
Definition specfun.h:1005
│ │ │ -
float expintf(float __x)
Definition specfun.h:842
│ │ │ -
float ellint_2f(float __k, float __phi)
Return the incomplete elliptic integral of the second kind for float argument.
Definition specfun.h:742
│ │ │ -
__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:828
│ │ │ -
long double ellint_2l(long double __k, long double __phi)
Return the incomplete elliptic integral of the second kind .
Definition specfun.h:752
│ │ │ -
float cyl_neumannf(float __nu, float __x)
Definition specfun.h:646
│ │ │ -
__gnu_cxx::__promote_2< _Tpa, _Tpb >::__type beta(_Tpa __a, _Tpb __b)
Definition specfun.h:341
│ │ │ -
long double comp_ellint_1l(long double __k)
Definition specfun.h:366
│ │ │ -
float comp_ellint_3f(float __k, float __nu)
Return the complete elliptic integral of the third kind for float modulus k.
Definition specfun.h:451
│ │ │ -
float sph_neumannf(unsigned int __n, float __x)
Definition specfun.h:1162
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type expint(_Tp __x)
Definition specfun.h:868
│ │ │ -
long double ellint_1l(long double __k, long double __phi)
Definition specfun.h:704
│ │ │ -
float comp_ellint_1f(float __k)
Definition specfun.h:356
│ │ │ -
long double betal(long double __a, long double __b)
Definition specfun.h:320
│ │ │ -
float hermitef(unsigned int __n, float __x)
Definition specfun.h:883
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type riemann_zeta(_Tp __s)
Definition specfun.h:1056
│ │ │ -
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:800
│ │ │ -
float sph_legendref(unsigned int __l, unsigned int __m, float __theta)
Definition specfun.h:1115
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type sph_neumann(unsigned int __n, _Tp __x)
Definition specfun.h:1191
│ │ │ -
float cyl_bessel_if(float __nu, float __x)
Definition specfun.h:502
│ │ │ -
long double laguerrel(unsigned int __n, long double __x)
Definition specfun.h:941
│ │ │ -
long double cyl_bessel_il(long double __nu, long double __x)
Definition specfun.h:512
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x)
Definition specfun.h:250
│ │ │ -
__gnu_cxx::__promote_2< _Tp, _Tpn >::__type comp_ellint_3(_Tp __k, _Tpn __nu)
Definition specfun.h:487
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta)
Definition specfun.h:1147
│ │ │ -
long double cyl_bessel_kl(long double __nu, long double __x)
Definition specfun.h:604
│ │ │ -
long double assoc_laguerrel(unsigned int __n, unsigned int __m, long double __x)
Definition specfun.h:214
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type hermite(unsigned int __n, _Tp __x)
Definition specfun.h:916
│ │ │ -
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_j(_Tpnu __nu, _Tp __x)
Definition specfun.h:579
│ │ │ -
float laguerref(unsigned int __n, float __x)
Definition specfun.h:931
│ │ │ -
long double cyl_bessel_jl(long double __nu, long double __x)
Definition specfun.h:558
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type comp_ellint_1(_Tp __k)
Definition specfun.h:389
│ │ │ -
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_2(_Tp __k, _Tpp __phi)
Definition specfun.h:775
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type laguerre(unsigned int __n, _Tp __x)
Definition specfun.h:960
│ │ │ -
float legendref(unsigned int __l, float __x)
Definition specfun.h:975
│ │ │ -
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_i(_Tpnu __nu, _Tp __x)
Definition specfun.h:533
│ │ │ -
__gnu_cxx::__promote< _Tp >::__type assoc_legendre(unsigned int __l, unsigned int __m, _Tp __x)
Definition specfun.h:296
│ │ │ -
float assoc_laguerref(unsigned int __n, unsigned int __m, float __x)
Definition specfun.h:204
│ │ │ -
long double cyl_neumannl(long double __nu, long double __x)
Definition specfun.h:656
│ │ │ -
float riemann_zetaf(float __s)
Definition specfun.h:1020
│ │ │ - │ │ │ +
__gnu_cxx::__promote< _Tp >::__type sph_bessel(unsigned int __n, _Tp __x)
Definition specfun.h:1100
│ │ │ +
long double sph_bessell(unsigned int __n, long double __x)
Definition specfun.h:1081
│ │ │ +
float betaf(float __a, float __b)
Definition specfun.h:310
│ │ │ +
long double expintl(long double __x)
Definition specfun.h:852
│ │ │ +
float cyl_bessel_jf(float __nu, float __x)
Definition specfun.h:548
│ │ │ +
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_k(_Tpnu __nu, _Tp __x)
Definition specfun.h:631
│ │ │ +
float ellint_3f(float __k, float __nu, float __phi)
Return the incomplete elliptic integral of the third kind for float argument.
Definition specfun.h:790
│ │ │ +
long double legendrel(unsigned int __l, long double __x)
Definition specfun.h:985
│ │ │ +
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:461
│ │ │ +
long double riemann_zetal(long double __s)
Definition specfun.h:1030
│ │ │ +
float cyl_bessel_kf(float __nu, float __x)
Definition specfun.h:594
│ │ │ +
float comp_ellint_2f(float __k)
Definition specfun.h:404
│ │ │ +
long double hermitel(unsigned int __n, long double __x)
Definition specfun.h:893
│ │ │ +
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_1(_Tp __k, _Tpp __phi)
Definition specfun.h:727
│ │ │ +
long double sph_legendrel(unsigned int __l, unsigned int __m, long double __theta)
Definition specfun.h:1126
│ │ │ +
float ellint_1f(float __k, float __phi)
Definition specfun.h:694
│ │ │ +
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_neumann(_Tpnu __nu, _Tp __x)
Definition specfun.h:679
│ │ │ +
float assoc_legendref(unsigned int __l, unsigned int __m, float __x)
Definition specfun.h:265
│ │ │ +
long double sph_neumannl(unsigned int __n, long double __x)
Definition specfun.h:1172
│ │ │ +
long double comp_ellint_2l(long double __k)
Definition specfun.h:414
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type comp_ellint_2(_Tp __k)
Definition specfun.h:436
│ │ │ +
float sph_besself(unsigned int __n, float __x)
Definition specfun.h:1071
│ │ │ +
long double assoc_legendrel(unsigned int __l, unsigned int __m, long double __x)
Definition specfun.h:274
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type legendre(unsigned int __l, _Tp __x)
Definition specfun.h:1005
│ │ │ +
float expintf(float __x)
Definition specfun.h:842
│ │ │ +
float ellint_2f(float __k, float __phi)
Return the incomplete elliptic integral of the second kind for float argument.
Definition specfun.h:742
│ │ │ +
__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:828
│ │ │ +
long double ellint_2l(long double __k, long double __phi)
Return the incomplete elliptic integral of the second kind .
Definition specfun.h:752
│ │ │ +
float cyl_neumannf(float __nu, float __x)
Definition specfun.h:646
│ │ │ +
__gnu_cxx::__promote_2< _Tpa, _Tpb >::__type beta(_Tpa __a, _Tpb __b)
Definition specfun.h:341
│ │ │ +
long double comp_ellint_1l(long double __k)
Definition specfun.h:366
│ │ │ +
float comp_ellint_3f(float __k, float __nu)
Return the complete elliptic integral of the third kind for float modulus k.
Definition specfun.h:451
│ │ │ +
float sph_neumannf(unsigned int __n, float __x)
Definition specfun.h:1162
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type expint(_Tp __x)
Definition specfun.h:868
│ │ │ +
long double ellint_1l(long double __k, long double __phi)
Definition specfun.h:704
│ │ │ +
float comp_ellint_1f(float __k)
Definition specfun.h:356
│ │ │ +
long double betal(long double __a, long double __b)
Definition specfun.h:320
│ │ │ +
float hermitef(unsigned int __n, float __x)
Definition specfun.h:883
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type riemann_zeta(_Tp __s)
Definition specfun.h:1056
│ │ │ +
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:800
│ │ │ +
float sph_legendref(unsigned int __l, unsigned int __m, float __theta)
Definition specfun.h:1115
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type sph_neumann(unsigned int __n, _Tp __x)
Definition specfun.h:1191
│ │ │ +
float cyl_bessel_if(float __nu, float __x)
Definition specfun.h:502
│ │ │ +
long double laguerrel(unsigned int __n, long double __x)
Definition specfun.h:941
│ │ │ +
long double cyl_bessel_il(long double __nu, long double __x)
Definition specfun.h:512
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type assoc_laguerre(unsigned int __n, unsigned int __m, _Tp __x)
Definition specfun.h:250
│ │ │ +
__gnu_cxx::__promote_2< _Tp, _Tpn >::__type comp_ellint_3(_Tp __k, _Tpn __nu)
Definition specfun.h:487
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type sph_legendre(unsigned int __l, unsigned int __m, _Tp __theta)
Definition specfun.h:1147
│ │ │ +
long double cyl_bessel_kl(long double __nu, long double __x)
Definition specfun.h:604
│ │ │ +
long double assoc_laguerrel(unsigned int __n, unsigned int __m, long double __x)
Definition specfun.h:214
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type hermite(unsigned int __n, _Tp __x)
Definition specfun.h:916
│ │ │ +
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_j(_Tpnu __nu, _Tp __x)
Definition specfun.h:579
│ │ │ +
float laguerref(unsigned int __n, float __x)
Definition specfun.h:931
│ │ │ +
long double cyl_bessel_jl(long double __nu, long double __x)
Definition specfun.h:558
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type comp_ellint_1(_Tp __k)
Definition specfun.h:389
│ │ │ +
__gnu_cxx::__promote_2< _Tp, _Tpp >::__type ellint_2(_Tp __k, _Tpp __phi)
Definition specfun.h:775
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type laguerre(unsigned int __n, _Tp __x)
Definition specfun.h:960
│ │ │ +
float legendref(unsigned int __l, float __x)
Definition specfun.h:975
│ │ │ +
__gnu_cxx::__promote_2< _Tpnu, _Tp >::__type cyl_bessel_i(_Tpnu __nu, _Tp __x)
Definition specfun.h:533
│ │ │ +
__gnu_cxx::__promote< _Tp >::__type assoc_legendre(unsigned int __l, unsigned int __m, _Tp __x)
Definition specfun.h:296
│ │ │ +
float assoc_laguerref(unsigned int __n, unsigned int __m, float __x)
Definition specfun.h:204
│ │ │ +
long double cyl_neumannl(long double __nu, long double __x)
Definition specfun.h:656
│ │ │ +
float riemann_zetaf(float __s)
Definition specfun.h:1020
│ │ │ + │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,16 +1,8 @@ │ │ │ │ libstdc++ │ │ │ │ -_M_a_c_r_o_s │ │ │ │ -tgmath.h File Reference │ │ │ │ +stdlib.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -MMaaccrrooss │ │ │ │ -#define  ___G_L_I_B_C_X_X___T_G_M_A_T_H___H │ │ │ │ -  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is a Standard C++ Library header. │ │ │ │ -Definition in file _t_g_m_a_t_h_._h. │ │ │ │ -********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? __GGLLIIBBCCXXXX__TTGGMMAATTHH__HH ********** │ │ │ │ -#define _GLIBCXX_TGMATH_H │ │ │ │ -Definition at line _4_0 of file _t_g_m_a_t_h_._h. │ │ │ │ - * _t_g_m_a_t_h_._h │ │ │ │ +Definition in file _s_t_d_l_i_b_._h. │ │ │ │ + * _s_t_d_l_i_b_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00011_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: tgmath.h Source File │ │ │ +libstdc++: stdlib.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
tgmath.h
│ │ │ +
stdlib.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- C++ -*- compatibility header.
│ │ │
2
│ │ │ -
3// Copyright (C) 2007-2023 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2002-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,38 +72,86 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file tgmath.h
│ │ │ +
25/** @file stdlib.h
│ │ │
26 * This is a Standard C++ Library header.
│ │ │
27 */
│ │ │
28
│ │ │ -
29#include <bits/c++config.h>
│ │ │ -
30
│ │ │ -
31#if __cplusplus >= 201103L
│ │ │ -
32# include <ctgmath>
│ │ │ -
33#else
│ │ │ -
34# if _GLIBCXX_HAVE_TGMATH_H
│ │ │ -
35# include_next <tgmath.h>
│ │ │ -
36# endif
│ │ │ -
37#endif
│ │ │ -
38
│ │ │ -
39#ifndef _GLIBCXX_TGMATH_H
│ │ │ -
40#define _GLIBCXX_TGMATH_H 1
│ │ │ -
41
│ │ │ -
42#endif
│ │ │ - │ │ │ - │ │ │ +
29#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS
│ │ │ +
30# include_next <stdlib.h>
│ │ │ +
31#else
│ │ │ +
32
│ │ │ +
33#ifndef _GLIBCXX_STDLIB_H
│ │ │ +
34#define _GLIBCXX_STDLIB_H 1
│ │ │ +
35
│ │ │ +
36# include <cstdlib>
│ │ │ +
37
│ │ │ +
38using std::abort;
│ │ │ +
39using std::atexit;
│ │ │ +
40using std::exit;
│ │ │ +
41#if __cplusplus >= 201103L
│ │ │ +
42# ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
│ │ │ + │ │ │ +
44# endif
│ │ │ +
45# ifdef _GLIBCXX_HAVE_QUICK_EXIT
│ │ │ +
46 using std::quick_exit;
│ │ │ +
47# endif
│ │ │ +
48# if _GLIBCXX_USE_C99_STDLIB
│ │ │ +
49 using std::_Exit;
│ │ │ +
50# endif
│ │ │ +
51#endif
│ │ │ +
52
│ │ │ +
53#if _GLIBCXX_HOSTED
│ │ │ +
54using std::div_t;
│ │ │ +
55using std::ldiv_t;
│ │ │ +
56
│ │ │ +
57using std::abs;
│ │ │ +
58using std::atof;
│ │ │ +
59using std::atoi;
│ │ │ +
60using std::atol;
│ │ │ +
61using std::bsearch;
│ │ │ +
62using std::calloc;
│ │ │ +
63using std::div;
│ │ │ +
64using std::free;
│ │ │ +
65using std::getenv;
│ │ │ +
66using std::labs;
│ │ │ +
67using std::ldiv;
│ │ │ +
68using std::malloc;
│ │ │ +
69#ifdef _GLIBCXX_HAVE_MBSTATE_T
│ │ │ +
70using std::mblen;
│ │ │ +
71using std::mbstowcs;
│ │ │ +
72using std::mbtowc;
│ │ │ +
73#endif // _GLIBCXX_HAVE_MBSTATE_T
│ │ │ +
74using std::qsort;
│ │ │ +
75using std::rand;
│ │ │ +
76using std::realloc;
│ │ │ +
77using std::srand;
│ │ │ +
78using std::strtod;
│ │ │ +
79using std::strtol;
│ │ │ +
80using std::strtoul;
│ │ │ +
81using std::system;
│ │ │ +
82#ifdef _GLIBCXX_USE_WCHAR_T
│ │ │ +
83using std::wcstombs;
│ │ │ +
84using std::wctomb;
│ │ │ +
85#endif // _GLIBCXX_USE_WCHAR_T
│ │ │ +
86#endif
│ │ │ +
87
│ │ │ +
88#endif // _GLIBCXX_STDLIB_H
│ │ │ +
89#endif // __cplusplus
│ │ │ +
_Tp abs(const complex< _Tp > &)
Return magnitude of z.
Definition complex:891
│ │ │ + │ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -tgmath.h │ │ │ │ +stdlib.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- C++ -*- compatibility header. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2007-2023 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2002-2023 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,81 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file tgmath.h │ │ │ │ +25/** @file stdlib.h │ │ │ │ 26 * This is a Standard C++ Library header. │ │ │ │ 27 */ │ │ │ │ 28 │ │ │ │ -29#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ -30 │ │ │ │ -31#if __cplusplus >= 201103L │ │ │ │ -32# include <_c_t_g_m_a_t_h> │ │ │ │ -33#else │ │ │ │ -34# if _GLIBCXX_HAVE_TGMATH_H │ │ │ │ -35# include_next │ │ │ │ -36# endif │ │ │ │ -37#endif │ │ │ │ -38 │ │ │ │ -39#ifndef _GLIBCXX_TGMATH_H │ │ │ │ -40#define _GLIBCXX_TGMATH_H 1 │ │ │ │ -41 │ │ │ │ -42#endif │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ -_c_t_g_m_a_t_h │ │ │ │ - * _t_g_m_a_t_h_._h │ │ │ │ +29#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS │ │ │ │ +30# include_next │ │ │ │ +31#else │ │ │ │ +32 │ │ │ │ +33#ifndef _GLIBCXX_STDLIB_H │ │ │ │ +34#define _GLIBCXX_STDLIB_H 1 │ │ │ │ +35 │ │ │ │ +36# include <_c_s_t_d_l_i_b> │ │ │ │ +37 │ │ │ │ +38using std::abort; │ │ │ │ +39using std::atexit; │ │ │ │ +40using std::exit; │ │ │ │ +41#if __cplusplus >= 201103L │ │ │ │ +42# ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT │ │ │ │ +43 using _s_t_d_:_:_a_t___q_u_i_c_k___e_x_i_t; │ │ │ │ +44# endif │ │ │ │ +45# ifdef _GLIBCXX_HAVE_QUICK_EXIT │ │ │ │ +46 using _s_t_d_:_:_q_u_i_c_k___e_x_i_t; │ │ │ │ +47# endif │ │ │ │ +48# if _GLIBCXX_USE_C99_STDLIB │ │ │ │ +49 using _s_t_d_:_:___E_x_i_t; │ │ │ │ +50# endif │ │ │ │ +51#endif │ │ │ │ +52 │ │ │ │ +53#if _GLIBCXX_HOSTED │ │ │ │ +54using std::div_t; │ │ │ │ +55using std::ldiv_t; │ │ │ │ +56 │ │ │ │ +57using _s_t_d_:_:_a_b_s; │ │ │ │ +58using std::atof; │ │ │ │ +59using std::atoi; │ │ │ │ +60using std::atol; │ │ │ │ +61using std::bsearch; │ │ │ │ +62using std::calloc; │ │ │ │ +63using std::div; │ │ │ │ +64using std::free; │ │ │ │ +65using std::getenv; │ │ │ │ +66using std::labs; │ │ │ │ +67using std::ldiv; │ │ │ │ +68using std::malloc; │ │ │ │ +69#ifdef _GLIBCXX_HAVE_MBSTATE_T │ │ │ │ +70using _s_t_d_:_:_m_b_l_e_n; │ │ │ │ +71using _s_t_d_:_:_m_b_s_t_o_w_c_s; │ │ │ │ +72using _s_t_d_:_:_m_b_t_o_w_c; │ │ │ │ +73#endif // _GLIBCXX_HAVE_MBSTATE_T │ │ │ │ +74using std::qsort; │ │ │ │ +75using std::rand; │ │ │ │ +76using std::realloc; │ │ │ │ +77using std::srand; │ │ │ │ +78using std::strtod; │ │ │ │ +79using std::strtol; │ │ │ │ +80using std::strtoul; │ │ │ │ +81using std::system; │ │ │ │ +82#ifdef _GLIBCXX_USE_WCHAR_T │ │ │ │ +83using std::wcstombs; │ │ │ │ +84using std::wctomb; │ │ │ │ +85#endif // _GLIBCXX_USE_WCHAR_T │ │ │ │ +86#endif │ │ │ │ +87 │ │ │ │ +88#endif // _GLIBCXX_STDLIB_H │ │ │ │ +89#endif // __cplusplus │ │ │ │ +_s_t_d_:_:_a_b_s │ │ │ │ +_Tp abs(const complex< _Tp > &) │ │ │ │ +Return magnitude of z. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_8_9_1 │ │ │ │ +_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ +DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ +_c_s_t_d_l_i_b │ │ │ │ + * _s_t_d_l_i_b_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00014.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: fenv.h File Reference │ │ │ +libstdc++: tgmath.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,27 +45,52 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
fenv.h File Reference
│ │ │ +
│ │ │ +Macros
│ │ │ +
tgmath.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ +Macros

#define _GLIBCXX_TGMATH_H
 
│ │ │

Detailed Description

│ │ │

This is a Standard C++ Library header.

│ │ │ │ │ │ -

Definition in file fenv.h.

│ │ │ -
│ │ │ +

Definition in file tgmath.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _GLIBCXX_TGMATH_H

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

Definition at line 40 of file tgmath.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,8 +1,16 @@ │ │ │ │ libstdc++ │ │ │ │ -fenv.h File Reference │ │ │ │ +_M_a_c_r_o_s │ │ │ │ +tgmath.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_G_M_A_T_H___H │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is a Standard C++ Library header. │ │ │ │ -Definition in file _f_e_n_v_._h. │ │ │ │ - * _f_e_n_v_._h │ │ │ │ +Definition in file _t_g_m_a_t_h_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTGGMMAATTHH__HH ********** │ │ │ │ +#define _GLIBCXX_TGMATH_H │ │ │ │ +Definition at line _4_0 of file _t_g_m_a_t_h_._h. │ │ │ │ + * _t_g_m_a_t_h_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00014_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: fenv.h Source File │ │ │ +libstdc++: tgmath.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,15 +45,15 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
fenv.h
│ │ │ +
tgmath.h
│ │ │
│ │ │
│ │ │ Go to the documentation of this file.
1// -*- C++ -*- compatibility header.
│ │ │
2
│ │ │
3// Copyright (C) 2007-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │ @@ -72,77 +72,38 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file fenv.h
│ │ │ +
25/** @file tgmath.h
│ │ │
26 * This is a Standard C++ Library header.
│ │ │
27 */
│ │ │
28
│ │ │ -
29#ifndef _GLIBCXX_FENV_H
│ │ │ -
30#define _GLIBCXX_FENV_H 1
│ │ │ -
31
│ │ │ -
32#pragma GCC system_header
│ │ │ -
33
│ │ │ -
34#include <bits/c++config.h>
│ │ │ -
35#if _GLIBCXX_HAVE_FENV_H
│ │ │ -
36# include_next <fenv.h>
│ │ │ +
29#include <bits/c++config.h>
│ │ │ +
30
│ │ │ +
31#if __cplusplus >= 201103L
│ │ │ +
32# include <ctgmath>
│ │ │ +
33#else
│ │ │ +
34# if _GLIBCXX_HAVE_TGMATH_H
│ │ │ +
35# include_next <tgmath.h>
│ │ │ +
36# endif
│ │ │
37#endif
│ │ │
38
│ │ │ -
39#if __cplusplus >= 201103L
│ │ │ -
40
│ │ │ -
41#if _GLIBCXX_USE_C99_FENV_TR1
│ │ │ -
42
│ │ │ -
43#undef feclearexcept
│ │ │ -
44#undef fegetexceptflag
│ │ │ -
45#undef feraiseexcept
│ │ │ -
46#undef fesetexceptflag
│ │ │ -
47#undef fetestexcept
│ │ │ -
48#undef fegetround
│ │ │ -
49#undef fesetround
│ │ │ -
50#undef fegetenv
│ │ │ -
51#undef feholdexcept
│ │ │ -
52#undef fesetenv
│ │ │ -
53#undef feupdateenv
│ │ │ -
54
│ │ │ -
55namespace std
│ │ │ -
56{
│ │ │ -
57 // types
│ │ │ -
58 using ::fenv_t;
│ │ │ -
59 using ::fexcept_t;
│ │ │ -
60
│ │ │ -
61 // functions
│ │ │ -
62 using ::feclearexcept;
│ │ │ -
63 using ::fegetexceptflag;
│ │ │ -
64 using ::feraiseexcept;
│ │ │ -
65 using ::fesetexceptflag;
│ │ │ -
66 using ::fetestexcept;
│ │ │ -
67
│ │ │ -
68 using ::fegetround;
│ │ │ -
69 using ::fesetround;
│ │ │ -
70
│ │ │ -
71 using ::fegetenv;
│ │ │ -
72 using ::feholdexcept;
│ │ │ -
73 using ::fesetenv;
│ │ │ -
74 using ::feupdateenv;
│ │ │ -
75} // namespace
│ │ │ -
76
│ │ │ -
77#endif // _GLIBCXX_USE_C99_FENV_TR1
│ │ │ -
78
│ │ │ -
79#endif // C++11
│ │ │ -
80
│ │ │ -
81#endif // _GLIBCXX_FENV_H
│ │ │ - │ │ │ -
ISO C++ entities toplevel namespace is std.
│ │ │ +
39#ifndef _GLIBCXX_TGMATH_H
│ │ │ +
40#define _GLIBCXX_TGMATH_H 1
│ │ │ +
41
│ │ │ +
42#endif
│ │ │ + │ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,9 +1,9 @@ │ │ │ │ libstdc++ │ │ │ │ -fenv.h │ │ │ │ +tgmath.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ 1// -*- C++ -*- compatibility header. │ │ │ │ 2 │ │ │ │ 3// Copyright (C) 2007-2023 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ @@ -21,69 +21,29 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file fenv.h │ │ │ │ +25/** @file tgmath.h │ │ │ │ 26 * This is a Standard C++ Library header. │ │ │ │ 27 */ │ │ │ │ 28 │ │ │ │ -29#ifndef _GLIBCXX_FENV_H │ │ │ │ -30#define _GLIBCXX_FENV_H 1 │ │ │ │ -31 │ │ │ │ -32#pragma GCC system_header │ │ │ │ -33 │ │ │ │ -34#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ -35#if _GLIBCXX_HAVE_FENV_H │ │ │ │ -36# include_next │ │ │ │ +29#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ +30 │ │ │ │ +31#if __cplusplus >= 201103L │ │ │ │ +32# include <_c_t_g_m_a_t_h> │ │ │ │ +33#else │ │ │ │ +34# if _GLIBCXX_HAVE_TGMATH_H │ │ │ │ +35# include_next │ │ │ │ +36# endif │ │ │ │ 37#endif │ │ │ │ 38 │ │ │ │ -39#if __cplusplus >= 201103L │ │ │ │ -40 │ │ │ │ -41#if _GLIBCXX_USE_C99_FENV_TR1 │ │ │ │ -42 │ │ │ │ -43#undef feclearexcept │ │ │ │ -44#undef fegetexceptflag │ │ │ │ -45#undef feraiseexcept │ │ │ │ -46#undef fesetexceptflag │ │ │ │ -47#undef fetestexcept │ │ │ │ -48#undef fegetround │ │ │ │ -49#undef fesetround │ │ │ │ -50#undef fegetenv │ │ │ │ -51#undef feholdexcept │ │ │ │ -52#undef fesetenv │ │ │ │ -53#undef feupdateenv │ │ │ │ -54 │ │ │ │ -55namespace _s_t_d │ │ │ │ -56{ │ │ │ │ -57 // types │ │ │ │ -58 using ::fenv_t; │ │ │ │ -59 using ::fexcept_t; │ │ │ │ -60 │ │ │ │ -61 // functions │ │ │ │ -62 using ::feclearexcept; │ │ │ │ -63 using ::fegetexceptflag; │ │ │ │ -64 using ::feraiseexcept; │ │ │ │ -65 using ::fesetexceptflag; │ │ │ │ -66 using ::fetestexcept; │ │ │ │ -67 │ │ │ │ -68 using ::fegetround; │ │ │ │ -69 using ::fesetround; │ │ │ │ -70 │ │ │ │ -71 using ::fegetenv; │ │ │ │ -72 using ::feholdexcept; │ │ │ │ -73 using ::fesetenv; │ │ │ │ -74 using ::feupdateenv; │ │ │ │ -75} // namespace │ │ │ │ -76 │ │ │ │ -77#endif // _GLIBCXX_USE_C99_FENV_TR1 │ │ │ │ -78 │ │ │ │ -79#endif // C++11 │ │ │ │ -80 │ │ │ │ -81#endif // _GLIBCXX_FENV_H │ │ │ │ +39#ifndef _GLIBCXX_TGMATH_H │ │ │ │ +40#define _GLIBCXX_TGMATH_H 1 │ │ │ │ +41 │ │ │ │ +42#endif │ │ │ │ _c_+_+_c_o_n_f_i_g_._h │ │ │ │ -_s_t_d │ │ │ │ -ISO C++ entities toplevel namespace is std. │ │ │ │ - * _f_e_n_v_._h │ │ │ │ +_c_t_g_m_a_t_h │ │ │ │ + * _t_g_m_a_t_h_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00017.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: complex.h File Reference │ │ │ +libstdc++: stdatomic.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,52 +45,27 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
│ │ │ -Macros
│ │ │ -
complex.h File Reference
│ │ │ +
stdatomic.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Macros

#define _GLIBCXX_COMPLEX_H
 
│ │ │

Detailed Description

│ │ │

This is a Standard C++ Library header.

│ │ │ │ │ │ -

Definition in file complex.h.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _GLIBCXX_COMPLEX_H

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define _GLIBCXX_COMPLEX_H
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 46 of file complex.h.

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

Definition in file stdatomic.h.

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

Go to the source code of this file.

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

│ │ │ Namespaces

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

│ │ │ -Functions

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

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file hash_bytes.h.

│ │ │ +

Definition in file valarray_before.h.

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

Go to the source code of this file.

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

│ │ │ Classes

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

│ │ │ Namespaces

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

│ │ │ Functions

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

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file exception_ptr.h.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _GLIBCXX_EH_PTR_USED

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

Definition at line 47 of file exception_ptr.h.

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

Definition in file stl_stack.h.

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

Go to the source code of this file.

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

│ │ │ +Namespaces

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

│ │ │ Macros

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

│ │ │ +Functions

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

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file exception_defines.h.

│ │ │ +

Definition in file stl_numeric.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ __catch

│ │ │ + │ │ │ +

◆ _GLIBCXX_MOVE_IF_20

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

Definition at line 41 of file exception_defines.h.

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

◆ __throw_exception_again

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

Definition at line 42 of file exception_defines.h.

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

◆ __try

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

Definition at line 40 of file exception_defines.h.

│ │ │ +

Definition at line 112 of file stl_numeric.h.

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

Go to the source code of this file.

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

│ │ │ -Classes

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

│ │ │ Namespaces

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

│ │ │ +Functions

template<typename _Out_iter , typename _Bi_iter , typename _Rx_traits , typename _Ch_type >
_Out_iter std::__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)
 
│ │ │

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file exception.h.

│ │ │ +

Definition in file regex.tcc.

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

Go to the source code of this file.

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

│ │ │ Namespaces

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

│ │ │ -Macros

#define _GLIBCXX_CDTOR_CALLABI
 
#define _GLIBCXX_HAVE_CDTOR_CALLABI
 

5.1 Regular Expression Syntax Options

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

│ │ │ -Functions

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

5.2 Matching Rules

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

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

Detailed Description

│ │ │ -

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

│ │ │ - │ │ │ -

Definition in file cxxabi_init_exception.h.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _GLIBCXX_CDTOR_CALLABI

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

Constant definitions for the std regex library.

│ │ │ +

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

│ │ │ │ │ │ -

Definition at line 42 of file cxxabi_init_exception.h.

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

◆ _GLIBCXX_HAVE_CDTOR_CALLABI

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

Definition at line 43 of file cxxabi_init_exception.h.

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

Definition in file regex_constants.h.

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

Go to the source code of this file.

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

│ │ │ -Classes

class  __cxxabiv1::__forced_unwind

│ │ │ +Namespaces

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

│ │ │ +Macros

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

│ │ │ +Functions

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

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ + │ │ │ +

Definition in file boost_concept_check.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _GLIBCXX_CLASS_REQUIRES

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

Definition at line 89 of file boost_concept_check.h.

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

◆ _GLIBCXX_CLASS_REQUIRES2

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

Definition at line 97 of file boost_concept_check.h.

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

◆ _GLIBCXX_CLASS_REQUIRES3

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

Definition at line 105 of file boost_concept_check.h.

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

◆ _GLIBCXX_CLASS_REQUIRES4

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

Definition in file cxxabi_forced.h.

│ │ │ -
│ │ │ +

Definition at line 113 of file boost_concept_check.h.

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

◆ _GLIBCXX_DEFINE_BINARY_OPERATOR_CONSTRAINT

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

Definition at line 301 of file boost_concept_check.h.

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

◆ _GLIBCXX_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT

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

Definition at line 290 of file boost_concept_check.h.

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

◆ _IsUnused

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

Definition at line 70 of file boost_concept_check.h.

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

Go to the source code of this file.

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

│ │ │ +Namespaces

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

│ │ │ Macros

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

│ │ │ +Functions

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

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file atomic_lockfree_defines.h.

│ │ │ -
│ │ │ +

Definition in file valarray_array.tcc.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _VALARRAY_ARRAY_TCC

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

Definition at line 33 of file valarray_array.tcc.

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

Go to the source code of this file.

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

│ │ │ +Classes

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

│ │ │ Namespaces

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

│ │ │ -Macros

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

│ │ │ -Functions

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

Detailed Description

│ │ │ -

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

│ │ │ - │ │ │ -

Definition in file valarray_after.h.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _DEFINE_EXPR_BINARY_FUNCTION

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

Definition at line 462 of file valarray_after.h.

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

◆ _DEFINE_EXPR_BINARY_OPERATOR

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

Definition at line 340 of file valarray_after.h.

│ │ │ +

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

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

◆ _DEFINE_EXPR_UNARY_FUNCTION

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

Definition at line 426 of file valarray_after.h.

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

◆ _DEFINE_EXPR_UNARY_OPERATOR

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

Definition at line 325 of file valarray_after.h.

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

Definition in file unique_lock.h.

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

Go to the source code of this file.

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

│ │ │ Namespaces

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

│ │ │ +Macros

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

│ │ │ +Functions

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

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ + │ │ │ +

Definition in file specfun.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ __cpp_lib_math_special_functions

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

Definition at line 37 of file specfun.h.

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

◆ __STDCPP_MATH_SPEC_FUNCS__

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

Definition in file valarray_before.h.

│ │ │ -
│ │ │ +

Definition at line 35 of file specfun.h.

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

Go to the source code of this file.

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

│ │ │ Namespaces

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

│ │ │ Macros

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

│ │ │ Functions

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

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file valarray_array.tcc.

│ │ │ +

Definition in file cxxabi_init_exception.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _VALARRAY_ARRAY_TCC

│ │ │ + │ │ │ +

◆ _GLIBCXX_CDTOR_CALLABI

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

Definition at line 33 of file valarray_array.tcc.

│ │ │ +

Definition at line 42 of file cxxabi_init_exception.h.

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

◆ _GLIBCXX_HAVE_CDTOR_CALLABI

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

Definition at line 43 of file cxxabi_init_exception.h.

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

Go to the source code of this file.

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

│ │ │ +Classes

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

│ │ │ Namespaces

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

│ │ │ -Macros

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

│ │ │ Functions

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

Detailed Description

│ │ │ -

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

│ │ │ - │ │ │ -

Definition in file valarray_array.h.

│ │ │ -

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _DEFINE_ARRAY_FUNCTION

│ │ │ +

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

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

Definition at line 511 of file valarray_array.h.

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

Definition in file stl_queue.h.

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

Go to the source code of this file.

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

│ │ │ Classes

class  std::unordered_multiset< _Value, _Hash, _Pred, _Alloc >
class  std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >
 
class  std::unordered_set< _Value, _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 _Value , typename _Hash = hash<_Value>, typename _Pred = std::equal_to<_Value>, typename _Alloc = std::allocator<_Value>, typename _Tr = __umset_traits<__cache_default<_Value, _Hash>::value>>
using std::__umset_hashtable = _Hashtable< _Value, _Value, _Alloc, __detail::_Identity, _Pred, _Hash, __detail::_Mod_range_hashing, __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr >
 
template<bool _Cache>
using std::__umset_traits = __detail::_Hashtable_traits< _Cache, true, false >
 
template<typename _Value , typename _Hash = hash<_Value>, typename _Pred = std::equal_to<_Value>, typename _Alloc = std::allocator<_Value>, typename _Tr = __uset_traits<__cache_default<_Value, _Hash>::value>>
using std::__uset_hashtable = _Hashtable< _Value, _Value, _Alloc, __detail::_Identity, _Pred, _Hash, __detail::_Mod_range_hashing, __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr >
 
template<bool _Cache>
using std::__uset_traits = __detail::_Hashtable_traits< _Cache, true, true >
 
template<typename _Key , typename _Tp , typename _Hash = hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<std::pair<const _Key, _Tp> >, typename _Tr = __umap_traits<__cache_default<_Key, _Hash>::value>>
using std::__umap_hashtable = _Hashtable< _Key, std::pair< const _Key, _Tp >, _Alloc, __detail::_Select1st, _Pred, _Hash, __detail::_Mod_range_hashing, __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr >
 
template<bool _Cache>
using std::__umap_traits = __detail::_Hashtable_traits< _Cache, false, true >
 
template<typename _Key , typename _Tp , typename _Hash = hash<_Key>, typename _Pred = std::equal_to<_Key>, typename _Alloc = std::allocator<std::pair<const _Key, _Tp> >, typename _Tr = __ummap_traits<__cache_default<_Key, _Hash>::value>>
using std::__ummap_hashtable = _Hashtable< _Key, std::pair< const _Key, _Tp >, _Alloc, __detail::_Select1st, _Pred, _Hash, __detail::_Mod_range_hashing, __detail::_Default_ranged_hash, __detail::_Prime_rehash_policy, _Tr >
 
template<bool _Cache>
using std::__ummap_traits = __detail::_Hashtable_traits< _Cache, false, false >
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ Functions

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

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ __cpp_lib_unordered_map_try_emplace

│ │ │ │ │ │ -

Definition in file unordered_set.h.

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

Definition at line 453 of file unordered_map.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,160 +1,203 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -unordered_set.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +unordered_map.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -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___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___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___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<_t_y_p_e_n_a_m_e _Value , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Value>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -std::equal_to<_Value>, _t_y_p_e_n_a_m_e _Alloc = std::allocator<_Value>, _t_y_p_e_n_a_m_e ___T_r = │ │ │ │ -__umset_traits<__cache_default<_Value, _Hash>::value>> │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_m_s_e_t___h_a_s_h_t_a_b_l_e = _Hashtable< _Value, _Value, _Alloc, __detail:: │ │ │ │ - _Identity, ___P_r_e_d, ___H_a_s_h, __detail::_Mod_range_hashing, __detail:: │ │ │ │ - _Default_ranged_hash, __detail::_Prime_rehash_policy, ___T_r > │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ +___P_r_e_d = std::equal_to<_Key>, _t_y_p_e_n_a_m_e _Alloc = std::allocator >, _t_y_p_e_n_a_m_e ___T_r = __umap_traits<__cache_default<_Key, _Hash>:: │ │ │ │ +value>> │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_____u_m_a_p___h_a_s_h_t_a_b_l_e = _Hashtable< ___K_e_y, _s_t_d_:_:_p_a_i_r< const ___K_e_y, _Tp >, │ │ │ │ + _Alloc, __detail::_Select1st, ___P_r_e_d, ___H_a_s_h, __detail:: │ │ │ │ + _Mod_range_hashing, __detail::_Default_ranged_hash, __detail:: │ │ │ │ + _Prime_rehash_policy, ___T_r > │ │ │ │   │ │ │ │ template │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_m_s_e_t___t_r_a_i_t_s = __detail::_Hashtable_traits< ___C_a_c_h_e, _t_r_u_e, _f_a_l_s_e > │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_____u_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits< ___C_a_c_h_e, _f_a_l_s_e, _t_r_u_e > │ │ │ │   │ │ │ │ -template<_t_y_p_e_n_a_m_e _Value , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Value>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -std::equal_to<_Value>, _t_y_p_e_n_a_m_e _Alloc = std::allocator<_Value>, _t_y_p_e_n_a_m_e ___T_r = │ │ │ │ -__uset_traits<__cache_default<_Value, _Hash>::value>> │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_s_e_t___h_a_s_h_t_a_b_l_e = _Hashtable< _Value, _Value, _Alloc, __detail:: │ │ │ │ - _Identity, ___P_r_e_d, ___H_a_s_h, __detail::_Mod_range_hashing, __detail:: │ │ │ │ - _Default_ranged_hash, __detail::_Prime_rehash_policy, ___T_r > │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ +___P_r_e_d = std::equal_to<_Key>, _t_y_p_e_n_a_m_e _Alloc = std::allocator >, _t_y_p_e_n_a_m_e ___T_r = __ummap_traits<__cache_default<_Key, _Hash>:: │ │ │ │ +value>> │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_____u_m_m_a_p___h_a_s_h_t_a_b_l_e = _Hashtable< ___K_e_y, _s_t_d_:_:_p_a_i_r< const ___K_e_y, _Tp >, │ │ │ │ + _Alloc, __detail::_Select1st, ___P_r_e_d, ___H_a_s_h, __detail:: │ │ │ │ + _Mod_range_hashing, __detail::_Default_ranged_hash, __detail:: │ │ │ │ + _Prime_rehash_policy, ___T_r > │ │ │ │   │ │ │ │ template │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_s_e_t___t_r_a_i_t_s = __detail::_Hashtable_traits< ___C_a_c_h_e, _t_r_u_e, _t_r_u_e > │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_____u_m_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits< ___C_a_c_h_e, _f_a_l_s_e, _f_a_l_s_e │ │ │ │ + > │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template<_c_l_a_s_s _Value , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > │ │ │ │ - &__x, const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s _Value , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _u_n_o_r_d_e_r_e_d___s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > │ │ │ │ - &__x, const _u_n_o_r_d_e_r_e_d___s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s _Value , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_s_w_a_p (_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > &__x, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) noexcept │ │ │ │ +template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > │ │ │ │ + &__x, const _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) │ │ │ │ +  │ │ │ │ +template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, │ │ │ │ + _Alloc > &__x, const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc │ │ │ │ + > &__y) │ │ │ │ +  │ │ │ │ +template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_s_w_a_p (_u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__x, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) noexcept(noexcept │ │ │ │ + (__x.swap(__y))) │ │ │ │ +  │ │ │ │ +template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_s_w_a_p (_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__x, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) noexcept │ │ │ │ (noexcept(__x.swap(__y))) │ │ │ │   │ │ │ │ -template<_c_l_a_s_s _Value , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_s_w_a_p (_u_n_o_r_d_e_r_e_d___s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > &__x, │ │ │ │ - _u_n_o_r_d_e_r_e_d___s_e_t< _Value, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) noexcept(noexcept │ │ │ │ - (__x.swap(__y))) │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< │ │ │ │ + _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │   │ │ │ │ template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiisseett (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< int >::size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< │ │ │ │ - _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type, _h_a_s_h< _t_y_p_e_n_a_m_e │ │ │ │ - _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type >, _e_q_u_a_l___t_o< _t_y_p_e_n_a_m_e │ │ │ │ - _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _t_y_p_e_n_a_m_e │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_a_p< │ │ │ │ + _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< │ │ │ │ + _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r │ │ │ │ + > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │   │ │ │ │ template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ _t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiisseett (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >:: │ │ │ │ - value_type, ___H_a_s_h, _e_q_u_a_l___t_o< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >:: │ │ │ │ - value_type >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h = hash::value_type>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -equal_to::value_type>, _t_y_p_e_n_a_m_e │ │ │ │ -___A_l_l_o_c_a_t_o_r = allocator::value_type>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _t_y_p_e_n_a_m_e │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, _e_q_u_a_l___t_o< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, │ │ │ │ + ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h = │ │ │ │ +hash<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ +equal_to<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = │ │ │ │ +allocator<__iter_to_alloc_t<_InputIterator>>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Pred>, │ │ │ │ _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiisseett (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), │ │ │ │ - ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type, ___H_a_s_h, ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiisseett (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _Tp >, _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< int │ │ │ │ - >::size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _Tp, _h_a_s_h< _Tp >, │ │ │ │ - _e_q_u_a_l___t_o< _Tp >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _t_y_p_e_n_a_m_e │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), │ │ │ │ + ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r │ │ │ │ + >, __iter_val_t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, _t_y_p_e_n_a_m_e │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, │ │ │ │ + _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ +_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, _t_y_p_e_n_a_m_e │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ +___P_r_e_d = equal_to<_Key>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = allocator>, │ │ │ │ +_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireNotAllocator<_Pred>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, _t_y_p_e_n_a_m_e │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), │ │ │ │ + ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, │ │ │ │ + ___A_l_l_o_c_a_t_o_r > │ │ │ │   │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiisseett (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _Tp >, _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< int │ │ │ │ - >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _Tp, ___H_a_s_h, │ │ │ │ - _e_q_u_a_l___t_o< _Tp >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Tp>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -equal_to<_Tp>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = allocator<_Tp>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Pred>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiisseett (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _Tp >, _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< int │ │ │ │ - >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t< _Tp, ___H_a_s_h, ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< │ │ │ │ + _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │   │ │ │ │ template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__sseett (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _u_n_o_r_d_e_r_e_d___s_e_t< int │ │ │ │ - >::size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___s_e_t< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type, _h_a_s_h< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type >, _e_q_u_a_l___t_o< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< │ │ │ │ + _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │   │ │ │ │ template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ _t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__sseett (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _u_n_o_r_d_e_r_e_d___s_e_t< int │ │ │ │ - >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___s_e_t< _t_y_p_e_n_a_m_e │ │ │ │ - _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type, ___H_a_s_h, _e_q_u_a_l___t_o< _t_y_p_e_n_a_m_e │ │ │ │ - _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h = hash::value_type>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -equal_to::value_type>, _t_y_p_e_n_a_m_e │ │ │ │ -___A_l_l_o_c_a_t_o_r = allocator::value_type>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Pred>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__sseett (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _u_n_o_r_d_e_r_e_d___s_e_t< int │ │ │ │ - >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___s_e_t< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type, │ │ │ │ - ___H_a_s_h, ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__sseett (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _Tp >, _u_n_o_r_d_e_r_e_d___s_e_t< int >:: │ │ │ │ - size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___s_e_t< _Tp, _h_a_s_h< _Tp >, _e_q_u_a_l___t_o< _Tp │ │ │ │ - >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__sseett (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _Tp >, _u_n_o_r_d_e_r_e_d___s_e_t< int >:: │ │ │ │ - size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___s_e_t< _Tp, ___H_a_s_h, _e_q_u_a_l___t_o< _Tp │ │ │ │ - >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Tp>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -equal_to<_Tp>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = allocator<_Tp>, _t_y_p_e_n_a_m_e = │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, _e_q_u_a_l___t_o< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, │ │ │ │ + ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h = │ │ │ │ +hash<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ +equal_to<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = │ │ │ │ +allocator<__iter_to_alloc_t<_InputIterator>>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Pred>, │ │ │ │ _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__sseett (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _Tp >, _u_n_o_r_d_e_r_e_d___s_e_t< int >:: │ │ │ │ - size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___s_e_t< _Tp, ___H_a_s_h, ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d │ │ │ │ + (), ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< │ │ │ │ + ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, ___P_r_e_d, │ │ │ │ + ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ + ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< │ │ │ │ + ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< ___K_e_y >, │ │ │ │ + ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ +_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ + > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ +___P_r_e_d = equal_to<_Key>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = allocator>, │ │ │ │ +_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireNotAllocator<_Pred>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ + _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d │ │ │ │ + (), ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, │ │ │ │ + ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -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 _u_n_o_r_d_e_r_e_d___m_a_p_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__uunnoorrddeerreedd__mmaapp__ttrryy__eemmppllaaccee ********** │ │ │ │ +#define __cpp_lib_unordered_map_try_emplace │ │ │ │ +Definition at line _4_5_3 of file _u_n_o_r_d_e_r_e_d___m_a_p_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_o_r_d_e_r_e_d___s_e_t_._h │ │ │ │ + * _u_n_o_r_d_e_r_e_d___m_a_p_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00362.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,4 @@ │ │ │ │ var a00362 = [ │ │ │ │ - ["__umset_traits", "a00362.html#a82ea41b760d4cfe35fb4ce095415a24a", null], │ │ │ │ - ["__uset_traits", "a00362.html#a39fcc5869a652c651d6911a64a020e21", null] │ │ │ │ + ["__umap_traits", "a00362.html#a84b02064179c0ef21d0189a7bf15803b", null], │ │ │ │ + ["__ummap_traits", "a00362.html#a1a55f2ace43a0a61a859367d227d245f", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00362_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unordered_set.h Source File │ │ │ +libstdc++: unordered_map.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,18 +45,18 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
unordered_set.h
│ │ │ +
unordered_map.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// unordered_set implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// unordered_map implementation -*- C++ -*-
│ │ │
2
│ │ │
3// Copyright (C) 2010-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │ @@ -72,2303 +72,2672 @@ │ │ │
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/unordered_map.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{unordered_map}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _UNORDERED_SET_H
│ │ │ -
31#define _UNORDERED_SET_H
│ │ │ +
30#ifndef _UNORDERED_MAP_H
│ │ │ +
31#define _UNORDERED_MAP_H
│ │ │
32
│ │ │
33#include <bits/hashtable.h>
│ │ │ -
34#include <bits/allocator.h>
│ │ │ -
35#include <bits/functional_hash.h> // hash
│ │ │ -
36#include <bits/stl_function.h> // equal_to
│ │ │ +
34#include <bits/allocator.h>
│ │ │ +
35#include <bits/functional_hash.h> // hash
│ │ │ +
36#include <bits/stl_function.h> // equal_to
│ │ │
37
│ │ │
38namespace std _GLIBCXX_VISIBILITY(default)
│ │ │
39{
│ │ │
40_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │
41_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
│ │ │
42
│ │ │ -
43 /// Base types for unordered_set.
│ │ │ +
43 /// Base types for unordered_map.
│ │ │
44 template<bool _Cache>
│ │ │ -
45 using __uset_traits = __detail::_Hashtable_traits<_Cache, true, true>;
│ │ │ +
45 using __umap_traits = __detail::_Hashtable_traits<_Cache, false, true>;
│ │ │
46
│ │ │ -
47 template<typename _Value,
│ │ │ -
48 typename _Hash = hash<_Value>,
│ │ │ - │ │ │ -
50 typename _Alloc = std::allocator<_Value>,
│ │ │ - │ │ │ -
52 using __uset_hashtable = _Hashtable<_Value, _Value, _Alloc,
│ │ │ -
53 __detail::_Identity, _Pred, _Hash,
│ │ │ -
54 __detail::_Mod_range_hashing,
│ │ │ -
55 __detail::_Default_ranged_hash,
│ │ │ -
56 __detail::_Prime_rehash_policy, _Tr>;
│ │ │ -
57
│ │ │ -
58 /// Base types for unordered_multiset.
│ │ │ -
59 template<bool _Cache>
│ │ │ -
60 using __umset_traits = __detail::_Hashtable_traits<_Cache, true, false>;
│ │ │ -
61
│ │ │ -
62 template<typename _Value,
│ │ │ -
63 typename _Hash = hash<_Value>,
│ │ │ - │ │ │ -
65 typename _Alloc = std::allocator<_Value>,
│ │ │ - │ │ │ -
67 using __umset_hashtable = _Hashtable<_Value, _Value, _Alloc,
│ │ │ -
68 __detail::_Identity,
│ │ │ -
69 _Pred, _Hash,
│ │ │ -
70 __detail::_Mod_range_hashing,
│ │ │ -
71 __detail::_Default_ranged_hash,
│ │ │ -
72 __detail::_Prime_rehash_policy, _Tr>;
│ │ │ -
73
│ │ │ -
74 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ - │ │ │ -
76
│ │ │ -
77 /**
│ │ │ -
78 * @brief A standard container composed of unique keys (containing
│ │ │ -
79 * at most one of each key value) in which the elements' keys are
│ │ │ -
80 * the elements themselves.
│ │ │ -
81 *
│ │ │ -
82 * @ingroup unordered_associative_containers
│ │ │ -
83 * @headerfile unordered_set
│ │ │ -
84 * @since C++11
│ │ │ -
85 *
│ │ │ -
86 * @tparam _Value Type of key objects.
│ │ │ -
87 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ -
88
│ │ │ -
89 * @tparam _Pred Predicate function object type, defaults to
│ │ │ -
90 * equal_to<_Value>.
│ │ │ -
91 *
│ │ │ -
92 * @tparam _Alloc Allocator type, defaults to allocator<_Key>.
│ │ │ -
93 *
│ │ │ -
94 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ -
95 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ +
47 template<typename _Key,
│ │ │ +
48 typename _Tp,
│ │ │ +
49 typename _Hash = hash<_Key>,
│ │ │ +
50 typename _Pred = std::equal_to<_Key>,
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
54 _Alloc, __detail::_Select1st,
│ │ │ +
55 _Pred, _Hash,
│ │ │ +
56 __detail::_Mod_range_hashing,
│ │ │ +
57 __detail::_Default_ranged_hash,
│ │ │ +
58 __detail::_Prime_rehash_policy, _Tr>;
│ │ │ +
59
│ │ │ +
60 /// Base types for unordered_multimap.
│ │ │ +
61 template<bool _Cache>
│ │ │ +
62 using __ummap_traits = __detail::_Hashtable_traits<_Cache, false, false>;
│ │ │ +
63
│ │ │ +
64 template<typename _Key,
│ │ │ +
65 typename _Tp,
│ │ │ +
66 typename _Hash = hash<_Key>,
│ │ │ +
67 typename _Pred = std::equal_to<_Key>,
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
71 _Alloc, __detail::_Select1st,
│ │ │ +
72 _Pred, _Hash,
│ │ │ +
73 __detail::_Mod_range_hashing,
│ │ │ +
74 __detail::_Default_ranged_hash,
│ │ │ +
75 __detail::_Prime_rehash_policy, _Tr>;
│ │ │ +
76
│ │ │ +
77 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ + │ │ │ +
79
│ │ │ +
80 /**
│ │ │ +
81 * @brief A standard container composed of unique keys (containing
│ │ │ +
82 * at most one of each key value) that associates values of another type
│ │ │ +
83 * with the keys.
│ │ │ +
84 *
│ │ │ +
85 * @ingroup unordered_associative_containers
│ │ │ +
86 * @headerfile unordered_map
│ │ │ +
87 * @since C++11
│ │ │ +
88 *
│ │ │ +
89 * @tparam _Key Type of key objects.
│ │ │ +
90 * @tparam _Tp Type of mapped objects.
│ │ │ +
91 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ +
92 * @tparam _Pred Predicate function object type, defaults
│ │ │ +
93 * to equal_to<_Value>.
│ │ │ +
94 * @tparam _Alloc Allocator type, defaults to
│ │ │ +
95 * std::allocator<std::pair<const _Key, _Tp>>.
│ │ │
96 *
│ │ │ -
97 * Base is _Hashtable, dispatched at compile time via template
│ │ │ -
98 * alias __uset_hashtable.
│ │ │ -
99 */
│ │ │ -
100 template<typename _Value,
│ │ │ -
101 typename _Hash = hash<_Value>,
│ │ │ -
102 typename _Pred = equal_to<_Value>,
│ │ │ -
103 typename _Alloc = allocator<_Value>>
│ │ │ -
│ │ │ - │ │ │ -
105 {
│ │ │ - │ │ │ -
107 _Hashtable _M_h;
│ │ │ -
108
│ │ │ -
109 public:
│ │ │ -
110 // typedefs:
│ │ │ -
111 ///@{
│ │ │ -
112 /// Public typedefs.
│ │ │ -
113 typedef typename _Hashtable::key_type key_type;
│ │ │ -
114 typedef typename _Hashtable::value_type value_type;
│ │ │ -
115 typedef typename _Hashtable::hasher hasher;
│ │ │ -
116 typedef typename _Hashtable::key_equal key_equal;
│ │ │ -
117 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ -
118 ///@}
│ │ │ -
119
│ │ │ -
120 ///@{
│ │ │ -
121 /// Iterator-related typedefs.
│ │ │ -
122 typedef typename _Hashtable::pointer pointer;
│ │ │ -
123 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ -
124 typedef typename _Hashtable::reference reference;
│ │ │ -
125 typedef typename _Hashtable::const_reference const_reference;
│ │ │ -
126 typedef typename _Hashtable::iterator iterator;
│ │ │ -
127 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ -
128 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ -
129 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ -
130 typedef typename _Hashtable::size_type size_type;
│ │ │ -
131 typedef typename _Hashtable::difference_type difference_type;
│ │ │ -
132 ///@}
│ │ │ -
133
│ │ │ -
134#if __cplusplus > 201402L
│ │ │ -
135 using node_type = typename _Hashtable::node_type;
│ │ │ -
136 using insert_return_type = typename _Hashtable::insert_return_type;
│ │ │ -
137#endif
│ │ │ -
138
│ │ │ -
139 // construct/destroy/copy
│ │ │ -
140
│ │ │ -
141 /// Default constructor.
│ │ │ -
142 unordered_set() = default;
│ │ │ -
143
│ │ │ -
144 /**
│ │ │ -
145 * @brief Default constructor creates no elements.
│ │ │ -
146 * @param __n Minimal initial number of buckets.
│ │ │ -
147 * @param __hf A hash functor.
│ │ │ -
148 * @param __eql A key equality functor.
│ │ │ -
149 * @param __a An allocator object.
│ │ │ -
150 */
│ │ │ -
151 explicit
│ │ │ -
│ │ │ - │ │ │ -
153 const hasher& __hf = hasher(),
│ │ │ -
154 const key_equal& __eql = key_equal(),
│ │ │ -
155 const allocator_type& __a = allocator_type())
│ │ │ -
156 : _M_h(__n, __hf, __eql, __a)
│ │ │ -
157 { }
│ │ │ -
│ │ │ -
158
│ │ │ -
159 /**
│ │ │ -
160 * @brief Builds an %unordered_set from a range.
│ │ │ -
161 * @param __first An input iterator.
│ │ │ -
162 * @param __last An input iterator.
│ │ │ -
163 * @param __n Minimal initial number of buckets.
│ │ │ -
164 * @param __hf A hash functor.
│ │ │ -
165 * @param __eql A key equality functor.
│ │ │ -
166 * @param __a An allocator object.
│ │ │ -
167 *
│ │ │ -
168 * Create an %unordered_set consisting of copies of the elements from
│ │ │ -
169 * [__first,__last). This is linear in N (where N is
│ │ │ -
170 * distance(__first,__last)).
│ │ │ -
171 */
│ │ │ -
172 template<typename _InputIterator>
│ │ │ -
│ │ │ - │ │ │ -
174 size_type __n = 0,
│ │ │ -
175 const hasher& __hf = hasher(),
│ │ │ -
176 const key_equal& __eql = key_equal(),
│ │ │ -
177 const allocator_type& __a = allocator_type())
│ │ │ -
178 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ -
179 { }
│ │ │ -
│ │ │ -
180
│ │ │ -
181 /// Copy constructor.
│ │ │ -
182 unordered_set(const unordered_set&) = default;
│ │ │ -
183
│ │ │ -
184 /// Move constructor.
│ │ │ - │ │ │ +
97 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ +
98 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ +
99 *
│ │ │ +
100 * The resulting value type of the container is std::pair<const _Key, _Tp>.
│ │ │ +
101 *
│ │ │ +
102 * Base is _Hashtable, dispatched at compile time via template
│ │ │ +
103 * alias __umap_hashtable.
│ │ │ +
104 */
│ │ │ +
105 template<typename _Key, typename _Tp,
│ │ │ +
106 typename _Hash = hash<_Key>,
│ │ │ +
107 typename _Pred = equal_to<_Key>,
│ │ │ +
108 typename _Alloc = allocator<std::pair<const _Key, _Tp>>>
│ │ │ +
│ │ │ + │ │ │ +
110 {
│ │ │ + │ │ │ +
112 _Hashtable _M_h;
│ │ │ +
113
│ │ │ +
114 public:
│ │ │ +
115 // typedefs:
│ │ │ +
116 ///@{
│ │ │ +
117 /// Public typedefs.
│ │ │ +
118 typedef typename _Hashtable::key_type key_type;
│ │ │ +
119 typedef typename _Hashtable::value_type value_type;
│ │ │ +
120 typedef typename _Hashtable::mapped_type mapped_type;
│ │ │ +
121 typedef typename _Hashtable::hasher hasher;
│ │ │ +
122 typedef typename _Hashtable::key_equal key_equal;
│ │ │ +
123 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ +
124 ///@}
│ │ │ +
125
│ │ │ +
126 ///@{
│ │ │ +
127 /// Iterator-related typedefs.
│ │ │ +
128 typedef typename _Hashtable::pointer pointer;
│ │ │ +
129 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ +
130 typedef typename _Hashtable::reference reference;
│ │ │ +
131 typedef typename _Hashtable::const_reference const_reference;
│ │ │ +
132 typedef typename _Hashtable::iterator iterator;
│ │ │ +
133 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ +
134 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ +
135 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ +
136 typedef typename _Hashtable::size_type size_type;
│ │ │ +
137 typedef typename _Hashtable::difference_type difference_type;
│ │ │ +
138 ///@}
│ │ │ +
139
│ │ │ +
140#if __cplusplus > 201402L
│ │ │ +
141 using node_type = typename _Hashtable::node_type;
│ │ │ +
142 using insert_return_type = typename _Hashtable::insert_return_type;
│ │ │ +
143#endif
│ │ │ +
144
│ │ │ +
145 //construct/destroy/copy
│ │ │ +
146
│ │ │ +
147 /// Default constructor.
│ │ │ +
148 unordered_map() = default;
│ │ │ +
149
│ │ │ +
150 /**
│ │ │ +
151 * @brief Default constructor creates no elements.
│ │ │ +
152 * @param __n Minimal initial number of buckets.
│ │ │ +
153 * @param __hf A hash functor.
│ │ │ +
154 * @param __eql A key equality functor.
│ │ │ +
155 * @param __a An allocator object.
│ │ │ +
156 */
│ │ │ +
157 explicit
│ │ │ +
│ │ │ + │ │ │ +
159 const hasher& __hf = hasher(),
│ │ │ +
160 const key_equal& __eql = key_equal(),
│ │ │ +
161 const allocator_type& __a = allocator_type())
│ │ │ +
162 : _M_h(__n, __hf, __eql, __a)
│ │ │ +
163 { }
│ │ │ +
│ │ │ +
164
│ │ │ +
165 /**
│ │ │ +
166 * @brief Builds an %unordered_map from a range.
│ │ │ +
167 * @param __first An input iterator.
│ │ │ +
168 * @param __last An input iterator.
│ │ │ +
169 * @param __n Minimal initial number of buckets.
│ │ │ +
170 * @param __hf A hash functor.
│ │ │ +
171 * @param __eql A key equality functor.
│ │ │ +
172 * @param __a An allocator object.
│ │ │ +
173 *
│ │ │ +
174 * Create an %unordered_map consisting of copies of the elements from
│ │ │ +
175 * [__first,__last). This is linear in N (where N is
│ │ │ +
176 * distance(__first,__last)).
│ │ │ +
177 */
│ │ │ +
178 template<typename _InputIterator>
│ │ │ +
│ │ │ + │ │ │ +
180 size_type __n = 0,
│ │ │ +
181 const hasher& __hf = hasher(),
│ │ │ +
182 const key_equal& __eql = key_equal(),
│ │ │ +
183 const allocator_type& __a = allocator_type())
│ │ │ +
184 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ +
185 { }
│ │ │ +
│ │ │
186
│ │ │ -
187 /**
│ │ │ -
188 * @brief Creates an %unordered_set with no elements.
│ │ │ -
189 * @param __a An allocator object.
│ │ │ -
190 */
│ │ │ -
191 explicit
│ │ │ -
│ │ │ - │ │ │ -
193 : _M_h(__a)
│ │ │ -
194 { }
│ │ │ -
│ │ │ -
195
│ │ │ -
196 /*
│ │ │ -
197 * @brief Copy constructor with allocator argument.
│ │ │ -
198 * @param __uset Input %unordered_set to copy.
│ │ │ -
199 * @param __a An allocator object.
│ │ │ -
200 */
│ │ │ - │ │ │ -
202 const allocator_type& __a)
│ │ │ -
203 : _M_h(__uset._M_h, __a)
│ │ │ -
204 { }
│ │ │ -
205
│ │ │ -
206 /*
│ │ │ -
207 * @brief Move constructor with allocator argument.
│ │ │ -
208 * @param __uset Input %unordered_set to move.
│ │ │ -
209 * @param __a An allocator object.
│ │ │ -
210 */
│ │ │ - │ │ │ -
212 const allocator_type& __a)
│ │ │ -
213 noexcept( noexcept(_Hashtable(std::move(__uset._M_h), __a)) )
│ │ │ -
214 : _M_h(std::move(__uset._M_h), __a)
│ │ │ -
215 { }
│ │ │ -
216
│ │ │ -
217 /**
│ │ │ -
218 * @brief Builds an %unordered_set from an initializer_list.
│ │ │ -
219 * @param __l An initializer_list.
│ │ │ -
220 * @param __n Minimal initial number of buckets.
│ │ │ -
221 * @param __hf A hash functor.
│ │ │ -
222 * @param __eql A key equality functor.
│ │ │ -
223 * @param __a An allocator object.
│ │ │ -
224 *
│ │ │ -
225 * Create an %unordered_set consisting of copies of the elements in the
│ │ │ -
226 * list. This is linear in N (where N is @a __l.size()).
│ │ │ -
227 */
│ │ │ -
│ │ │ - │ │ │ -
229 size_type __n = 0,
│ │ │ -
230 const hasher& __hf = hasher(),
│ │ │ -
231 const key_equal& __eql = key_equal(),
│ │ │ -
232 const allocator_type& __a = allocator_type())
│ │ │ -
233 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ -
234 { }
│ │ │ -
│ │ │ -
235
│ │ │ -
236 unordered_set(size_type __n, const allocator_type& __a)
│ │ │ -
237 : unordered_set(__n, hasher(), key_equal(), __a)
│ │ │ -
238 { }
│ │ │ -
239
│ │ │ -
240 unordered_set(size_type __n, const hasher& __hf,
│ │ │ -
241 const allocator_type& __a)
│ │ │ -
242 : unordered_set(__n, __hf, key_equal(), __a)
│ │ │ -
243 { }
│ │ │ -
244
│ │ │ -
245 template<typename _InputIterator>
│ │ │ -
246 unordered_set(_InputIterator __first, _InputIterator __last,
│ │ │ -
247 size_type __n,
│ │ │ -
248 const allocator_type& __a)
│ │ │ -
249 : unordered_set(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ -
250 { }
│ │ │ -
251
│ │ │ -
252 template<typename _InputIterator>
│ │ │ -
253 unordered_set(_InputIterator __first, _InputIterator __last,
│ │ │ -
254 size_type __n, const hasher& __hf,
│ │ │ -
255 const allocator_type& __a)
│ │ │ -
256 : unordered_set(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ -
257 { }
│ │ │ -
258
│ │ │ -
259 unordered_set(initializer_list<value_type> __l,
│ │ │ -
260 size_type __n,
│ │ │ -
261 const allocator_type& __a)
│ │ │ -
262 : unordered_set(__l, __n, hasher(), key_equal(), __a)
│ │ │ -
263 { }
│ │ │ +
187 /// Copy constructor.
│ │ │ +
188 unordered_map(const unordered_map&) = default;
│ │ │ +
189
│ │ │ +
190 /// Move constructor.
│ │ │ + │ │ │ +
192
│ │ │ +
193 /**
│ │ │ +
194 * @brief Creates an %unordered_map with no elements.
│ │ │ +
195 * @param __a An allocator object.
│ │ │ +
196 */
│ │ │ +
197 explicit
│ │ │ +
│ │ │ + │ │ │ +
199 : _M_h(__a)
│ │ │ +
200 { }
│ │ │ +
│ │ │ +
201
│ │ │ +
202 /*
│ │ │ +
203 * @brief Copy constructor with allocator argument.
│ │ │ +
204 * @param __uset Input %unordered_map to copy.
│ │ │ +
205 * @param __a An allocator object.
│ │ │ +
206 */
│ │ │ + │ │ │ +
208 const allocator_type& __a)
│ │ │ +
209 : _M_h(__umap._M_h, __a)
│ │ │ +
210 { }
│ │ │ +
211
│ │ │ +
212 /*
│ │ │ +
213 * @brief Move constructor with allocator argument.
│ │ │ +
214 * @param __uset Input %unordered_map to move.
│ │ │ +
215 * @param __a An allocator object.
│ │ │ +
216 */
│ │ │ + │ │ │ +
218 const allocator_type& __a)
│ │ │ +
219 noexcept( noexcept(_Hashtable(std::move(__umap._M_h), __a)) )
│ │ │ +
220 : _M_h(std::move(__umap._M_h), __a)
│ │ │ +
221 { }
│ │ │ +
222
│ │ │ +
223 /**
│ │ │ +
224 * @brief Builds an %unordered_map from an initializer_list.
│ │ │ +
225 * @param __l An initializer_list.
│ │ │ +
226 * @param __n Minimal initial number of buckets.
│ │ │ +
227 * @param __hf A hash functor.
│ │ │ +
228 * @param __eql A key equality functor.
│ │ │ +
229 * @param __a An allocator object.
│ │ │ +
230 *
│ │ │ +
231 * Create an %unordered_map consisting of copies of the elements in the
│ │ │ +
232 * list. This is linear in N (where N is @a __l.size()).
│ │ │ +
233 */
│ │ │ +
│ │ │ + │ │ │ +
235 size_type __n = 0,
│ │ │ +
236 const hasher& __hf = hasher(),
│ │ │ +
237 const key_equal& __eql = key_equal(),
│ │ │ +
238 const allocator_type& __a = allocator_type())
│ │ │ +
239 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ +
240 { }
│ │ │ +
│ │ │ +
241
│ │ │ +
242 unordered_map(size_type __n, const allocator_type& __a)
│ │ │ +
243 : unordered_map(__n, hasher(), key_equal(), __a)
│ │ │ +
244 { }
│ │ │ +
245
│ │ │ +
246 unordered_map(size_type __n, const hasher& __hf,
│ │ │ +
247 const allocator_type& __a)
│ │ │ +
248 : unordered_map(__n, __hf, key_equal(), __a)
│ │ │ +
249 { }
│ │ │ +
250
│ │ │ +
251 template<typename _InputIterator>
│ │ │ +
252 unordered_map(_InputIterator __first, _InputIterator __last,
│ │ │ +
253 size_type __n,
│ │ │ +
254 const allocator_type& __a)
│ │ │ +
255 : unordered_map(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ +
256 { }
│ │ │ +
257
│ │ │ +
258 template<typename _InputIterator>
│ │ │ +
259 unordered_map(_InputIterator __first, _InputIterator __last,
│ │ │ +
260 size_type __n, const hasher& __hf,
│ │ │ +
261 const allocator_type& __a)
│ │ │ +
262 : unordered_map(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ +
263 { }
│ │ │
264
│ │ │ -
265 unordered_set(initializer_list<value_type> __l,
│ │ │ -
266 size_type __n, const hasher& __hf,
│ │ │ -
267 const allocator_type& __a)
│ │ │ -
268 : unordered_set(__l, __n, __hf, key_equal(), __a)
│ │ │ +
265 unordered_map(initializer_list<value_type> __l,
│ │ │ +
266 size_type __n,
│ │ │ +
267 const allocator_type& __a)
│ │ │ +
268 : unordered_map(__l, __n, hasher(), key_equal(), __a)
│ │ │
269 { }
│ │ │ -
270
│ │ │ -
271 /// Copy assignment operator.
│ │ │ - │ │ │ -
273 operator=(const unordered_set&) = default;
│ │ │ -
274
│ │ │ -
275 /// Move assignment operator.
│ │ │ - │ │ │ - │ │ │ -
278
│ │ │ -
279 /**
│ │ │ -
280 * @brief %Unordered_set list assignment operator.
│ │ │ -
281 * @param __l An initializer_list.
│ │ │ -
282 *
│ │ │ -
283 * This function fills an %unordered_set with copies of the elements in
│ │ │ -
284 * the initializer list @a __l.
│ │ │ -
285 *
│ │ │ -
286 * Note that the assignment completely changes the %unordered_set and
│ │ │ -
287 * that the resulting %unordered_set's size is the same as the number
│ │ │ -
288 * of elements assigned.
│ │ │ -
289 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
292 {
│ │ │ -
293 _M_h = __l;
│ │ │ -
294 return *this;
│ │ │ -
295 }
│ │ │ -
│ │ │ -
296
│ │ │ -
297 /// Returns the allocator object used by the %unordered_set.
│ │ │ - │ │ │ -
│ │ │ -
299 get_allocator() const noexcept
│ │ │ -
300 { return _M_h.get_allocator(); }
│ │ │ -
│ │ │ -
301
│ │ │ -
302 // size and capacity:
│ │ │ -
303
│ │ │ -
304 /// Returns true if the %unordered_set is empty.
│ │ │ -
305 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
306 empty() const noexcept
│ │ │ -
307 { return _M_h.empty(); }
│ │ │ -
│ │ │ -
308
│ │ │ -
309 /// Returns the size of the %unordered_set.
│ │ │ - │ │ │ -
│ │ │ -
311 size() const noexcept
│ │ │ -
312 { return _M_h.size(); }
│ │ │ -
│ │ │ -
313
│ │ │ -
314 /// Returns the maximum size of the %unordered_set.
│ │ │ - │ │ │ -
│ │ │ -
316 max_size() const noexcept
│ │ │ -
317 { return _M_h.max_size(); }
│ │ │ -
│ │ │ -
318
│ │ │ -
319 // iterators.
│ │ │ -
320
│ │ │ -
321 ///@{
│ │ │ -
322 /**
│ │ │ -
323 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
324 * element in the %unordered_set.
│ │ │ -
325 */
│ │ │ - │ │ │ -
│ │ │ -
327 begin() noexcept
│ │ │ -
328 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
329
│ │ │ - │ │ │ -
│ │ │ -
331 begin() const noexcept
│ │ │ -
332 { return _M_h.begin(); }
│ │ │ +
270
│ │ │ +
271 unordered_map(initializer_list<value_type> __l,
│ │ │ +
272 size_type __n, const hasher& __hf,
│ │ │ +
273 const allocator_type& __a)
│ │ │ +
274 : unordered_map(__l, __n, __hf, key_equal(), __a)
│ │ │ +
275 { }
│ │ │ +
276
│ │ │ +
277 /// Copy assignment operator.
│ │ │ + │ │ │ +
279 operator=(const unordered_map&) = default;
│ │ │ +
280
│ │ │ +
281 /// Move assignment operator.
│ │ │ + │ │ │ + │ │ │ +
284
│ │ │ +
285 /**
│ │ │ +
286 * @brief %Unordered_map list assignment operator.
│ │ │ +
287 * @param __l An initializer_list.
│ │ │ +
288 *
│ │ │ +
289 * This function fills an %unordered_map with copies of the elements in
│ │ │ +
290 * the initializer list @a __l.
│ │ │ +
291 *
│ │ │ +
292 * Note that the assignment completely changes the %unordered_map and
│ │ │ +
293 * that the resulting %unordered_map's size is the same as the number
│ │ │ +
294 * of elements assigned.
│ │ │ +
295 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
298 {
│ │ │ +
299 _M_h = __l;
│ │ │ +
300 return *this;
│ │ │ +
301 }
│ │ │ +
│ │ │ +
302
│ │ │ +
303 /// Returns the allocator object used by the %unordered_map.
│ │ │ + │ │ │ +
│ │ │ +
305 get_allocator() const noexcept
│ │ │ +
306 { return _M_h.get_allocator(); }
│ │ │ +
│ │ │ +
307
│ │ │ +
308 // size and capacity:
│ │ │ +
309
│ │ │ +
310 /// Returns true if the %unordered_map is empty.
│ │ │ +
311 _GLIBCXX_NODISCARD bool
│ │ │ +
│ │ │ +
312 empty() const noexcept
│ │ │ +
313 { return _M_h.empty(); }
│ │ │ +
│ │ │ +
314
│ │ │ +
315 /// Returns the size of the %unordered_map.
│ │ │ + │ │ │ +
│ │ │ +
317 size() const noexcept
│ │ │ +
318 { return _M_h.size(); }
│ │ │ +
│ │ │ +
319
│ │ │ +
320 /// Returns the maximum size of the %unordered_map.
│ │ │ + │ │ │ +
│ │ │ +
322 max_size() const noexcept
│ │ │ +
323 { return _M_h.max_size(); }
│ │ │ +
│ │ │ +
324
│ │ │ +
325 // iterators.
│ │ │ +
326
│ │ │ +
327 /**
│ │ │ +
328 * Returns a read/write iterator that points to the first element in the
│ │ │ +
329 * %unordered_map.
│ │ │ +
330 */
│ │ │ + │ │ │ +
│ │ │ +
332 begin() noexcept
│ │ │ +
333 { return _M_h.begin(); }
│ │ │
│ │ │ -
333 ///@}
│ │ │ -
334
│ │ │ +
334
│ │ │
335 ///@{
│ │ │
336 /**
│ │ │ -
337 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
338 * element in the %unordered_set.
│ │ │ +
337 * Returns a read-only (constant) iterator that points to the first
│ │ │ +
338 * element in the %unordered_map.
│ │ │
339 */
│ │ │ - │ │ │ + │ │ │
│ │ │ -
341 end() noexcept
│ │ │ -
342 { return _M_h.end(); }
│ │ │ +
341 begin() const noexcept
│ │ │ +
342 { return _M_h.begin(); }
│ │ │
│ │ │
343
│ │ │ - │ │ │ + │ │ │
│ │ │ -
345 end() const noexcept
│ │ │ -
346 { return _M_h.end(); }
│ │ │ +
345 cbegin() const noexcept
│ │ │ +
346 { return _M_h.begin(); }
│ │ │
│ │ │
347 ///@}
│ │ │
348
│ │ │
349 /**
│ │ │ -
350 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
351 * element in the %unordered_set.
│ │ │ +
350 * Returns a read/write iterator that points one past the last element in
│ │ │ +
351 * the %unordered_map.
│ │ │
352 */
│ │ │ - │ │ │ + │ │ │
│ │ │ -
354 cbegin() const noexcept
│ │ │ -
355 { return _M_h.begin(); }
│ │ │ +
354 end() noexcept
│ │ │ +
355 { return _M_h.end(); }
│ │ │
│ │ │
356
│ │ │ -
357 /**
│ │ │ -
358 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
359 * element in the %unordered_set.
│ │ │ -
360 */
│ │ │ - │ │ │ -
│ │ │ -
362 cend() const noexcept
│ │ │ -
363 { return _M_h.end(); }
│ │ │ -
│ │ │ -
364
│ │ │ -
365 // modifiers.
│ │ │ -
366
│ │ │ -
367 /**
│ │ │ -
368 * @brief Attempts to build and insert an element into the
│ │ │ -
369 * %unordered_set.
│ │ │ -
370 * @param __args Arguments used to generate an element.
│ │ │ -
371 * @return A pair, of which the first element is an iterator that points
│ │ │ -
372 * to the possibly inserted element, and the second is a bool
│ │ │ -
373 * that is true if the element was actually inserted.
│ │ │ -
374 *
│ │ │ -
375 * This function attempts to build and insert an element into the
│ │ │ -
376 * %unordered_set. An %unordered_set relies on unique keys and thus an
│ │ │ -
377 * element is only inserted if it is not already present in the
│ │ │ -
378 * %unordered_set.
│ │ │ -
379 *
│ │ │ -
380 * Insertion requires amortized constant time.
│ │ │ -
381 */
│ │ │ -
382 template<typename... _Args>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
385 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
386
│ │ │ -
387 /**
│ │ │ -
388 * @brief Attempts to insert an element into the %unordered_set.
│ │ │ -
389 * @param __pos An iterator that serves as a hint as to where the
│ │ │ -
390 * element should be inserted.
│ │ │ -
391 * @param __args Arguments used to generate the element to be
│ │ │ -
392 * inserted.
│ │ │ -
393 * @return An iterator that points to the element with key equivalent to
│ │ │ -
394 * the one generated from @a __args (may or may not be the
│ │ │ -
395 * element itself).
│ │ │ -
396 *
│ │ │ -
397 * This function is not concerned about whether the insertion took place,
│ │ │ -
398 * and thus does not return a boolean like the single-argument emplace()
│ │ │ -
399 * does. Note that the first parameter is only a hint and can
│ │ │ -
400 * potentially improve the performance of the insertion process. A bad
│ │ │ -
401 * hint would cause no gains in efficiency.
│ │ │ -
402 *
│ │ │ -
403 * For more on @a hinting, see:
│ │ │ -
404 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
405 *
│ │ │ -
406 * Insertion requires amortized constant time.
│ │ │ -
407 */
│ │ │ -
408 template<typename... _Args>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
411 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
412
│ │ │ -
413 ///@{
│ │ │ -
414 /**
│ │ │ -
415 * @brief Attempts to insert an element into the %unordered_set.
│ │ │ -
416 * @param __x Element to be inserted.
│ │ │ -
417 * @return A pair, of which the first element is an iterator that points
│ │ │ -
418 * to the possibly inserted element, and the second is a bool
│ │ │ -
419 * that is true if the element was actually inserted.
│ │ │ -
420 *
│ │ │ -
421 * This function attempts to insert an element into the %unordered_set.
│ │ │ -
422 * An %unordered_set relies on unique keys and thus an element is only
│ │ │ -
423 * inserted if it is not already present in the %unordered_set.
│ │ │ -
424 *
│ │ │ -
425 * Insertion requires amortized constant time.
│ │ │ -
426 */
│ │ │ - │ │ │ -
│ │ │ -
428 insert(const value_type& __x)
│ │ │ -
429 { return _M_h.insert(__x); }
│ │ │ -
│ │ │ -
430
│ │ │ - │ │ │ +
357 ///@{
│ │ │ +
358 /**
│ │ │ +
359 * Returns a read-only (constant) iterator that points one past the last
│ │ │ +
360 * element in the %unordered_map.
│ │ │ +
361 */
│ │ │ + │ │ │ +
│ │ │ +
363 end() const noexcept
│ │ │ +
364 { return _M_h.end(); }
│ │ │ +
│ │ │ +
365
│ │ │ + │ │ │ +
│ │ │ +
367 cend() const noexcept
│ │ │ +
368 { return _M_h.end(); }
│ │ │ +
│ │ │ +
369 ///@}
│ │ │ +
370
│ │ │ +
371 // modifiers.
│ │ │ +
372
│ │ │ +
373 /**
│ │ │ +
374 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
375 * %unordered_map.
│ │ │ +
376 *
│ │ │ +
377 * @param __args Arguments used to generate a new pair instance (see
│ │ │ +
378 * std::piecewise_contruct for passing arguments to each
│ │ │ +
379 * part of the pair constructor).
│ │ │ +
380 *
│ │ │ +
381 * @return A pair, of which the first element is an iterator that points
│ │ │ +
382 * to the possibly inserted pair, and the second is a bool that
│ │ │ +
383 * is true if the pair was actually inserted.
│ │ │ +
384 *
│ │ │ +
385 * This function attempts to build and insert a (key, value) %pair into
│ │ │ +
386 * the %unordered_map.
│ │ │ +
387 * An %unordered_map relies on unique keys and thus a %pair is only
│ │ │ +
388 * inserted if its first element (the key) is not already present in the
│ │ │ +
389 * %unordered_map.
│ │ │ +
390 *
│ │ │ +
391 * Insertion requires amortized constant time.
│ │ │ +
392 */
│ │ │ +
393 template<typename... _Args>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
396 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ +
│ │ │ +
397
│ │ │ +
398 /**
│ │ │ +
399 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
400 * %unordered_map.
│ │ │ +
401 *
│ │ │ +
402 * @param __pos An iterator that serves as a hint as to where the pair
│ │ │ +
403 * should be inserted.
│ │ │ +
404 * @param __args Arguments used to generate a new pair instance (see
│ │ │ +
405 * std::piecewise_contruct for passing arguments to each
│ │ │ +
406 * part of the pair constructor).
│ │ │ +
407 * @return An iterator that points to the element with key of the
│ │ │ +
408 * std::pair built from @a __args (may or may not be that
│ │ │ +
409 * std::pair).
│ │ │ +
410 *
│ │ │ +
411 * This function is not concerned about whether the insertion took place,
│ │ │ +
412 * and thus does not return a boolean like the single-argument emplace()
│ │ │ +
413 * does.
│ │ │ +
414 * Note that the first parameter is only a hint and can potentially
│ │ │ +
415 * improve the performance of the insertion process. A bad hint would
│ │ │ +
416 * cause no gains in efficiency.
│ │ │ +
417 *
│ │ │ +
418 * See
│ │ │ +
419 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
420 * for more on @a hinting.
│ │ │ +
421 *
│ │ │ +
422 * Insertion requires amortized constant time.
│ │ │ +
423 */
│ │ │ +
424 template<typename... _Args>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
427 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ +
│ │ │ +
428
│ │ │ +
429#if __cplusplus > 201402L
│ │ │ +
430 /// Extract a node.
│ │ │ +
431 node_type
│ │ │
│ │ │ - │ │ │ -
433 { return _M_h.insert(std::move(__x)); }
│ │ │ -
│ │ │ -
434 ///@}
│ │ │ -
435
│ │ │ -
436 ///@{
│ │ │ -
437 /**
│ │ │ -
438 * @brief Attempts to insert an element into the %unordered_set.
│ │ │ -
439 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
440 * element should be inserted.
│ │ │ -
441 * @param __x Element to be inserted.
│ │ │ -
442 * @return An iterator that points to the element with key of
│ │ │ -
443 * @a __x (may or may not be the element passed in).
│ │ │ -
444 *
│ │ │ -
445 * This function is not concerned about whether the insertion took place,
│ │ │ -
446 * and thus does not return a boolean like the single-argument insert()
│ │ │ -
447 * does. Note that the first parameter is only a hint and can
│ │ │ -
448 * potentially improve the performance of the insertion process. A bad
│ │ │ -
449 * hint would cause no gains in efficiency.
│ │ │ -
450 *
│ │ │ -
451 * For more on @a hinting, see:
│ │ │ -
452 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
453 *
│ │ │ -
454 * Insertion requires amortized constant.
│ │ │ -
455 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
458 { return _M_h.insert(__hint, __x); }
│ │ │ -
│ │ │ -
459
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
462 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ -
│ │ │ -
463 ///@}
│ │ │ -
464
│ │ │ -
465 /**
│ │ │ -
466 * @brief A template function that attempts to insert a range of
│ │ │ -
467 * elements.
│ │ │ -
468 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
469 * inserted.
│ │ │ -
470 * @param __last Iterator pointing to the end of the range.
│ │ │ -
471 *
│ │ │ -
472 * Complexity similar to that of the range constructor.
│ │ │ -
473 */
│ │ │ -
474 template<typename _InputIterator>
│ │ │ -
475 void
│ │ │ -
│ │ │ - │ │ │ -
477 { _M_h.insert(__first, __last); }
│ │ │ -
│ │ │ -
478
│ │ │ -
479 /**
│ │ │ -
480 * @brief Attempts to insert a list of elements into the %unordered_set.
│ │ │ -
481 * @param __l A std::initializer_list<value_type> of elements
│ │ │ -
482 * to be inserted.
│ │ │ -
483 *
│ │ │ -
484 * Complexity similar to that of the range constructor.
│ │ │ -
485 */
│ │ │ -
486 void
│ │ │ -
│ │ │ - │ │ │ -
488 { _M_h.insert(__l); }
│ │ │ -
│ │ │ -
489
│ │ │ -
490#if __cplusplus > 201402L
│ │ │ -
491 /// Extract a node.
│ │ │ -
492 node_type
│ │ │ -
│ │ │ - │ │ │ -
494 {
│ │ │ -
495 __glibcxx_assert(__pos != end());
│ │ │ -
496 return _M_h.extract(__pos);
│ │ │ -
497 }
│ │ │ -
│ │ │ -
498
│ │ │ -
499 /// Extract a node.
│ │ │ -
500 node_type
│ │ │ -
│ │ │ - │ │ │ -
502 { return _M_h.extract(__key); }
│ │ │ -
│ │ │ -
503
│ │ │ -
504 /// Re-insert an extracted node.
│ │ │ -
505 insert_return_type
│ │ │ -
│ │ │ -
506 insert(node_type&& __nh)
│ │ │ -
507 { return _M_h._M_reinsert_node(std::move(__nh)); }
│ │ │ -
│ │ │ -
508
│ │ │ -
509 /// Re-insert an extracted node.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
512 { return _M_h._M_reinsert_node(std::move(__nh)).position; }
│ │ │ -
│ │ │ -
513#endif // C++17
│ │ │ -
514
│ │ │ -
515 ///@{
│ │ │ -
516 /**
│ │ │ -
517 * @brief Erases an element from an %unordered_set.
│ │ │ -
518 * @param __position An iterator pointing to the element to be erased.
│ │ │ -
519 * @return An iterator pointing to the element immediately following
│ │ │ -
520 * @a __position prior to the element being erased. If no such
│ │ │ -
521 * element exists, end() is returned.
│ │ │ -
522 *
│ │ │ -
523 * This function erases an element, pointed to by the given iterator,
│ │ │ -
524 * from an %unordered_set. Note that this function only erases the
│ │ │ -
525 * element, and that if the element is itself a pointer, the pointed-to
│ │ │ -
526 * memory is not touched in any way. Managing the pointer is the user's
│ │ │ -
527 * responsibility.
│ │ │ -
528 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
531 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
532
│ │ │ -
533 // LWG 2059.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
536 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
537 ///@}
│ │ │ -
538
│ │ │ -
539 /**
│ │ │ -
540 * @brief Erases elements according to the provided key.
│ │ │ -
541 * @param __x Key of element to be erased.
│ │ │ -
542 * @return The number of elements erased.
│ │ │ -
543 *
│ │ │ -
544 * This function erases all the elements located by the given key from
│ │ │ -
545 * an %unordered_set. For an %unordered_set the result of this function
│ │ │ -
546 * can only be 0 (not present) or 1 (present).
│ │ │ -
547 * Note that this function only erases the element, and that if
│ │ │ -
548 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
549 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
550 */
│ │ │ - │ │ │ -
│ │ │ -
552 erase(const key_type& __x)
│ │ │ -
553 { return _M_h.erase(__x); }
│ │ │ -
│ │ │ -
554
│ │ │ -
555 /**
│ │ │ -
556 * @brief Erases a [__first,__last) range of elements from an
│ │ │ -
557 * %unordered_set.
│ │ │ -
558 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
559 * erased.
│ │ │ -
560 * @param __last Iterator pointing to the end of the range to
│ │ │ -
561 * be erased.
│ │ │ -
562 * @return The iterator @a __last.
│ │ │ -
563 *
│ │ │ -
564 * This function erases a sequence of elements from an %unordered_set.
│ │ │ -
565 * Note that this function only erases the element, and that if
│ │ │ -
566 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
567 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
568 */
│ │ │ - │ │ │ + │ │ │ +
433 {
│ │ │ +
434 __glibcxx_assert(__pos != end());
│ │ │ +
435 return _M_h.extract(__pos);
│ │ │ +
436 }
│ │ │ +
│ │ │ +
437
│ │ │ +
438 /// Extract a node.
│ │ │ +
439 node_type
│ │ │ +
│ │ │ + │ │ │ +
441 { return _M_h.extract(__key); }
│ │ │ +
│ │ │ +
442
│ │ │ +
443 /// Re-insert an extracted node.
│ │ │ +
444 insert_return_type
│ │ │ +
│ │ │ +
445 insert(node_type&& __nh)
│ │ │ +
446 { return _M_h._M_reinsert_node(std::move(__nh)); }
│ │ │ +
│ │ │ +
447
│ │ │ +
448 /// Re-insert an extracted node.
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
451 { return _M_h._M_reinsert_node(std::move(__nh)).position; }
│ │ │ +
│ │ │ +
452
│ │ │ +
453#define __cpp_lib_unordered_map_try_emplace 201411L
│ │ │ +
454 /**
│ │ │ +
455 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
456 * %unordered_map.
│ │ │ +
457 *
│ │ │ +
458 * @param __k Key to use for finding a possibly existing pair in
│ │ │ +
459 * the unordered_map.
│ │ │ +
460 * @param __args Arguments used to generate the .second for a
│ │ │ +
461 * new pair instance.
│ │ │ +
462 *
│ │ │ +
463 * @return A pair, of which the first element is an iterator that points
│ │ │ +
464 * to the possibly inserted pair, and the second is a bool that
│ │ │ +
465 * is true if the pair was actually inserted.
│ │ │ +
466 *
│ │ │ +
467 * This function attempts to build and insert a (key, value) %pair into
│ │ │ +
468 * the %unordered_map.
│ │ │ +
469 * An %unordered_map relies on unique keys and thus a %pair is only
│ │ │ +
470 * inserted if its first element (the key) is not already present in the
│ │ │ +
471 * %unordered_map.
│ │ │ +
472 * If a %pair is not inserted, this function has no effect.
│ │ │ +
473 *
│ │ │ +
474 * Insertion requires amortized constant time.
│ │ │ +
475 */
│ │ │ +
476 template <typename... _Args>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
479 {
│ │ │ +
480 return _M_h.try_emplace(cend(), __k, std::forward<_Args>(__args)...);
│ │ │ +
481 }
│ │ │ +
│ │ │ +
482
│ │ │ +
483 // move-capable overload
│ │ │ +
484 template <typename... _Args>
│ │ │ + │ │ │ + │ │ │ +
487 {
│ │ │ +
488 return _M_h.try_emplace(cend(), std::move(__k),
│ │ │ + │ │ │ +
490 }
│ │ │ +
491
│ │ │ +
492 /**
│ │ │ +
493 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
494 * %unordered_map.
│ │ │ +
495 *
│ │ │ +
496 * @param __hint An iterator that serves as a hint as to where the pair
│ │ │ +
497 * should be inserted.
│ │ │ +
498 * @param __k Key to use for finding a possibly existing pair in
│ │ │ +
499 * the unordered_map.
│ │ │ +
500 * @param __args Arguments used to generate the .second for a
│ │ │ +
501 * new pair instance.
│ │ │ +
502 * @return An iterator that points to the element with key of the
│ │ │ +
503 * std::pair built from @a __args (may or may not be that
│ │ │ +
504 * std::pair).
│ │ │ +
505 *
│ │ │ +
506 * This function is not concerned about whether the insertion took place,
│ │ │ +
507 * and thus does not return a boolean like the single-argument emplace()
│ │ │ +
508 * does. However, if insertion did not take place,
│ │ │ +
509 * this function has no effect.
│ │ │ +
510 * Note that the first parameter is only a hint and can potentially
│ │ │ +
511 * improve the performance of the insertion process. A bad hint would
│ │ │ +
512 * cause no gains in efficiency.
│ │ │ +
513 *
│ │ │ +
514 * See
│ │ │ +
515 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
516 * for more on @a hinting.
│ │ │ +
517 *
│ │ │ +
518 * Insertion requires amortized constant time.
│ │ │ +
519 */
│ │ │ +
520 template <typename... _Args>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
523 _Args&&... __args)
│ │ │ +
524 {
│ │ │ +
525 return _M_h.try_emplace(__hint, __k,
│ │ │ +
526 std::forward<_Args>(__args)...).first;
│ │ │ +
527 }
│ │ │ +
│ │ │ +
528
│ │ │ +
529 // move-capable overload
│ │ │ +
530 template <typename... _Args>
│ │ │ + │ │ │ + │ │ │ +
533 {
│ │ │ +
534 return _M_h.try_emplace(__hint, std::move(__k),
│ │ │ +
535 std::forward<_Args>(__args)...).first;
│ │ │ +
536 }
│ │ │ +
537#endif // C++17
│ │ │ +
538
│ │ │ +
539 ///@{
│ │ │ +
540 /**
│ │ │ +
541 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ +
542
│ │ │ +
543 * @param __x Pair to be inserted (see std::make_pair for easy
│ │ │ +
544 * creation of pairs).
│ │ │ +
545 *
│ │ │ +
546 * @return A pair, of which the first element is an iterator that
│ │ │ +
547 * points to the possibly inserted pair, and the second is
│ │ │ +
548 * a bool that is true if the pair was actually inserted.
│ │ │ +
549 *
│ │ │ +
550 * This function attempts to insert a (key, value) %pair into the
│ │ │ +
551 * %unordered_map. An %unordered_map relies on unique keys and thus a
│ │ │ +
552 * %pair is only inserted if its first element (the key) is not already
│ │ │ +
553 * present in the %unordered_map.
│ │ │ +
554 *
│ │ │ +
555 * Insertion requires amortized constant time.
│ │ │ +
556 */
│ │ │ + │ │ │ +
│ │ │ +
558 insert(const value_type& __x)
│ │ │ +
559 { return _M_h.insert(__x); }
│ │ │ +
│ │ │ +
560
│ │ │ +
561 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
562 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
565 { return _M_h.insert(std::move(__x)); }
│ │ │ +
│ │ │ +
566
│ │ │ +
567 template<typename _Pair>
│ │ │ + │ │ │ + │ │ │
│ │ │ - │ │ │ -
571 { return _M_h.erase(__first, __last); }
│ │ │ -
│ │ │ -
572
│ │ │ -
573 /**
│ │ │ -
574 * Erases all elements in an %unordered_set. Note that this function only
│ │ │ -
575 * erases the elements, and that if the elements themselves are pointers,
│ │ │ -
576 * the pointed-to memory is not touched in any way. Managing the pointer
│ │ │ -
577 * is the user's responsibility.
│ │ │ -
578 */
│ │ │ -
579 void
│ │ │ -
│ │ │ -
580 clear() noexcept
│ │ │ -
581 { _M_h.clear(); }
│ │ │ -
│ │ │ -
582
│ │ │ -
583 /**
│ │ │ -
584 * @brief Swaps data with another %unordered_set.
│ │ │ -
585 * @param __x An %unordered_set of the same element and allocator
│ │ │ -
586 * types.
│ │ │ -
587 *
│ │ │ -
588 * This exchanges the elements between two sets in constant time.
│ │ │ -
589 * Note that the global std::swap() function is specialized such that
│ │ │ -
590 * std::swap(s1,s2) will feed to this function.
│ │ │ -
591 */
│ │ │ -
592 void
│ │ │ -
│ │ │ - │ │ │ -
594 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ -
595 { _M_h.swap(__x._M_h); }
│ │ │ -
│ │ │ -
596
│ │ │ -
597#if __cplusplus > 201402L
│ │ │ -
598 template<typename, typename, typename>
│ │ │ -
599 friend class std::_Hash_merge_helper;
│ │ │ -
600
│ │ │ -
601 template<typename _H2, typename _P2>
│ │ │ -
602 void
│ │ │ - │ │ │ -
604 {
│ │ │ - │ │ │ -
606 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ -
607 }
│ │ │ -
608
│ │ │ -
609 template<typename _H2, typename _P2>
│ │ │ -
610 void
│ │ │ -
611 merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source)
│ │ │ -
612 { merge(__source); }
│ │ │ -
613
│ │ │ -
614 template<typename _H2, typename _P2>
│ │ │ -
615 void
│ │ │ -
616 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>& __source)
│ │ │ -
617 {
│ │ │ -
618 using _Merge_helper = _Hash_merge_helper<unordered_set, _H2, _P2>;
│ │ │ -
619 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ -
620 }
│ │ │ -
621
│ │ │ -
622 template<typename _H2, typename _P2>
│ │ │ -
623 void
│ │ │ -
624 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source)
│ │ │ -
625 { merge(__source); }
│ │ │ -
626#endif // C++17
│ │ │ -
627
│ │ │ -
628 // observers.
│ │ │ -
629
│ │ │ -
630 /// Returns the hash functor object with which the %unordered_set was
│ │ │ -
631 /// constructed.
│ │ │ -
632 hasher
│ │ │ -
│ │ │ - │ │ │ -
634 { return _M_h.hash_function(); }
│ │ │ -
│ │ │ -
635
│ │ │ -
636 /// Returns the key comparison object with which the %unordered_set was
│ │ │ -
637 /// constructed.
│ │ │ - │ │ │ -
│ │ │ -
639 key_eq() const
│ │ │ -
640 { return _M_h.key_eq(); }
│ │ │ -
│ │ │ -
641
│ │ │ -
642 // lookup.
│ │ │ -
643
│ │ │ -
644 ///@{
│ │ │ -
645 /**
│ │ │ -
646 * @brief Tries to locate an element in an %unordered_set.
│ │ │ -
647 * @param __x Element to be located.
│ │ │ -
648 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ -
649 * found.
│ │ │ -
650 *
│ │ │ -
651 * This function takes a key and tries to locate the element with which
│ │ │ -
652 * the key matches. If successful the function returns an iterator
│ │ │ -
653 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ -
654 * past-the-end ( @c end() ) iterator.
│ │ │ -
655 */
│ │ │ - │ │ │ -
│ │ │ -
657 find(const key_type& __x)
│ │ │ -
658 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
659
│ │ │ -
660#if __cplusplus > 201703L
│ │ │ -
661 template<typename _Kt>
│ │ │ -
662 auto
│ │ │ -
│ │ │ -
663 find(const _Kt& __k)
│ │ │ -
664 -> decltype(_M_h._M_find_tr(__k))
│ │ │ -
665 { return _M_h._M_find_tr(__k); }
│ │ │ -
│ │ │ -
666#endif
│ │ │ -
667
│ │ │ - │ │ │ -
│ │ │ -
669 find(const key_type& __x) const
│ │ │ -
670 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
671
│ │ │ -
672#if __cplusplus > 201703L
│ │ │ -
673 template<typename _Kt>
│ │ │ -
674 auto
│ │ │ -
│ │ │ -
675 find(const _Kt& __k) const
│ │ │ -
676 -> decltype(_M_h._M_find_tr(__k))
│ │ │ -
677 { return _M_h._M_find_tr(__k); }
│ │ │ -
│ │ │ -
678#endif
│ │ │ -
679 ///@}
│ │ │ -
680
│ │ │ -
681 ///@{
│ │ │ -
682 /**
│ │ │ -
683 * @brief Finds the number of elements.
│ │ │ -
684 * @param __x Element to located.
│ │ │ -
685 * @return Number of elements with specified key.
│ │ │ -
686 *
│ │ │ -
687 * This function only makes sense for unordered_multisets; for
│ │ │ -
688 * unordered_set the result will either be 0 (not present) or 1
│ │ │ -
689 * (present).
│ │ │ -
690 */
│ │ │ - │ │ │ -
│ │ │ -
692 count(const key_type& __x) const
│ │ │ -
693 { return _M_h.count(__x); }
│ │ │ -
│ │ │ -
694
│ │ │ -
695#if __cplusplus > 201703L
│ │ │ -
696 template<typename _Kt>
│ │ │ -
697 auto
│ │ │ -
│ │ │ -
698 count(const _Kt& __k) const
│ │ │ -
699 -> decltype(_M_h._M_count_tr(__k))
│ │ │ -
700 { return _M_h._M_count_tr(__k); }
│ │ │ -
│ │ │ -
701#endif
│ │ │ -
702 ///@}
│ │ │ -
703
│ │ │ -
704#if __cplusplus > 201703L
│ │ │ -
705 ///@{
│ │ │ -
706 /**
│ │ │ -
707 * @brief Finds whether an element with the given key exists.
│ │ │ -
708 * @param __x Key of elements to be located.
│ │ │ -
709 * @return True if there is any element with the specified key.
│ │ │ -
710 */
│ │ │ -
711 bool
│ │ │ -
│ │ │ -
712 contains(const key_type& __x) const
│ │ │ -
713 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ -
│ │ │ -
714
│ │ │ -
715 template<typename _Kt>
│ │ │ -
716 auto
│ │ │ -
│ │ │ -
717 contains(const _Kt& __k) const
│ │ │ -
718 -> decltype(_M_h._M_find_tr(__k), void(), true)
│ │ │ -
719 { return _M_h._M_find_tr(__k) != _M_h.end(); }
│ │ │ -
│ │ │ -
720 ///@}
│ │ │ -
721#endif
│ │ │ -
722
│ │ │ -
723 ///@{
│ │ │ -
724 /**
│ │ │ -
725 * @brief Finds a subsequence matching given key.
│ │ │ -
726 * @param __x Key to be located.
│ │ │ -
727 * @return Pair of iterators that possibly points to the subsequence
│ │ │ -
728 * matching given key.
│ │ │ -
729 *
│ │ │ -
730 * This function probably only makes sense for multisets.
│ │ │ -
731 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
734 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
735
│ │ │ -
736#if __cplusplus > 201703L
│ │ │ -
737 template<typename _Kt>
│ │ │ -
738 auto
│ │ │ -
│ │ │ - │ │ │ -
740 -> decltype(_M_h._M_equal_range_tr(__k))
│ │ │ -
741 { return _M_h._M_equal_range_tr(__k); }
│ │ │ -
│ │ │ -
742#endif
│ │ │ -
743
│ │ │ - │ │ │ -
│ │ │ -
745 equal_range(const key_type& __x) const
│ │ │ -
746 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
747
│ │ │ -
748#if __cplusplus > 201703L
│ │ │ -
749 template<typename _Kt>
│ │ │ -
750 auto
│ │ │ -
│ │ │ -
751 equal_range(const _Kt& __k) const
│ │ │ -
752 -> decltype(_M_h._M_equal_range_tr(__k))
│ │ │ -
753 { return _M_h._M_equal_range_tr(__k); }
│ │ │ -
│ │ │ -
754#endif
│ │ │ -
755 ///@}
│ │ │ -
756
│ │ │ -
757 // bucket interface.
│ │ │ -
758
│ │ │ -
759 /// Returns the number of buckets of the %unordered_set.
│ │ │ - │ │ │ -
│ │ │ -
761 bucket_count() const noexcept
│ │ │ -
762 { return _M_h.bucket_count(); }
│ │ │ -
│ │ │ -
763
│ │ │ -
764 /// Returns the maximum number of buckets of the %unordered_set.
│ │ │ - │ │ │ -
│ │ │ -
766 max_bucket_count() const noexcept
│ │ │ -
767 { return _M_h.max_bucket_count(); }
│ │ │ -
│ │ │ -
768
│ │ │ -
769 /*
│ │ │ -
770 * @brief Returns the number of elements in a given bucket.
│ │ │ -
771 * @param __n A bucket index.
│ │ │ -
772 * @return The number of elements in the bucket.
│ │ │ -
773 */
│ │ │ - │ │ │ -
775 bucket_size(size_type __n) const
│ │ │ -
776 { return _M_h.bucket_size(__n); }
│ │ │ -
777
│ │ │ -
778 /*
│ │ │ -
779 * @brief Returns the bucket index of a given element.
│ │ │ -
780 * @param __key A key instance.
│ │ │ -
781 * @return The key bucket index.
│ │ │ -
782 */
│ │ │ - │ │ │ -
784 bucket(const key_type& __key) const
│ │ │ -
785 { return _M_h.bucket(__key); }
│ │ │ -
786
│ │ │ -
787 ///@{
│ │ │ -
788 /**
│ │ │ -
789 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ -
790 * bucket element.
│ │ │ -
791 * @param __n The bucket index.
│ │ │ -
792 * @return A read-only local iterator.
│ │ │ -
793 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
796 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
797
│ │ │ - │ │ │ -
│ │ │ -
799 begin(size_type __n) const
│ │ │ -
800 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
801
│ │ │ - │ │ │ -
│ │ │ -
803 cbegin(size_type __n) const
│ │ │ -
804 { return _M_h.cbegin(__n); }
│ │ │ -
│ │ │ -
805 ///@}
│ │ │ -
806
│ │ │ -
807 ///@{
│ │ │ -
808 /**
│ │ │ -
809 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ -
810 * the last bucket elements.
│ │ │ -
811 * @param __n The bucket index.
│ │ │ -
812 * @return A read-only local iterator.
│ │ │ -
813 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
816 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
817
│ │ │ - │ │ │ -
│ │ │ -
819 end(size_type __n) const
│ │ │ -
820 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
821
│ │ │ - │ │ │ -
│ │ │ -
823 cend(size_type __n) const
│ │ │ -
824 { return _M_h.cend(__n); }
│ │ │ -
│ │ │ -
825 ///@}
│ │ │ -
826
│ │ │ -
827 // hash policy.
│ │ │ -
828
│ │ │ -
829 /// Returns the average number of elements per bucket.
│ │ │ -
830 float
│ │ │ -
│ │ │ -
831 load_factor() const noexcept
│ │ │ -
832 { return _M_h.load_factor(); }
│ │ │ -
│ │ │ -
833
│ │ │ -
834 /// Returns a positive number that the %unordered_set tries to keep the
│ │ │ -
835 /// load factor less than or equal to.
│ │ │ -
836 float
│ │ │ -
│ │ │ -
837 max_load_factor() const noexcept
│ │ │ -
838 { return _M_h.max_load_factor(); }
│ │ │ -
│ │ │ -
839
│ │ │ -
840 /**
│ │ │ -
841 * @brief Change the %unordered_set maximum load factor.
│ │ │ -
842 * @param __z The new maximum load factor.
│ │ │ -
843 */
│ │ │ -
844 void
│ │ │ -
│ │ │ - │ │ │ -
846 { _M_h.max_load_factor(__z); }
│ │ │ + │ │ │ +
571 { return _M_h.emplace(std::forward<_Pair>(__x)); }
│ │ │
│ │ │ +
572 ///@}
│ │ │ +
573
│ │ │ +
574 ///@{
│ │ │ +
575 /**
│ │ │ +
576 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ +
577 * @param __hint An iterator that serves as a hint as to where the
│ │ │ +
578 * pair should be inserted.
│ │ │ +
579 * @param __x Pair to be inserted (see std::make_pair for easy creation
│ │ │ +
580 * of pairs).
│ │ │ +
581 * @return An iterator that points to the element with key of
│ │ │ +
582 * @a __x (may or may not be the %pair passed in).
│ │ │ +
583 *
│ │ │ +
584 * This function is not concerned about whether the insertion took place,
│ │ │ +
585 * and thus does not return a boolean like the single-argument insert()
│ │ │ +
586 * does. Note that the first parameter is only a hint and can
│ │ │ +
587 * potentially improve the performance of the insertion process. A bad
│ │ │ +
588 * hint would cause no gains in efficiency.
│ │ │ +
589 *
│ │ │ +
590 * See
│ │ │ +
591 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
592 * for more on @a hinting.
│ │ │ +
593 *
│ │ │ +
594 * Insertion requires amortized constant time.
│ │ │ +
595 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
598 { return _M_h.insert(__hint, __x); }
│ │ │ +
│ │ │ +
599
│ │ │ +
600 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
601 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
604 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ +
│ │ │ +
605
│ │ │ +
606 template<typename _Pair>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
609 { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); }
│ │ │ +
│ │ │ +
610 ///@}
│ │ │ +
611
│ │ │ +
612 /**
│ │ │ +
613 * @brief A template function that attempts to insert a range of
│ │ │ +
614 * elements.
│ │ │ +
615 * @param __first Iterator pointing to the start of the range to be
│ │ │ +
616 * inserted.
│ │ │ +
617 * @param __last Iterator pointing to the end of the range.
│ │ │ +
618 *
│ │ │ +
619 * Complexity similar to that of the range constructor.
│ │ │ +
620 */
│ │ │ +
621 template<typename _InputIterator>
│ │ │ +
622 void
│ │ │ +
│ │ │ + │ │ │ +
624 { _M_h.insert(__first, __last); }
│ │ │ +
│ │ │ +
625
│ │ │ +
626 /**
│ │ │ +
627 * @brief Attempts to insert a list of elements into the %unordered_map.
│ │ │ +
628 * @param __l A std::initializer_list<value_type> of elements
│ │ │ +
629 * to be inserted.
│ │ │ +
630 *
│ │ │ +
631 * Complexity similar to that of the range constructor.
│ │ │ +
632 */
│ │ │ +
633 void
│ │ │ +
│ │ │ + │ │ │ +
635 { _M_h.insert(__l); }
│ │ │ +
│ │ │ +
636
│ │ │ +
637
│ │ │ +
638#if __cplusplus > 201402L
│ │ │ +
639 /**
│ │ │ +
640 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ +
641 * @param __k Key to use for finding a possibly existing pair in
│ │ │ +
642 * the map.
│ │ │ +
643 * @param __obj Argument used to generate the .second for a pair
│ │ │ +
644 * instance.
│ │ │ +
645 *
│ │ │ +
646 * @return A pair, of which the first element is an iterator that
│ │ │ +
647 * points to the possibly inserted pair, and the second is
│ │ │ +
648 * a bool that is true if the pair was actually inserted.
│ │ │ +
649 *
│ │ │ +
650 * This function attempts to insert a (key, value) %pair into the
│ │ │ +
651 * %unordered_map. An %unordered_map relies on unique keys and thus a
│ │ │ +
652 * %pair is only inserted if its first element (the key) is not already
│ │ │ +
653 * present in the %unordered_map.
│ │ │ +
654 * If the %pair was already in the %unordered_map, the .second of
│ │ │ +
655 * the %pair is assigned from __obj.
│ │ │ +
656 *
│ │ │ +
657 * Insertion requires amortized constant time.
│ │ │ +
658 */
│ │ │ +
659 template <typename _Obj>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
662 {
│ │ │ +
663 auto __ret = _M_h.try_emplace(cend(), __k,
│ │ │ + │ │ │ +
665 if (!__ret.second)
│ │ │ +
666 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ +
667 return __ret;
│ │ │ +
668 }
│ │ │ +
│ │ │ +
669
│ │ │ +
670 // move-capable overload
│ │ │ +
671 template <typename _Obj>
│ │ │ + │ │ │ + │ │ │ +
674 {
│ │ │ +
675 auto __ret = _M_h.try_emplace(cend(), std::move(__k),
│ │ │ + │ │ │ +
677 if (!__ret.second)
│ │ │ +
678 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ +
679 return __ret;
│ │ │ +
680 }
│ │ │ +
681
│ │ │ +
682 /**
│ │ │ +
683 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ +
684 * @param __hint An iterator that serves as a hint as to where the
│ │ │ +
685 * pair should be inserted.
│ │ │ +
686 * @param __k Key to use for finding a possibly existing pair in
│ │ │ +
687 * the unordered_map.
│ │ │ +
688 * @param __obj Argument used to generate the .second for a pair
│ │ │ +
689 * instance.
│ │ │ +
690 * @return An iterator that points to the element with key of
│ │ │ +
691 * @a __x (may or may not be the %pair passed in).
│ │ │ +
692 *
│ │ │ +
693 * This function is not concerned about whether the insertion took place,
│ │ │ +
694 * and thus does not return a boolean like the single-argument insert()
│ │ │ +
695 * does.
│ │ │ +
696 * If the %pair was already in the %unordered map, the .second of
│ │ │ +
697 * the %pair is assigned from __obj.
│ │ │ +
698 * Note that the first parameter is only a hint and can
│ │ │ +
699 * potentially improve the performance of the insertion process. A bad
│ │ │ +
700 * hint would cause no gains in efficiency.
│ │ │ +
701 *
│ │ │ +
702 * See
│ │ │ +
703 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
704 * for more on @a hinting.
│ │ │ +
705 *
│ │ │ +
706 * Insertion requires amortized constant time.
│ │ │ +
707 */
│ │ │ +
708 template <typename _Obj>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
711 _Obj&& __obj)
│ │ │ +
712 {
│ │ │ +
713 auto __ret = _M_h.try_emplace(__hint, __k, std::forward<_Obj>(__obj));
│ │ │ +
714 if (!__ret.second)
│ │ │ +
715 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ +
716 return __ret.first;
│ │ │ +
717 }
│ │ │ +
│ │ │ +
718
│ │ │ +
719 // move-capable overload
│ │ │ +
720 template <typename _Obj>
│ │ │ + │ │ │ + │ │ │ +
723 {
│ │ │ +
724 auto __ret = _M_h.try_emplace(__hint, std::move(__k),
│ │ │ + │ │ │ +
726 if (!__ret.second)
│ │ │ +
727 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ +
728 return __ret.first;
│ │ │ +
729 }
│ │ │ +
730#endif
│ │ │ +
731
│ │ │ +
732 ///@{
│ │ │ +
733 /**
│ │ │ +
734 * @brief Erases an element from an %unordered_map.
│ │ │ +
735 * @param __position An iterator pointing to the element to be erased.
│ │ │ +
736 * @return An iterator pointing to the element immediately following
│ │ │ +
737 * @a __position prior to the element being erased. If no such
│ │ │ +
738 * element exists, end() is returned.
│ │ │ +
739 *
│ │ │ +
740 * This function erases an element, pointed to by the given iterator,
│ │ │ +
741 * from an %unordered_map.
│ │ │ +
742 * Note that this function only erases the element, and that if the
│ │ │ +
743 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
744 * any way. Managing the pointer is the user's responsibility.
│ │ │ +
745 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
748 { return _M_h.erase(__position); }
│ │ │ +
│ │ │ +
749
│ │ │ +
750 // LWG 2059.
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
753 { return _M_h.erase(__position); }
│ │ │ +
│ │ │ +
754 ///@}
│ │ │ +
755
│ │ │ +
756 /**
│ │ │ +
757 * @brief Erases elements according to the provided key.
│ │ │ +
758 * @param __x Key of element to be erased.
│ │ │ +
759 * @return The number of elements erased.
│ │ │ +
760 *
│ │ │ +
761 * This function erases all the elements located by the given key from
│ │ │ +
762 * an %unordered_map. For an %unordered_map the result of this function
│ │ │ +
763 * can only be 0 (not present) or 1 (present).
│ │ │ +
764 * Note that this function only erases the element, and that if the
│ │ │ +
765 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
766 * any way. Managing the pointer is the user's responsibility.
│ │ │ +
767 */
│ │ │ + │ │ │ +
│ │ │ +
769 erase(const key_type& __x)
│ │ │ +
770 { return _M_h.erase(__x); }
│ │ │ +
│ │ │ +
771
│ │ │ +
772 /**
│ │ │ +
773 * @brief Erases a [__first,__last) range of elements from an
│ │ │ +
774 * %unordered_map.
│ │ │ +
775 * @param __first Iterator pointing to the start of the range to be
│ │ │ +
776 * erased.
│ │ │ +
777 * @param __last Iterator pointing to the end of the range to
│ │ │ +
778 * be erased.
│ │ │ +
779 * @return The iterator @a __last.
│ │ │ +
780 *
│ │ │ +
781 * This function erases a sequence of elements from an %unordered_map.
│ │ │ +
782 * Note that this function only erases the elements, and that if
│ │ │ +
783 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ +
784 * in any way. Managing the pointer is the user's responsibility.
│ │ │ +
785 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
788 { return _M_h.erase(__first, __last); }
│ │ │ +
│ │ │ +
789
│ │ │ +
790 /**
│ │ │ +
791 * Erases all elements in an %unordered_map.
│ │ │ +
792 * Note that this function only erases the elements, and that if the
│ │ │ +
793 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ +
794 * in any way. Managing the pointer is the user's responsibility.
│ │ │ +
795 */
│ │ │ +
796 void
│ │ │ +
│ │ │ +
797 clear() noexcept
│ │ │ +
798 { _M_h.clear(); }
│ │ │ +
│ │ │ +
799
│ │ │ +
800 /**
│ │ │ +
801 * @brief Swaps data with another %unordered_map.
│ │ │ +
802 * @param __x An %unordered_map of the same element and allocator
│ │ │ +
803 * types.
│ │ │ +
804 *
│ │ │ +
805 * This exchanges the elements between two %unordered_map in constant
│ │ │ +
806 * time.
│ │ │ +
807 * Note that the global std::swap() function is specialized such that
│ │ │ +
808 * std::swap(m1,m2) will feed to this function.
│ │ │ +
809 */
│ │ │ +
810 void
│ │ │ +
│ │ │ + │ │ │ +
812 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ +
813 { _M_h.swap(__x._M_h); }
│ │ │ +
│ │ │ +
814
│ │ │ +
815#if __cplusplus > 201402L
│ │ │ +
816 template<typename, typename, typename>
│ │ │ +
817 friend class std::_Hash_merge_helper;
│ │ │ +
818
│ │ │ +
819 template<typename _H2, typename _P2>
│ │ │ +
820 void
│ │ │ + │ │ │ +
822 {
│ │ │ + │ │ │ +
824 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ +
825 }
│ │ │ +
826
│ │ │ +
827 template<typename _H2, typename _P2>
│ │ │ +
828 void
│ │ │ +
829 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ +
830 { merge(__source); }
│ │ │ +
831
│ │ │ +
832 template<typename _H2, typename _P2>
│ │ │ +
833 void
│ │ │ +
834 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source)
│ │ │ +
835 {
│ │ │ +
836 using _Merge_helper = _Hash_merge_helper<unordered_map, _H2, _P2>;
│ │ │ +
837 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ +
838 }
│ │ │ +
839
│ │ │ +
840 template<typename _H2, typename _P2>
│ │ │ +
841 void
│ │ │ +
842 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ +
843 { merge(__source); }
│ │ │ +
844#endif // C++17
│ │ │ +
845
│ │ │ +
846 // observers.
│ │ │
847
│ │ │ -
848 /**
│ │ │ -
849 * @brief May rehash the %unordered_set.
│ │ │ -
850 * @param __n The new number of buckets.
│ │ │ -
851 *
│ │ │ -
852 * Rehash will occur only if the new number of buckets respect the
│ │ │ -
853 * %unordered_set maximum load factor.
│ │ │ -
854 */
│ │ │ -
855 void
│ │ │ -
│ │ │ - │ │ │ -
857 { _M_h.rehash(__n); }
│ │ │ -
│ │ │ -
858
│ │ │ -
859 /**
│ │ │ -
860 * @brief Prepare the %unordered_set for a specified number of
│ │ │ -
861 * elements.
│ │ │ -
862 * @param __n Number of elements required.
│ │ │ -
863 *
│ │ │ -
864 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ -
865 */
│ │ │ -
866 void
│ │ │ -
│ │ │ - │ │ │ -
868 { _M_h.reserve(__n); }
│ │ │ -
│ │ │ -
869
│ │ │ -
870 template<typename _Value1, typename _Hash1, typename _Pred1,
│ │ │ -
871 typename _Alloc1>
│ │ │ -
872 friend bool
│ │ │ - │ │ │ - │ │ │ -
875 };
│ │ │ -
│ │ │ -
876
│ │ │ -
877#if __cpp_deduction_guides >= 201606
│ │ │ -
878
│ │ │ -
879 template<typename _InputIterator,
│ │ │ -
880 typename _Hash =
│ │ │ -
881 hash<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
882 typename _Pred =
│ │ │ -
883 equal_to<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
884 typename _Allocator =
│ │ │ -
885 allocator<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
886 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
887 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
888 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
889 typename = _RequireAllocator<_Allocator>>
│ │ │ -
890 unordered_set(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
892 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ -
893 -> unordered_set<typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
894 _Hash, _Pred, _Allocator>;
│ │ │ -
895
│ │ │ -
896 template<typename _Tp, typename _Hash = hash<_Tp>,
│ │ │ -
897 typename _Pred = equal_to<_Tp>,
│ │ │ -
898 typename _Allocator = allocator<_Tp>,
│ │ │ -
899 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
900 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
901 typename = _RequireAllocator<_Allocator>>
│ │ │ -
902 unordered_set(initializer_list<_Tp>,
│ │ │ - │ │ │ -
904 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ -
905 -> unordered_set<_Tp, _Hash, _Pred, _Allocator>;
│ │ │ -
906
│ │ │ -
907 template<typename _InputIterator, typename _Allocator,
│ │ │ -
908 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
909 typename = _RequireAllocator<_Allocator>>
│ │ │ -
910 unordered_set(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
912 -> unordered_set<typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
913 hash<
│ │ │ -
914 typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
915 equal_to<
│ │ │ -
916 typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
917 _Allocator>;
│ │ │ -
918
│ │ │ -
919 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ -
920 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
921 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
922 typename = _RequireAllocator<_Allocator>>
│ │ │ -
923 unordered_set(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
925 _Hash, _Allocator)
│ │ │ -
926 -> unordered_set<typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
927 _Hash,
│ │ │ -
928 equal_to<
│ │ │ -
929 typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
930 _Allocator>;
│ │ │ -
931
│ │ │ -
932 template<typename _Tp, typename _Allocator,
│ │ │ -
933 typename = _RequireAllocator<_Allocator>>
│ │ │ -
934 unordered_set(initializer_list<_Tp>,
│ │ │ - │ │ │ -
936 -> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
│ │ │ -
937
│ │ │ -
938 template<typename _Tp, typename _Hash, typename _Allocator,
│ │ │ -
939 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
940 typename = _RequireAllocator<_Allocator>>
│ │ │ -
941 unordered_set(initializer_list<_Tp>,
│ │ │ -
942 unordered_set<int>::size_type, _Hash, _Allocator)
│ │ │ -
943 -> unordered_set<_Tp, _Hash, equal_to<_Tp>, _Allocator>;
│ │ │ -
944
│ │ │ -
945#endif
│ │ │ -
946
│ │ │ -
947 /**
│ │ │ -
948 * @brief A standard container composed of equivalent keys
│ │ │ -
949 * (possibly containing multiple of each key value) in which the
│ │ │ -
950 * elements' keys are the elements themselves.
│ │ │ -
951 *
│ │ │ -
952 * @ingroup unordered_associative_containers
│ │ │ -
953 * @headerfile unordered_set
│ │ │ -
954 * @since C++11
│ │ │ -
955 *
│ │ │ -
956 * @tparam _Value Type of key objects.
│ │ │ -
957 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ -
958 * @tparam _Pred Predicate function object type, defaults
│ │ │ -
959 * to equal_to<_Value>.
│ │ │ -
960 * @tparam _Alloc Allocator type, defaults to allocator<_Key>.
│ │ │ -
961 *
│ │ │ -
962 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ -
963 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ -
964 *
│ │ │ -
965 * Base is _Hashtable, dispatched at compile time via template
│ │ │ -
966 * alias __umset_hashtable.
│ │ │ -
967 */
│ │ │ -
968 template<typename _Value,
│ │ │ -
969 typename _Hash = hash<_Value>,
│ │ │ -
970 typename _Pred = equal_to<_Value>,
│ │ │ -
971 typename _Alloc = allocator<_Value>>
│ │ │ -
│ │ │ - │ │ │ -
973 {
│ │ │ - │ │ │ -
975 _Hashtable _M_h;
│ │ │ -
976
│ │ │ -
977 public:
│ │ │ -
978 // typedefs:
│ │ │ -
979 ///@{
│ │ │ -
980 /// Public typedefs.
│ │ │ -
981 typedef typename _Hashtable::key_type key_type;
│ │ │ -
982 typedef typename _Hashtable::value_type value_type;
│ │ │ -
983 typedef typename _Hashtable::hasher hasher;
│ │ │ -
984 typedef typename _Hashtable::key_equal key_equal;
│ │ │ -
985 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ -
986 ///@}
│ │ │ -
987
│ │ │ -
988 ///@{
│ │ │ -
989 /// Iterator-related typedefs.
│ │ │ -
990 typedef typename _Hashtable::pointer pointer;
│ │ │ -
991 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ -
992 typedef typename _Hashtable::reference reference;
│ │ │ -
993 typedef typename _Hashtable::const_reference const_reference;
│ │ │ -
994 typedef typename _Hashtable::iterator iterator;
│ │ │ -
995 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ -
996 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ -
997 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ -
998 typedef typename _Hashtable::size_type size_type;
│ │ │ -
999 typedef typename _Hashtable::difference_type difference_type;
│ │ │ -
1000 ///@}
│ │ │ -
1001
│ │ │ -
1002#if __cplusplus > 201402L
│ │ │ -
1003 using node_type = typename _Hashtable::node_type;
│ │ │ -
1004#endif
│ │ │ +
848 /// Returns the hash functor object with which the %unordered_map was
│ │ │ +
849 /// constructed.
│ │ │ +
850 hasher
│ │ │ +
│ │ │ + │ │ │ +
852 { return _M_h.hash_function(); }
│ │ │ +
│ │ │ +
853
│ │ │ +
854 /// Returns the key comparison object with which the %unordered_map was
│ │ │ +
855 /// constructed.
│ │ │ + │ │ │ +
│ │ │ +
857 key_eq() const
│ │ │ +
858 { return _M_h.key_eq(); }
│ │ │ +
│ │ │ +
859
│ │ │ +
860 // lookup.
│ │ │ +
861
│ │ │ +
862 ///@{
│ │ │ +
863 /**
│ │ │ +
864 * @brief Tries to locate an element in an %unordered_map.
│ │ │ +
865 * @param __x Key to be located.
│ │ │ +
866 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ +
867 * found.
│ │ │ +
868 *
│ │ │ +
869 * This function takes a key and tries to locate the element with which
│ │ │ +
870 * the key matches. If successful the function returns an iterator
│ │ │ +
871 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ +
872 * past-the-end ( @c end() ) iterator.
│ │ │ +
873 */
│ │ │ + │ │ │ +
│ │ │ +
875 find(const key_type& __x)
│ │ │ +
876 { return _M_h.find(__x); }
│ │ │ +
│ │ │ +
877
│ │ │ +
878#if __cplusplus > 201703L
│ │ │ +
879 template<typename _Kt>
│ │ │ +
880 auto
│ │ │ +
│ │ │ +
881 find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x))
│ │ │ +
882 { return _M_h._M_find_tr(__x); }
│ │ │ +
│ │ │ +
883#endif
│ │ │ +
884
│ │ │ + │ │ │ +
│ │ │ +
886 find(const key_type& __x) const
│ │ │ +
887 { return _M_h.find(__x); }
│ │ │ +
│ │ │ +
888
│ │ │ +
889#if __cplusplus > 201703L
│ │ │ +
890 template<typename _Kt>
│ │ │ +
891 auto
│ │ │ +
│ │ │ +
892 find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x))
│ │ │ +
893 { return _M_h._M_find_tr(__x); }
│ │ │ +
│ │ │ +
894#endif
│ │ │ +
895 ///@}
│ │ │ +
896
│ │ │ +
897 ///@{
│ │ │ +
898 /**
│ │ │ +
899 * @brief Finds the number of elements.
│ │ │ +
900 * @param __x Key to count.
│ │ │ +
901 * @return Number of elements with specified key.
│ │ │ +
902 *
│ │ │ +
903 * This function only makes sense for %unordered_multimap; for
│ │ │ +
904 * %unordered_map the result will either be 0 (not present) or 1
│ │ │ +
905 * (present).
│ │ │ +
906 */
│ │ │ + │ │ │ +
│ │ │ +
908 count(const key_type& __x) const
│ │ │ +
909 { return _M_h.count(__x); }
│ │ │ +
│ │ │ +
910
│ │ │ +
911#if __cplusplus > 201703L
│ │ │ +
912 template<typename _Kt>
│ │ │ +
913 auto
│ │ │ +
│ │ │ +
914 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ +
915 { return _M_h._M_count_tr(__x); }
│ │ │ +
│ │ │ +
916#endif
│ │ │ +
917 ///@}
│ │ │ +
918
│ │ │ +
919#if __cplusplus > 201703L
│ │ │ +
920 ///@{
│ │ │ +
921 /**
│ │ │ +
922 * @brief Finds whether an element with the given key exists.
│ │ │ +
923 * @param __x Key of elements to be located.
│ │ │ +
924 * @return True if there is any element with the specified key.
│ │ │ +
925 */
│ │ │ +
926 bool
│ │ │ +
│ │ │ +
927 contains(const key_type& __x) const
│ │ │ +
928 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ +
│ │ │ +
929
│ │ │ +
930 template<typename _Kt>
│ │ │ +
931 auto
│ │ │ +
│ │ │ +
932 contains(const _Kt& __x) const
│ │ │ +
933 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ +
934 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ +
│ │ │ +
935 ///@}
│ │ │ +
936#endif
│ │ │ +
937
│ │ │ +
938 ///@{
│ │ │ +
939 /**
│ │ │ +
940 * @brief Finds a subsequence matching given key.
│ │ │ +
941 * @param __x Key to be located.
│ │ │ +
942 * @return Pair of iterators that possibly points to the subsequence
│ │ │ +
943 * matching given key.
│ │ │ +
944 *
│ │ │ +
945 * This function probably only makes sense for %unordered_multimap.
│ │ │ +
946 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
949 { return _M_h.equal_range(__x); }
│ │ │ +
│ │ │ +
950
│ │ │ +
951#if __cplusplus > 201703L
│ │ │ +
952 template<typename _Kt>
│ │ │ +
953 auto
│ │ │ +
│ │ │ +
954 equal_range(const _Kt& __x)
│ │ │ +
955 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ +
956 { return _M_h._M_equal_range_tr(__x); }
│ │ │ +
│ │ │ +
957#endif
│ │ │ +
958
│ │ │ + │ │ │ +
│ │ │ +
960 equal_range(const key_type& __x) const
│ │ │ +
961 { return _M_h.equal_range(__x); }
│ │ │ +
│ │ │ +
962
│ │ │ +
963#if __cplusplus > 201703L
│ │ │ +
964 template<typename _Kt>
│ │ │ +
965 auto
│ │ │ +
│ │ │ +
966 equal_range(const _Kt& __x) const
│ │ │ +
967 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ +
968 { return _M_h._M_equal_range_tr(__x); }
│ │ │ +
│ │ │ +
969#endif
│ │ │ +
970 ///@}
│ │ │ +
971
│ │ │ +
972 ///@{
│ │ │ +
973 /**
│ │ │ +
974 * @brief Subscript ( @c [] ) access to %unordered_map data.
│ │ │ +
975 * @param __k The key for which data should be retrieved.
│ │ │ +
976 * @return A reference to the data of the (key,data) %pair.
│ │ │ +
977 *
│ │ │ +
978 * Allows for easy lookup with the subscript ( @c [] )operator. Returns
│ │ │ +
979 * data associated with the key specified in subscript. If the key does
│ │ │ +
980 * not exist, a pair with that key is created using default values, which
│ │ │ +
981 * is then returned.
│ │ │ +
982 *
│ │ │ +
983 * Lookup requires constant time.
│ │ │ +
984 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
987 { return _M_h[__k]; }
│ │ │ +
│ │ │ +
988
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
991 { return _M_h[std::move(__k)]; }
│ │ │ +
│ │ │ +
992 ///@}
│ │ │ +
993
│ │ │ +
994 ///@{
│ │ │ +
995 /**
│ │ │ +
996 * @brief Access to %unordered_map data.
│ │ │ +
997 * @param __k The key for which data should be retrieved.
│ │ │ +
998 * @return A reference to the data whose key is equal to @a __k, if
│ │ │ +
999 * such a data is present in the %unordered_map.
│ │ │ +
1000 * @throw std::out_of_range If no such data is present.
│ │ │ +
1001 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1004 { return _M_h.at(__k); }
│ │ │ +
│ │ │
1005
│ │ │ -
1006 // construct/destroy/copy
│ │ │ -
1007
│ │ │ -
1008 /// Default constructor.
│ │ │ - │ │ │ +
1006 const mapped_type&
│ │ │ +
│ │ │ +
1007 at(const key_type& __k) const
│ │ │ +
1008 { return _M_h.at(__k); }
│ │ │ +
│ │ │ +
1009 ///@}
│ │ │
1010
│ │ │ -
1011 /**
│ │ │ -
1012 * @brief Default constructor creates no elements.
│ │ │ -
1013 * @param __n Minimal initial number of buckets.
│ │ │ -
1014 * @param __hf A hash functor.
│ │ │ -
1015 * @param __eql A key equality functor.
│ │ │ -
1016 * @param __a An allocator object.
│ │ │ -
1017 */
│ │ │ -
1018 explicit
│ │ │ -
│ │ │ - │ │ │ -
1020 const hasher& __hf = hasher(),
│ │ │ -
1021 const key_equal& __eql = key_equal(),
│ │ │ -
1022 const allocator_type& __a = allocator_type())
│ │ │ -
1023 : _M_h(__n, __hf, __eql, __a)
│ │ │ -
1024 { }
│ │ │ -
│ │ │ -
1025
│ │ │ -
1026 /**
│ │ │ -
1027 * @brief Builds an %unordered_multiset from a range.
│ │ │ -
1028 * @param __first An input iterator.
│ │ │ -
1029 * @param __last An input iterator.
│ │ │ -
1030 * @param __n Minimal initial number of buckets.
│ │ │ -
1031 * @param __hf A hash functor.
│ │ │ -
1032 * @param __eql A key equality functor.
│ │ │ -
1033 * @param __a An allocator object.
│ │ │ -
1034 *
│ │ │ -
1035 * Create an %unordered_multiset consisting of copies of the elements
│ │ │ -
1036 * from [__first,__last). This is linear in N (where N is
│ │ │ -
1037 * distance(__first,__last)).
│ │ │ -
1038 */
│ │ │ -
1039 template<typename _InputIterator>
│ │ │ -
│ │ │ - │ │ │ -
1041 size_type __n = 0,
│ │ │ -
1042 const hasher& __hf = hasher(),
│ │ │ -
1043 const key_equal& __eql = key_equal(),
│ │ │ -
1044 const allocator_type& __a = allocator_type())
│ │ │ -
1045 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ -
1046 { }
│ │ │ -
│ │ │ -
1047
│ │ │ -
1048 /// Copy constructor.
│ │ │ - │ │ │ +
1011 // bucket interface.
│ │ │ +
1012
│ │ │ +
1013 /// Returns the number of buckets of the %unordered_map.
│ │ │ +
1014 size_type
│ │ │ +
│ │ │ +
1015 bucket_count() const noexcept
│ │ │ +
1016 { return _M_h.bucket_count(); }
│ │ │ +
│ │ │ +
1017
│ │ │ +
1018 /// Returns the maximum number of buckets of the %unordered_map.
│ │ │ +
1019 size_type
│ │ │ +
│ │ │ +
1020 max_bucket_count() const noexcept
│ │ │ +
1021 { return _M_h.max_bucket_count(); }
│ │ │ +
│ │ │ +
1022
│ │ │ +
1023 /*
│ │ │ +
1024 * @brief Returns the number of elements in a given bucket.
│ │ │ +
1025 * @param __n A bucket index.
│ │ │ +
1026 * @return The number of elements in the bucket.
│ │ │ +
1027 */
│ │ │ +
1028 size_type
│ │ │ +
1029 bucket_size(size_type __n) const
│ │ │ +
1030 { return _M_h.bucket_size(__n); }
│ │ │ +
1031
│ │ │ +
1032 /*
│ │ │ +
1033 * @brief Returns the bucket index of a given element.
│ │ │ +
1034 * @param __key A key instance.
│ │ │ +
1035 * @return The key bucket index.
│ │ │ +
1036 */
│ │ │ +
1037 size_type
│ │ │ +
1038 bucket(const key_type& __key) const
│ │ │ +
1039 { return _M_h.bucket(__key); }
│ │ │ +
1040
│ │ │ +
1041 /**
│ │ │ +
1042 * @brief Returns a read/write iterator pointing to the first bucket
│ │ │ +
1043 * element.
│ │ │ +
1044 * @param __n The bucket index.
│ │ │ +
1045 * @return A read/write local iterator.
│ │ │ +
1046 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1049 { return _M_h.begin(__n); }
│ │ │ +
│ │ │
1050
│ │ │ -
1051 /// Move constructor.
│ │ │ - │ │ │ -
1053
│ │ │ -
1054 /**
│ │ │ -
1055 * @brief Builds an %unordered_multiset from an initializer_list.
│ │ │ -
1056 * @param __l An initializer_list.
│ │ │ -
1057 * @param __n Minimal initial number of buckets.
│ │ │ -
1058 * @param __hf A hash functor.
│ │ │ -
1059 * @param __eql A key equality functor.
│ │ │ -
1060 * @param __a An allocator object.
│ │ │ -
1061 *
│ │ │ -
1062 * Create an %unordered_multiset consisting of copies of the elements in
│ │ │ -
1063 * the list. This is linear in N (where N is @a __l.size()).
│ │ │ -
1064 */
│ │ │ -
│ │ │ - │ │ │ -
1066 size_type __n = 0,
│ │ │ -
1067 const hasher& __hf = hasher(),
│ │ │ -
1068 const key_equal& __eql = key_equal(),
│ │ │ -
1069 const allocator_type& __a = allocator_type())
│ │ │ -
1070 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ -
1071 { }
│ │ │ -
│ │ │ -
1072
│ │ │ -
1073 /// Copy assignment operator.
│ │ │ - │ │ │ - │ │ │ -
1076
│ │ │ -
1077 /// Move assignment operator.
│ │ │ - │ │ │ - │ │ │ -
1080
│ │ │ -
1081 /**
│ │ │ -
1082 * @brief Creates an %unordered_multiset with no elements.
│ │ │ -
1083 * @param __a An allocator object.
│ │ │ -
1084 */
│ │ │ -
1085 explicit
│ │ │ -
│ │ │ - │ │ │ -
1087 : _M_h(__a)
│ │ │ -
1088 { }
│ │ │ -
│ │ │ -
1089
│ │ │ -
1090 /*
│ │ │ -
1091 * @brief Copy constructor with allocator argument.
│ │ │ -
1092 * @param __uset Input %unordered_multiset to copy.
│ │ │ -
1093 * @param __a An allocator object.
│ │ │ -
1094 */
│ │ │ - │ │ │ -
1096 const allocator_type& __a)
│ │ │ -
1097 : _M_h(__umset._M_h, __a)
│ │ │ -
1098 { }
│ │ │ -
1099
│ │ │ -
1100 /*
│ │ │ -
1101 * @brief Move constructor with allocator argument.
│ │ │ -
1102 * @param __umset Input %unordered_multiset to move.
│ │ │ -
1103 * @param __a An allocator object.
│ │ │ -
1104 */
│ │ │ - │ │ │ -
1106 const allocator_type& __a)
│ │ │ -
1107 noexcept( noexcept(_Hashtable(std::move(__umset._M_h), __a)) )
│ │ │ -
1108 : _M_h(std::move(__umset._M_h), __a)
│ │ │ -
1109 { }
│ │ │ -
1110
│ │ │ - │ │ │ -
1112 : unordered_multiset(__n, hasher(), key_equal(), __a)
│ │ │ -
1113 { }
│ │ │ -
1114
│ │ │ -
1115 unordered_multiset(size_type __n, const hasher& __hf,
│ │ │ -
1116 const allocator_type& __a)
│ │ │ -
1117 : unordered_multiset(__n, __hf, key_equal(), __a)
│ │ │ -
1118 { }
│ │ │ -
1119
│ │ │ -
1120 template<typename _InputIterator>
│ │ │ -
1121 unordered_multiset(_InputIterator __first, _InputIterator __last,
│ │ │ -
1122 size_type __n,
│ │ │ -
1123 const allocator_type& __a)
│ │ │ -
1124 : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ -
1125 { }
│ │ │ -
1126
│ │ │ -
1127 template<typename _InputIterator>
│ │ │ -
1128 unordered_multiset(_InputIterator __first, _InputIterator __last,
│ │ │ -
1129 size_type __n, const hasher& __hf,
│ │ │ -
1130 const allocator_type& __a)
│ │ │ -
1131 : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ -
1132 { }
│ │ │ -
1133
│ │ │ -
1134 unordered_multiset(initializer_list<value_type> __l,
│ │ │ -
1135 size_type __n,
│ │ │ -
1136 const allocator_type& __a)
│ │ │ -
1137 : unordered_multiset(__l, __n, hasher(), key_equal(), __a)
│ │ │ -
1138 { }
│ │ │ -
1139
│ │ │ -
1140 unordered_multiset(initializer_list<value_type> __l,
│ │ │ -
1141 size_type __n, const hasher& __hf,
│ │ │ -
1142 const allocator_type& __a)
│ │ │ -
1143 : unordered_multiset(__l, __n, __hf, key_equal(), __a)
│ │ │ -
1144 { }
│ │ │ -
1145
│ │ │ -
1146 /**
│ │ │ -
1147 * @brief %Unordered_multiset list assignment operator.
│ │ │ -
1148 * @param __l An initializer_list.
│ │ │ -
1149 *
│ │ │ -
1150 * This function fills an %unordered_multiset with copies of the elements
│ │ │ -
1151 * in the initializer list @a __l.
│ │ │ -
1152 *
│ │ │ -
1153 * Note that the assignment completely changes the %unordered_multiset
│ │ │ -
1154 * and that the resulting %unordered_multiset's size is the same as the
│ │ │ -
1155 * number of elements assigned.
│ │ │ -
1156 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1159 {
│ │ │ -
1160 _M_h = __l;
│ │ │ -
1161 return *this;
│ │ │ -
1162 }
│ │ │ -
│ │ │ -
1163
│ │ │ -
1164 /// Returns the allocator object used by the %unordered_multiset.
│ │ │ - │ │ │ -
│ │ │ -
1166 get_allocator() const noexcept
│ │ │ -
1167 { return _M_h.get_allocator(); }
│ │ │ -
│ │ │ -
1168
│ │ │ -
1169 // size and capacity:
│ │ │ -
1170
│ │ │ -
1171 /// Returns true if the %unordered_multiset is empty.
│ │ │ -
1172 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
1173 empty() const noexcept
│ │ │ -
1174 { return _M_h.empty(); }
│ │ │ -
│ │ │ -
1175
│ │ │ -
1176 /// Returns the size of the %unordered_multiset.
│ │ │ -
1177 size_type
│ │ │ -
│ │ │ -
1178 size() const noexcept
│ │ │ -
1179 { return _M_h.size(); }
│ │ │ -
│ │ │ -
1180
│ │ │ -
1181 /// Returns the maximum size of the %unordered_multiset.
│ │ │ -
1182 size_type
│ │ │ -
│ │ │ -
1183 max_size() const noexcept
│ │ │ -
1184 { return _M_h.max_size(); }
│ │ │ -
│ │ │ -
1185
│ │ │ -
1186 // iterators.
│ │ │ -
1187
│ │ │ -
1188 ///@{
│ │ │ -
1189 /**
│ │ │ -
1190 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
1191 * element in the %unordered_multiset.
│ │ │ -
1192 */
│ │ │ -
1193 iterator
│ │ │ -
│ │ │ -
1194 begin() noexcept
│ │ │ -
1195 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1196
│ │ │ - │ │ │ -
│ │ │ -
1198 begin() const noexcept
│ │ │ -
1199 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1200 ///@}
│ │ │ -
1201
│ │ │ -
1202 ///@{
│ │ │ -
1203 /**
│ │ │ -
1204 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
1205 * element in the %unordered_multiset.
│ │ │ -
1206 */
│ │ │ -
1207 iterator
│ │ │ -
│ │ │ -
1208 end() noexcept
│ │ │ -
1209 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1210
│ │ │ - │ │ │ -
│ │ │ -
1212 end() const noexcept
│ │ │ -
1213 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1214 ///@}
│ │ │ -
1215
│ │ │ -
1216 /**
│ │ │ -
1217 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
1218 * element in the %unordered_multiset.
│ │ │ -
1219 */
│ │ │ - │ │ │ -
│ │ │ -
1221 cbegin() const noexcept
│ │ │ -
1222 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1223
│ │ │ -
1224 /**
│ │ │ -
1225 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
1226 * element in the %unordered_multiset.
│ │ │ -
1227 */
│ │ │ - │ │ │ -
│ │ │ -
1229 cend() const noexcept
│ │ │ -
1230 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1231
│ │ │ -
1232 // modifiers.
│ │ │ -
1233
│ │ │ -
1234 /**
│ │ │ -
1235 * @brief Builds and insert an element into the %unordered_multiset.
│ │ │ -
1236 * @param __args Arguments used to generate an element.
│ │ │ -
1237 * @return An iterator that points to the inserted element.
│ │ │ -
1238 *
│ │ │ -
1239 * Insertion requires amortized constant time.
│ │ │ -
1240 */
│ │ │ -
1241 template<typename... _Args>
│ │ │ -
1242 iterator
│ │ │ -
│ │ │ - │ │ │ -
1244 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
1245
│ │ │ -
1246 /**
│ │ │ -
1247 * @brief Inserts an element into the %unordered_multiset.
│ │ │ -
1248 * @param __pos An iterator that serves as a hint as to where the
│ │ │ -
1249 * element should be inserted.
│ │ │ -
1250 * @param __args Arguments used to generate the element to be
│ │ │ -
1251 * inserted.
│ │ │ -
1252 * @return An iterator that points to the inserted element.
│ │ │ -
1253 *
│ │ │ -
1254 * Note that the first parameter is only a hint and can potentially
│ │ │ -
1255 * improve the performance of the insertion process. A bad hint would
│ │ │ -
1256 * cause no gains in efficiency.
│ │ │ -
1257 *
│ │ │ -
1258 * For more on @a hinting, see:
│ │ │ -
1259 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
1260 *
│ │ │ -
1261 * Insertion requires amortized constant time.
│ │ │ -
1262 */
│ │ │ -
1263 template<typename... _Args>
│ │ │ -
1264 iterator
│ │ │ -
│ │ │ - │ │ │ -
1266 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
1267
│ │ │ -
1268 ///@{
│ │ │ -
1269 /**
│ │ │ -
1270 * @brief Inserts an element into the %unordered_multiset.
│ │ │ -
1271 * @param __x Element to be inserted.
│ │ │ -
1272 * @return An iterator that points to the inserted element.
│ │ │ -
1273 *
│ │ │ -
1274 * Insertion requires amortized constant time.
│ │ │ -
1275 */
│ │ │ -
1276 iterator
│ │ │ -
│ │ │ -
1277 insert(const value_type& __x)
│ │ │ -
1278 { return _M_h.insert(__x); }
│ │ │ -
│ │ │ -
1279
│ │ │ -
1280 iterator
│ │ │ -
│ │ │ - │ │ │ -
1282 { return _M_h.insert(std::move(__x)); }
│ │ │ +
1051 ///@{
│ │ │ +
1052 /**
│ │ │ +
1053 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ +
1054 * bucket element.
│ │ │ +
1055 * @param __n The bucket index.
│ │ │ +
1056 * @return A read-only local iterator.
│ │ │ +
1057 */
│ │ │ + │ │ │ +
│ │ │ +
1059 begin(size_type __n) const
│ │ │ +
1060 { return _M_h.begin(__n); }
│ │ │ +
│ │ │ +
1061
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1064 { return _M_h.cbegin(__n); }
│ │ │ +
│ │ │ +
1065 ///@}
│ │ │ +
1066
│ │ │ +
1067 /**
│ │ │ +
1068 * @brief Returns a read/write iterator pointing to one past the last
│ │ │ +
1069 * bucket elements.
│ │ │ +
1070 * @param __n The bucket index.
│ │ │ +
1071 * @return A read/write local iterator.
│ │ │ +
1072 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1075 { return _M_h.end(__n); }
│ │ │
│ │ │ +
1076
│ │ │ +
1077 ///@{
│ │ │ +
1078 /**
│ │ │ +
1079 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ +
1080 * the last bucket elements.
│ │ │ +
1081 * @param __n The bucket index.
│ │ │ +
1082 * @return A read-only local iterator.
│ │ │ +
1083 */
│ │ │ + │ │ │ +
│ │ │ +
1085 end(size_type __n) const
│ │ │ +
1086 { return _M_h.end(__n); }
│ │ │ +
│ │ │ +
1087
│ │ │ + │ │ │ +
│ │ │ +
1089 cend(size_type __n) const
│ │ │ +
1090 { return _M_h.cend(__n); }
│ │ │ +
│ │ │ +
1091 ///@}
│ │ │ +
1092
│ │ │ +
1093 // hash policy.
│ │ │ +
1094
│ │ │ +
1095 /// Returns the average number of elements per bucket.
│ │ │ +
1096 float
│ │ │ +
│ │ │ +
1097 load_factor() const noexcept
│ │ │ +
1098 { return _M_h.load_factor(); }
│ │ │ +
│ │ │ +
1099
│ │ │ +
1100 /// Returns a positive number that the %unordered_map tries to keep the
│ │ │ +
1101 /// load factor less than or equal to.
│ │ │ +
1102 float
│ │ │ +
│ │ │ +
1103 max_load_factor() const noexcept
│ │ │ +
1104 { return _M_h.max_load_factor(); }
│ │ │ +
│ │ │ +
1105
│ │ │ +
1106 /**
│ │ │ +
1107 * @brief Change the %unordered_map maximum load factor.
│ │ │ +
1108 * @param __z The new maximum load factor.
│ │ │ +
1109 */
│ │ │ +
1110 void
│ │ │ +
│ │ │ + │ │ │ +
1112 { _M_h.max_load_factor(__z); }
│ │ │ +
│ │ │ +
1113
│ │ │ +
1114 /**
│ │ │ +
1115 * @brief May rehash the %unordered_map.
│ │ │ +
1116 * @param __n The new number of buckets.
│ │ │ +
1117 *
│ │ │ +
1118 * Rehash will occur only if the new number of buckets respect the
│ │ │ +
1119 * %unordered_map maximum load factor.
│ │ │ +
1120 */
│ │ │ +
1121 void
│ │ │ +
│ │ │ + │ │ │ +
1123 { _M_h.rehash(__n); }
│ │ │ +
│ │ │ +
1124
│ │ │ +
1125 /**
│ │ │ +
1126 * @brief Prepare the %unordered_map for a specified number of
│ │ │ +
1127 * elements.
│ │ │ +
1128 * @param __n Number of elements required.
│ │ │ +
1129 *
│ │ │ +
1130 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ +
1131 */
│ │ │ +
1132 void
│ │ │ +
│ │ │ + │ │ │ +
1134 { _M_h.reserve(__n); }
│ │ │ +
│ │ │ +
1135
│ │ │ +
1136 template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1,
│ │ │ +
1137 typename _Alloc1>
│ │ │ +
1138 friend bool
│ │ │ + │ │ │ + │ │ │ +
1141 };
│ │ │ +
│ │ │ +
1142
│ │ │ +
1143#if __cpp_deduction_guides >= 201606
│ │ │ +
1144
│ │ │ +
1145 template<typename _InputIterator,
│ │ │ +
1146 typename _Hash = hash<__iter_key_t<_InputIterator>>,
│ │ │ +
1147 typename _Pred = equal_to<__iter_key_t<_InputIterator>>,
│ │ │ +
1148 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
│ │ │ +
1149 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1150 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
1151 typename = _RequireNotAllocator<_Pred>,
│ │ │ +
1152 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1153 unordered_map(_InputIterator, _InputIterator,
│ │ │ + │ │ │ +
1155 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ +
1156 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ +
1157 __iter_val_t<_InputIterator>,
│ │ │ +
1158 _Hash, _Pred, _Allocator>;
│ │ │ +
1159
│ │ │ +
1160 template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
│ │ │ +
1161 typename _Pred = equal_to<_Key>,
│ │ │ +
1162 typename _Allocator = allocator<pair<const _Key, _Tp>>,
│ │ │ +
1163 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
1164 typename = _RequireNotAllocator<_Pred>,
│ │ │ +
1165 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1166 unordered_map(initializer_list<pair<_Key, _Tp>>,
│ │ │ + │ │ │ +
1168 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ +
1169 -> unordered_map<_Key, _Tp, _Hash, _Pred, _Allocator>;
│ │ │ +
1170
│ │ │ +
1171 template<typename _InputIterator, typename _Allocator,
│ │ │ +
1172 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1173 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1174 unordered_map(_InputIterator, _InputIterator,
│ │ │ +
1175 typename unordered_map<int, int>::size_type, _Allocator)
│ │ │ +
1176 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ +
1177 __iter_val_t<_InputIterator>,
│ │ │ +
1178 hash<__iter_key_t<_InputIterator>>,
│ │ │ +
1179 equal_to<__iter_key_t<_InputIterator>>,
│ │ │ +
1180 _Allocator>;
│ │ │ +
1181
│ │ │ +
1182 template<typename _InputIterator, typename _Allocator,
│ │ │ +
1183 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1184 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1185 unordered_map(_InputIterator, _InputIterator, _Allocator)
│ │ │ +
1186 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ +
1187 __iter_val_t<_InputIterator>,
│ │ │ +
1188 hash<__iter_key_t<_InputIterator>>,
│ │ │ +
1189 equal_to<__iter_key_t<_InputIterator>>,
│ │ │ +
1190 _Allocator>;
│ │ │ +
1191
│ │ │ +
1192 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ +
1193 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1194 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
1195 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1196 unordered_map(_InputIterator, _InputIterator,
│ │ │ + │ │ │ +
1198 _Hash, _Allocator)
│ │ │ +
1199 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ +
1200 __iter_val_t<_InputIterator>, _Hash,
│ │ │ +
1201 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ +
1202
│ │ │ +
1203 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ +
1204 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1205 unordered_map(initializer_list<pair<_Key, _Tp>>,
│ │ │ + │ │ │ +
1207 _Allocator)
│ │ │ +
1208 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ +
1209
│ │ │ +
1210 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ +
1211 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1212 unordered_map(initializer_list<pair<_Key, _Tp>>, _Allocator)
│ │ │ +
1213 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ +
1214
│ │ │ +
1215 template<typename _Key, typename _Tp, typename _Hash, typename _Allocator,
│ │ │ +
1216 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
1217 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1218 unordered_map(initializer_list<pair<_Key, _Tp>>,
│ │ │ + │ │ │ +
1220 _Hash, _Allocator)
│ │ │ +
1221 -> unordered_map<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>;
│ │ │ +
1222
│ │ │ +
1223#endif
│ │ │ +
1224
│ │ │ +
1225 /**
│ │ │ +
1226 * @brief A standard container composed of equivalent keys
│ │ │ +
1227 * (possibly containing multiple of each key value) that associates
│ │ │ +
1228 * values of another type with the keys.
│ │ │ +
1229 *
│ │ │ +
1230 * @ingroup unordered_associative_containers
│ │ │ +
1231 * @headerfile unordered_map
│ │ │ +
1232 * @since C++11
│ │ │ +
1233 *
│ │ │ +
1234 * @tparam _Key Type of key objects.
│ │ │ +
1235 * @tparam _Tp Type of mapped objects.
│ │ │ +
1236 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ +
1237 * @tparam _Pred Predicate function object type, defaults
│ │ │ +
1238 * to equal_to<_Value>.
│ │ │ +
1239 * @tparam _Alloc Allocator type, defaults to
│ │ │ +
1240 * std::allocator<std::pair<const _Key, _Tp>>.
│ │ │ +
1241 *
│ │ │ +
1242 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ +
1243 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ +
1244 *
│ │ │ +
1245 * The resulting value type of the container is std::pair<const _Key, _Tp>.
│ │ │ +
1246 *
│ │ │ +
1247 * Base is _Hashtable, dispatched at compile time via template
│ │ │ +
1248 * alias __ummap_hashtable.
│ │ │ +
1249 */
│ │ │ +
1250 template<typename _Key, typename _Tp,
│ │ │ +
1251 typename _Hash = hash<_Key>,
│ │ │ +
1252 typename _Pred = equal_to<_Key>,
│ │ │ +
1253 typename _Alloc = allocator<std::pair<const _Key, _Tp>>>
│ │ │ +
│ │ │ + │ │ │ +
1255 {
│ │ │ + │ │ │ +
1257 _Hashtable _M_h;
│ │ │ +
1258
│ │ │ +
1259 public:
│ │ │ +
1260 // typedefs:
│ │ │ +
1261 ///@{
│ │ │ +
1262 /// Public typedefs.
│ │ │ +
1263 typedef typename _Hashtable::key_type key_type;
│ │ │ +
1264 typedef typename _Hashtable::value_type value_type;
│ │ │ +
1265 typedef typename _Hashtable::mapped_type mapped_type;
│ │ │ +
1266 typedef typename _Hashtable::hasher hasher;
│ │ │ +
1267 typedef typename _Hashtable::key_equal key_equal;
│ │ │ +
1268 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ +
1269 ///@}
│ │ │ +
1270
│ │ │ +
1271 ///@{
│ │ │ +
1272 /// Iterator-related typedefs.
│ │ │ +
1273 typedef typename _Hashtable::pointer pointer;
│ │ │ +
1274 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ +
1275 typedef typename _Hashtable::reference reference;
│ │ │ +
1276 typedef typename _Hashtable::const_reference const_reference;
│ │ │ +
1277 typedef typename _Hashtable::iterator iterator;
│ │ │ +
1278 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ +
1279 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ +
1280 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ +
1281 typedef typename _Hashtable::size_type size_type;
│ │ │ +
1282 typedef typename _Hashtable::difference_type difference_type;
│ │ │
1283 ///@}
│ │ │ -
1284
│ │ │ -
1285 ///@{
│ │ │ -
1286 /**
│ │ │ -
1287 * @brief Inserts an element into the %unordered_multiset.
│ │ │ -
1288 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
1289 * element should be inserted.
│ │ │ -
1290 * @param __x Element to be inserted.
│ │ │ -
1291 * @return An iterator that points to the inserted element.
│ │ │ -
1292 *
│ │ │ -
1293 * Note that the first parameter is only a hint and can potentially
│ │ │ -
1294 * improve the performance of the insertion process. A bad hint would
│ │ │ -
1295 * cause no gains in efficiency.
│ │ │ -
1296 *
│ │ │ -
1297 * For more on @a hinting, see:
│ │ │ -
1298 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
1299 *
│ │ │ -
1300 * Insertion requires amortized constant.
│ │ │ -
1301 */
│ │ │ -
1302 iterator
│ │ │ -
│ │ │ - │ │ │ -
1304 { return _M_h.insert(__hint, __x); }
│ │ │ -
│ │ │ -
1305
│ │ │ -
1306 iterator
│ │ │ -
│ │ │ - │ │ │ -
1308 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ -
│ │ │ -
1309 ///@}
│ │ │ -
1310
│ │ │ -
1311 /**
│ │ │ -
1312 * @brief A template function that inserts a range of elements.
│ │ │ -
1313 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
1314 * inserted.
│ │ │ -
1315 * @param __last Iterator pointing to the end of the range.
│ │ │ -
1316 *
│ │ │ -
1317 * Complexity similar to that of the range constructor.
│ │ │ -
1318 */
│ │ │ -
1319 template<typename _InputIterator>
│ │ │ -
1320 void
│ │ │ -
│ │ │ - │ │ │ -
1322 { _M_h.insert(__first, __last); }
│ │ │ -
│ │ │ -
1323
│ │ │ -
1324 /**
│ │ │ -
1325 * @brief Inserts a list of elements into the %unordered_multiset.
│ │ │ -
1326 * @param __l A std::initializer_list<value_type> of elements to be
│ │ │ -
1327 * inserted.
│ │ │ -
1328 *
│ │ │ -
1329 * Complexity similar to that of the range constructor.
│ │ │ -
1330 */
│ │ │ -
1331 void
│ │ │ -
│ │ │ - │ │ │ -
1333 { _M_h.insert(__l); }
│ │ │ -
│ │ │ -
1334
│ │ │ -
1335#if __cplusplus > 201402L
│ │ │ -
1336 /// Extract a node.
│ │ │ -
1337 node_type
│ │ │ -
│ │ │ - │ │ │ -
1339 {
│ │ │ -
1340 __glibcxx_assert(__pos != end());
│ │ │ -
1341 return _M_h.extract(__pos);
│ │ │ -
1342 }
│ │ │ -
│ │ │ -
1343
│ │ │ -
1344 /// Extract a node.
│ │ │ -
1345 node_type
│ │ │ -
│ │ │ - │ │ │ -
1347 { return _M_h.extract(__key); }
│ │ │ -
│ │ │ -
1348
│ │ │ -
1349 /// Re-insert an extracted node.
│ │ │ -
1350 iterator
│ │ │ -
│ │ │ -
1351 insert(node_type&& __nh)
│ │ │ -
1352 { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); }
│ │ │ -
│ │ │ -
1353
│ │ │ -
1354 /// Re-insert an extracted node.
│ │ │ -
1355 iterator
│ │ │ -
│ │ │ - │ │ │ -
1357 { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); }
│ │ │ -
│ │ │ -
1358#endif // C++17
│ │ │ -
1359
│ │ │ -
1360 ///@{
│ │ │ -
1361 /**
│ │ │ -
1362 * @brief Erases an element from an %unordered_multiset.
│ │ │ -
1363 * @param __position An iterator pointing to the element to be erased.
│ │ │ -
1364 * @return An iterator pointing to the element immediately following
│ │ │ -
1365 * @a __position prior to the element being erased. If no such
│ │ │ -
1366 * element exists, end() is returned.
│ │ │ -
1367 *
│ │ │ -
1368 * This function erases an element, pointed to by the given iterator,
│ │ │ -
1369 * from an %unordered_multiset.
│ │ │ -
1370 *
│ │ │ -
1371 * Note that this function only erases the element, and that if the
│ │ │ -
1372 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
1373 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
1374 */
│ │ │ -
1375 iterator
│ │ │ -
│ │ │ - │ │ │ -
1377 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
1378
│ │ │ -
1379 // LWG 2059.
│ │ │ -
1380 iterator
│ │ │ -
│ │ │ - │ │ │ -
1382 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
1383 ///@}
│ │ │ -
1384
│ │ │ -
1385
│ │ │ -
1386 /**
│ │ │ -
1387 * @brief Erases elements according to the provided key.
│ │ │ -
1388 * @param __x Key of element to be erased.
│ │ │ -
1389 * @return The number of elements erased.
│ │ │ -
1390 *
│ │ │ -
1391 * This function erases all the elements located by the given key from
│ │ │ -
1392 * an %unordered_multiset.
│ │ │ -
1393 *
│ │ │ -
1394 * Note that this function only erases the element, and that if the
│ │ │ -
1395 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
1396 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
1397 */
│ │ │ -
1398 size_type
│ │ │ -
│ │ │ -
1399 erase(const key_type& __x)
│ │ │ -
1400 { return _M_h.erase(__x); }
│ │ │ -
│ │ │ -
1401
│ │ │ -
1402 /**
│ │ │ -
1403 * @brief Erases a [__first,__last) range of elements from an
│ │ │ -
1404 * %unordered_multiset.
│ │ │ -
1405 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
1406 * erased.
│ │ │ -
1407 * @param __last Iterator pointing to the end of the range to
│ │ │ -
1408 * be erased.
│ │ │ -
1409 * @return The iterator @a __last.
│ │ │ -
1410 *
│ │ │ -
1411 * This function erases a sequence of elements from an
│ │ │ -
1412 * %unordered_multiset.
│ │ │ -
1413 *
│ │ │ -
1414 * Note that this function only erases the element, and that if
│ │ │ -
1415 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
1416 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
1417 */
│ │ │ -
1418 iterator
│ │ │ -
│ │ │ - │ │ │ -
1420 { return _M_h.erase(__first, __last); }
│ │ │ -
│ │ │ -
1421
│ │ │ -
1422 /**
│ │ │ -
1423 * Erases all elements in an %unordered_multiset.
│ │ │ -
1424 *
│ │ │ -
1425 * Note that this function only erases the elements, and that if the
│ │ │ -
1426 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ -
1427 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
1428 */
│ │ │ -
1429 void
│ │ │ -
│ │ │ -
1430 clear() noexcept
│ │ │ -
1431 { _M_h.clear(); }
│ │ │ -
│ │ │ -
1432
│ │ │ -
1433 /**
│ │ │ -
1434 * @brief Swaps data with another %unordered_multiset.
│ │ │ -
1435 * @param __x An %unordered_multiset of the same element and allocator
│ │ │ -
1436 * types.
│ │ │ -
1437 *
│ │ │ -
1438 * This exchanges the elements between two sets in constant time.
│ │ │ -
1439 * Note that the global std::swap() function is specialized such that
│ │ │ -
1440 * std::swap(s1,s2) will feed to this function.
│ │ │ -
1441 */
│ │ │ -
1442 void
│ │ │ -
│ │ │ - │ │ │ -
1444 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ -
1445 { _M_h.swap(__x._M_h); }
│ │ │ -
│ │ │ -
1446
│ │ │ -
1447#if __cplusplus > 201402L
│ │ │ -
1448 template<typename, typename, typename>
│ │ │ -
1449 friend class std::_Hash_merge_helper;
│ │ │ -
1450
│ │ │ -
1451 template<typename _H2, typename _P2>
│ │ │ -
1452 void
│ │ │ - │ │ │ -
1454 {
│ │ │ -
1455 using _Merge_helper
│ │ │ - │ │ │ -
1457 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ -
1458 }
│ │ │ -
1459
│ │ │ -
1460 template<typename _H2, typename _P2>
│ │ │ -
1461 void
│ │ │ -
1462 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source)
│ │ │ -
1463 { merge(__source); }
│ │ │ -
1464
│ │ │ -
1465 template<typename _H2, typename _P2>
│ │ │ -
1466 void
│ │ │ -
1467 merge(unordered_set<_Value, _H2, _P2, _Alloc>& __source)
│ │ │ -
1468 {
│ │ │ -
1469 using _Merge_helper
│ │ │ -
1470 = _Hash_merge_helper<unordered_multiset, _H2, _P2>;
│ │ │ -
1471 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ -
1472 }
│ │ │ -
1473
│ │ │ -
1474 template<typename _H2, typename _P2>
│ │ │ -
1475 void
│ │ │ -
1476 merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source)
│ │ │ -
1477 { merge(__source); }
│ │ │ -
1478#endif // C++17
│ │ │ -
1479
│ │ │ -
1480 // observers.
│ │ │ -
1481
│ │ │ -
1482 /// Returns the hash functor object with which the %unordered_multiset
│ │ │ -
1483 /// was constructed.
│ │ │ -
1484 hasher
│ │ │ +
1284
│ │ │ +
1285#if __cplusplus > 201402L
│ │ │ +
1286 using node_type = typename _Hashtable::node_type;
│ │ │ +
1287#endif
│ │ │ +
1288
│ │ │ +
1289 //construct/destroy/copy
│ │ │ +
1290
│ │ │ +
1291 /// Default constructor.
│ │ │ + │ │ │ +
1293
│ │ │ +
1294 /**
│ │ │ +
1295 * @brief Default constructor creates no elements.
│ │ │ +
1296 * @param __n Mnimal initial number of buckets.
│ │ │ +
1297 * @param __hf A hash functor.
│ │ │ +
1298 * @param __eql A key equality functor.
│ │ │ +
1299 * @param __a An allocator object.
│ │ │ +
1300 */
│ │ │ +
1301 explicit
│ │ │ +
│ │ │ + │ │ │ +
1303 const hasher& __hf = hasher(),
│ │ │ +
1304 const key_equal& __eql = key_equal(),
│ │ │ +
1305 const allocator_type& __a = allocator_type())
│ │ │ +
1306 : _M_h(__n, __hf, __eql, __a)
│ │ │ +
1307 { }
│ │ │ +
│ │ │ +
1308
│ │ │ +
1309 /**
│ │ │ +
1310 * @brief Builds an %unordered_multimap from a range.
│ │ │ +
1311 * @param __first An input iterator.
│ │ │ +
1312 * @param __last An input iterator.
│ │ │ +
1313 * @param __n Minimal initial number of buckets.
│ │ │ +
1314 * @param __hf A hash functor.
│ │ │ +
1315 * @param __eql A key equality functor.
│ │ │ +
1316 * @param __a An allocator object.
│ │ │ +
1317 *
│ │ │ +
1318 * Create an %unordered_multimap consisting of copies of the elements
│ │ │ +
1319 * from [__first,__last). This is linear in N (where N is
│ │ │ +
1320 * distance(__first,__last)).
│ │ │ +
1321 */
│ │ │ +
1322 template<typename _InputIterator>
│ │ │ +
│ │ │ + │ │ │ +
1324 size_type __n = 0,
│ │ │ +
1325 const hasher& __hf = hasher(),
│ │ │ +
1326 const key_equal& __eql = key_equal(),
│ │ │ +
1327 const allocator_type& __a = allocator_type())
│ │ │ +
1328 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ +
1329 { }
│ │ │ +
│ │ │ +
1330
│ │ │ +
1331 /// Copy constructor.
│ │ │ + │ │ │ +
1333
│ │ │ +
1334 /// Move constructor.
│ │ │ + │ │ │ +
1336
│ │ │ +
1337 /**
│ │ │ +
1338 * @brief Creates an %unordered_multimap with no elements.
│ │ │ +
1339 * @param __a An allocator object.
│ │ │ +
1340 */
│ │ │ +
1341 explicit
│ │ │ +
│ │ │ + │ │ │ +
1343 : _M_h(__a)
│ │ │ +
1344 { }
│ │ │ +
│ │ │ +
1345
│ │ │ +
1346 /*
│ │ │ +
1347 * @brief Copy constructor with allocator argument.
│ │ │ +
1348 * @param __uset Input %unordered_multimap to copy.
│ │ │ +
1349 * @param __a An allocator object.
│ │ │ +
1350 */
│ │ │ + │ │ │ +
1352 const allocator_type& __a)
│ │ │ +
1353 : _M_h(__ummap._M_h, __a)
│ │ │ +
1354 { }
│ │ │ +
1355
│ │ │ +
1356 /*
│ │ │ +
1357 * @brief Move constructor with allocator argument.
│ │ │ +
1358 * @param __uset Input %unordered_multimap to move.
│ │ │ +
1359 * @param __a An allocator object.
│ │ │ +
1360 */
│ │ │ + │ │ │ +
1362 const allocator_type& __a)
│ │ │ +
1363 noexcept( noexcept(_Hashtable(std::move(__ummap._M_h), __a)) )
│ │ │ +
1364 : _M_h(std::move(__ummap._M_h), __a)
│ │ │ +
1365 { }
│ │ │ +
1366
│ │ │ +
1367 /**
│ │ │ +
1368 * @brief Builds an %unordered_multimap from an initializer_list.
│ │ │ +
1369 * @param __l An initializer_list.
│ │ │ +
1370 * @param __n Minimal initial number of buckets.
│ │ │ +
1371 * @param __hf A hash functor.
│ │ │ +
1372 * @param __eql A key equality functor.
│ │ │ +
1373 * @param __a An allocator object.
│ │ │ +
1374 *
│ │ │ +
1375 * Create an %unordered_multimap consisting of copies of the elements in
│ │ │ +
1376 * the list. This is linear in N (where N is @a __l.size()).
│ │ │ +
1377 */
│ │ │ +
│ │ │ + │ │ │ +
1379 size_type __n = 0,
│ │ │ +
1380 const hasher& __hf = hasher(),
│ │ │ +
1381 const key_equal& __eql = key_equal(),
│ │ │ +
1382 const allocator_type& __a = allocator_type())
│ │ │ +
1383 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ +
1384 { }
│ │ │ +
│ │ │ +
1385
│ │ │ + │ │ │ +
1387 : unordered_multimap(__n, hasher(), key_equal(), __a)
│ │ │ +
1388 { }
│ │ │ +
1389
│ │ │ +
1390 unordered_multimap(size_type __n, const hasher& __hf,
│ │ │ +
1391 const allocator_type& __a)
│ │ │ +
1392 : unordered_multimap(__n, __hf, key_equal(), __a)
│ │ │ +
1393 { }
│ │ │ +
1394
│ │ │ +
1395 template<typename _InputIterator>
│ │ │ +
1396 unordered_multimap(_InputIterator __first, _InputIterator __last,
│ │ │ +
1397 size_type __n,
│ │ │ +
1398 const allocator_type& __a)
│ │ │ +
1399 : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ +
1400 { }
│ │ │ +
1401
│ │ │ +
1402 template<typename _InputIterator>
│ │ │ +
1403 unordered_multimap(_InputIterator __first, _InputIterator __last,
│ │ │ +
1404 size_type __n, const hasher& __hf,
│ │ │ +
1405 const allocator_type& __a)
│ │ │ +
1406 : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ +
1407 { }
│ │ │ +
1408
│ │ │ +
1409 unordered_multimap(initializer_list<value_type> __l,
│ │ │ +
1410 size_type __n,
│ │ │ +
1411 const allocator_type& __a)
│ │ │ +
1412 : unordered_multimap(__l, __n, hasher(), key_equal(), __a)
│ │ │ +
1413 { }
│ │ │ +
1414
│ │ │ +
1415 unordered_multimap(initializer_list<value_type> __l,
│ │ │ +
1416 size_type __n, const hasher& __hf,
│ │ │ +
1417 const allocator_type& __a)
│ │ │ +
1418 : unordered_multimap(__l, __n, __hf, key_equal(), __a)
│ │ │ +
1419 { }
│ │ │ +
1420
│ │ │ +
1421 /// Copy assignment operator.
│ │ │ + │ │ │ + │ │ │ +
1424
│ │ │ +
1425 /// Move assignment operator.
│ │ │ + │ │ │ + │ │ │ +
1428
│ │ │ +
1429 /**
│ │ │ +
1430 * @brief %Unordered_multimap list assignment operator.
│ │ │ +
1431 * @param __l An initializer_list.
│ │ │ +
1432 *
│ │ │ +
1433 * This function fills an %unordered_multimap with copies of the
│ │ │ +
1434 * elements in the initializer list @a __l.
│ │ │ +
1435 *
│ │ │ +
1436 * Note that the assignment completely changes the %unordered_multimap
│ │ │ +
1437 * and that the resulting %unordered_multimap's size is the same as the
│ │ │ +
1438 * number of elements assigned.
│ │ │ +
1439 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1442 {
│ │ │ +
1443 _M_h = __l;
│ │ │ +
1444 return *this;
│ │ │ +
1445 }
│ │ │ +
│ │ │ +
1446
│ │ │ +
1447 /// Returns the allocator object used by the %unordered_multimap.
│ │ │ + │ │ │ +
│ │ │ +
1449 get_allocator() const noexcept
│ │ │ +
1450 { return _M_h.get_allocator(); }
│ │ │ +
│ │ │ +
1451
│ │ │ +
1452 // size and capacity:
│ │ │ +
1453
│ │ │ +
1454 /// Returns true if the %unordered_multimap is empty.
│ │ │ +
1455 _GLIBCXX_NODISCARD bool
│ │ │ +
│ │ │ +
1456 empty() const noexcept
│ │ │ +
1457 { return _M_h.empty(); }
│ │ │ +
│ │ │ +
1458
│ │ │ +
1459 /// Returns the size of the %unordered_multimap.
│ │ │ +
1460 size_type
│ │ │ +
│ │ │ +
1461 size() const noexcept
│ │ │ +
1462 { return _M_h.size(); }
│ │ │ +
│ │ │ +
1463
│ │ │ +
1464 /// Returns the maximum size of the %unordered_multimap.
│ │ │ +
1465 size_type
│ │ │ +
│ │ │ +
1466 max_size() const noexcept
│ │ │ +
1467 { return _M_h.max_size(); }
│ │ │ +
│ │ │ +
1468
│ │ │ +
1469 // iterators.
│ │ │ +
1470
│ │ │ +
1471 /**
│ │ │ +
1472 * Returns a read/write iterator that points to the first element in the
│ │ │ +
1473 * %unordered_multimap.
│ │ │ +
1474 */
│ │ │ +
1475 iterator
│ │ │ +
│ │ │ +
1476 begin() noexcept
│ │ │ +
1477 { return _M_h.begin(); }
│ │ │ +
│ │ │ +
1478
│ │ │ +
1479 ///@{
│ │ │ +
1480 /**
│ │ │ +
1481 * Returns a read-only (constant) iterator that points to the first
│ │ │ +
1482 * element in the %unordered_multimap.
│ │ │ +
1483 */
│ │ │ + │ │ │
│ │ │ - │ │ │ -
1486 { return _M_h.hash_function(); }
│ │ │ +
1485 begin() const noexcept
│ │ │ +
1486 { return _M_h.begin(); }
│ │ │
│ │ │ -
1487
│ │ │ -
1488 /// Returns the key comparison object with which the %unordered_multiset
│ │ │ -
1489 /// was constructed.
│ │ │ -
1490 key_equal
│ │ │ -
│ │ │ -
1491 key_eq() const
│ │ │ -
1492 { return _M_h.key_eq(); }
│ │ │ -
│ │ │ -
1493
│ │ │ -
1494 // lookup.
│ │ │ -
1495
│ │ │ -
1496 ///@{
│ │ │ -
1497 /**
│ │ │ -
1498 * @brief Tries to locate an element in an %unordered_multiset.
│ │ │ -
1499 * @param __x Element to be located.
│ │ │ -
1500 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ -
1501 * found.
│ │ │ -
1502 *
│ │ │ -
1503 * This function takes a key and tries to locate the element with which
│ │ │ -
1504 * the key matches. If successful the function returns an iterator
│ │ │ -
1505 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ -
1506 * past-the-end ( @c end() ) iterator.
│ │ │ -
1507 */
│ │ │ -
1508 iterator
│ │ │ -
│ │ │ -
1509 find(const key_type& __x)
│ │ │ -
1510 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
1511
│ │ │ -
1512#if __cplusplus > 201703L
│ │ │ -
1513 template<typename _Kt>
│ │ │ -
1514 auto
│ │ │ -
│ │ │ -
1515 find(const _Kt& __x)
│ │ │ -
1516 -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
1517 { return _M_h._M_find_tr(__x); }
│ │ │ -
│ │ │ -
1518#endif
│ │ │ -
1519
│ │ │ - │ │ │ -
│ │ │ -
1521 find(const key_type& __x) const
│ │ │ -
1522 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
1523
│ │ │ -
1524#if __cplusplus > 201703L
│ │ │ -
1525 template<typename _Kt>
│ │ │ -
1526 auto
│ │ │ -
│ │ │ -
1527 find(const _Kt& __x) const
│ │ │ -
1528 -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
1529 { return _M_h._M_find_tr(__x); }
│ │ │ -
│ │ │ -
1530#endif
│ │ │ -
1531 ///@}
│ │ │ -
1532
│ │ │ -
1533 ///@{
│ │ │ -
1534 /**
│ │ │ -
1535 * @brief Finds the number of elements.
│ │ │ -
1536 * @param __x Element to located.
│ │ │ -
1537 * @return Number of elements with specified key.
│ │ │ -
1538 */
│ │ │ -
1539 size_type
│ │ │ -
│ │ │ -
1540 count(const key_type& __x) const
│ │ │ -
1541 { return _M_h.count(__x); }
│ │ │ -
│ │ │ -
1542
│ │ │ -
1543#if __cplusplus > 201703L
│ │ │ -
1544 template<typename _Kt>
│ │ │ -
1545 auto
│ │ │ -
│ │ │ -
1546 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ -
1547 { return _M_h._M_count_tr(__x); }
│ │ │ -
│ │ │ -
1548#endif
│ │ │ -
1549 ///@}
│ │ │ -
1550
│ │ │ -
1551#if __cplusplus > 201703L
│ │ │ -
1552 ///@{
│ │ │ -
1553 /**
│ │ │ -
1554 * @brief Finds whether an element with the given key exists.
│ │ │ -
1555 * @param __x Key of elements to be located.
│ │ │ -
1556 * @return True if there is any element with the specified key.
│ │ │ -
1557 */
│ │ │ -
1558 bool
│ │ │ -
│ │ │ -
1559 contains(const key_type& __x) const
│ │ │ -
1560 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ -
│ │ │ -
1561
│ │ │ -
1562 template<typename _Kt>
│ │ │ -
1563 auto
│ │ │ -
│ │ │ -
1564 contains(const _Kt& __x) const
│ │ │ -
1565 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ -
1566 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ -
│ │ │ -
1567 ///@}
│ │ │ -
1568#endif
│ │ │ -
1569
│ │ │ -
1570 ///@{
│ │ │ -
1571 /**
│ │ │ -
1572 * @brief Finds a subsequence matching given key.
│ │ │ -
1573 * @param __x Key to be located.
│ │ │ -
1574 * @return Pair of iterators that possibly points to the subsequence
│ │ │ -
1575 * matching given key.
│ │ │ -
1576 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1579 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
1580
│ │ │ -
1581#if __cplusplus > 201703L
│ │ │ -
1582 template<typename _Kt>
│ │ │ -
1583 auto
│ │ │ +
1487
│ │ │ + │ │ │ +
│ │ │ +
1489 cbegin() const noexcept
│ │ │ +
1490 { return _M_h.begin(); }
│ │ │ +
│ │ │ +
1491 ///@}
│ │ │ +
1492
│ │ │ +
1493 /**
│ │ │ +
1494 * Returns a read/write iterator that points one past the last element in
│ │ │ +
1495 * the %unordered_multimap.
│ │ │ +
1496 */
│ │ │ +
1497 iterator
│ │ │ +
│ │ │ +
1498 end() noexcept
│ │ │ +
1499 { return _M_h.end(); }
│ │ │ +
│ │ │ +
1500
│ │ │ +
1501 ///@{
│ │ │ +
1502 /**
│ │ │ +
1503 * Returns a read-only (constant) iterator that points one past the last
│ │ │ +
1504 * element in the %unordered_multimap.
│ │ │ +
1505 */
│ │ │ + │ │ │ +
│ │ │ +
1507 end() const noexcept
│ │ │ +
1508 { return _M_h.end(); }
│ │ │ +
│ │ │ +
1509
│ │ │ + │ │ │ +
│ │ │ +
1511 cend() const noexcept
│ │ │ +
1512 { return _M_h.end(); }
│ │ │ +
│ │ │ +
1513 ///@}
│ │ │ +
1514
│ │ │ +
1515 // modifiers.
│ │ │ +
1516
│ │ │ +
1517 /**
│ │ │ +
1518 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
1519 * %unordered_multimap.
│ │ │ +
1520 *
│ │ │ +
1521 * @param __args Arguments used to generate a new pair instance (see
│ │ │ +
1522 * std::piecewise_contruct for passing arguments to each
│ │ │ +
1523 * part of the pair constructor).
│ │ │ +
1524 *
│ │ │ +
1525 * @return An iterator that points to the inserted pair.
│ │ │ +
1526 *
│ │ │ +
1527 * This function attempts to build and insert a (key, value) %pair into
│ │ │ +
1528 * the %unordered_multimap.
│ │ │ +
1529 *
│ │ │ +
1530 * Insertion requires amortized constant time.
│ │ │ +
1531 */
│ │ │ +
1532 template<typename... _Args>
│ │ │ +
1533 iterator
│ │ │ +
│ │ │ + │ │ │ +
1535 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ +
│ │ │ +
1536
│ │ │ +
1537 /**
│ │ │ +
1538 * @brief Attempts to build and insert a std::pair into the
│ │ │ +
1539 * %unordered_multimap.
│ │ │ +
1540 *
│ │ │ +
1541 * @param __pos An iterator that serves as a hint as to where the pair
│ │ │ +
1542 * should be inserted.
│ │ │ +
1543 * @param __args Arguments used to generate a new pair instance (see
│ │ │ +
1544 * std::piecewise_contruct for passing arguments to each
│ │ │ +
1545 * part of the pair constructor).
│ │ │ +
1546 * @return An iterator that points to the element with key of the
│ │ │ +
1547 * std::pair built from @a __args.
│ │ │ +
1548 *
│ │ │ +
1549 * Note that the first parameter is only a hint and can potentially
│ │ │ +
1550 * improve the performance of the insertion process. A bad hint would
│ │ │ +
1551 * cause no gains in efficiency.
│ │ │ +
1552 *
│ │ │ +
1553 * See
│ │ │ +
1554 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
1555 * for more on @a hinting.
│ │ │ +
1556 *
│ │ │ +
1557 * Insertion requires amortized constant time.
│ │ │ +
1558 */
│ │ │ +
1559 template<typename... _Args>
│ │ │ +
1560 iterator
│ │ │ +
│ │ │ + │ │ │ +
1562 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ +
│ │ │ +
1563
│ │ │ +
1564 ///@{
│ │ │ +
1565 /**
│ │ │ +
1566 * @brief Inserts a std::pair into the %unordered_multimap.
│ │ │ +
1567 * @param __x Pair to be inserted (see std::make_pair for easy
│ │ │ +
1568 * creation of pairs).
│ │ │ +
1569 *
│ │ │ +
1570 * @return An iterator that points to the inserted pair.
│ │ │ +
1571 *
│ │ │ +
1572 * Insertion requires amortized constant time.
│ │ │ +
1573 */
│ │ │ +
1574 iterator
│ │ │ +
│ │ │ +
1575 insert(const value_type& __x)
│ │ │ +
1576 { return _M_h.insert(__x); }
│ │ │ +
│ │ │ +
1577
│ │ │ +
1578 iterator
│ │ │ +
│ │ │ + │ │ │ +
1580 { return _M_h.insert(std::move(__x)); }
│ │ │ +
│ │ │ +
1581
│ │ │ +
1582 template<typename _Pair>
│ │ │ + │ │ │
│ │ │ -
1584 equal_range(const _Kt& __x)
│ │ │ -
1585 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
1586 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
│ │ │ -
1587#endif
│ │ │ -
1588
│ │ │ - │ │ │ -
│ │ │ -
1590 equal_range(const key_type& __x) const
│ │ │ -
1591 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
1592
│ │ │ -
1593#if __cplusplus > 201703L
│ │ │ -
1594 template<typename _Kt>
│ │ │ -
1595 auto
│ │ │ -
│ │ │ -
1596 equal_range(const _Kt& __x) const
│ │ │ -
1597 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
1598 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
│ │ │ -
1599#endif
│ │ │ -
1600 ///@}
│ │ │ -
1601
│ │ │ -
1602 // bucket interface.
│ │ │ -
1603
│ │ │ -
1604 /// Returns the number of buckets of the %unordered_multiset.
│ │ │ -
1605 size_type
│ │ │ -
│ │ │ -
1606 bucket_count() const noexcept
│ │ │ -
1607 { return _M_h.bucket_count(); }
│ │ │ -
│ │ │ -
1608
│ │ │ -
1609 /// Returns the maximum number of buckets of the %unordered_multiset.
│ │ │ -
1610 size_type
│ │ │ -
│ │ │ -
1611 max_bucket_count() const noexcept
│ │ │ -
1612 { return _M_h.max_bucket_count(); }
│ │ │ -
│ │ │ -
1613
│ │ │ -
1614 /*
│ │ │ -
1615 * @brief Returns the number of elements in a given bucket.
│ │ │ -
1616 * @param __n A bucket index.
│ │ │ -
1617 * @return The number of elements in the bucket.
│ │ │ -
1618 */
│ │ │ -
1619 size_type
│ │ │ -
1620 bucket_size(size_type __n) const
│ │ │ -
1621 { return _M_h.bucket_size(__n); }
│ │ │ -
1622
│ │ │ -
1623 /*
│ │ │ -
1624 * @brief Returns the bucket index of a given element.
│ │ │ -
1625 * @param __key A key instance.
│ │ │ -
1626 * @return The key bucket index.
│ │ │ -
1627 */
│ │ │ -
1628 size_type
│ │ │ -
1629 bucket(const key_type& __key) const
│ │ │ -
1630 { return _M_h.bucket(__key); }
│ │ │ -
1631
│ │ │ -
1632 ///@{
│ │ │ -
1633 /**
│ │ │ -
1634 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ -
1635 * bucket element.
│ │ │ -
1636 * @param __n The bucket index.
│ │ │ -
1637 * @return A read-only local iterator.
│ │ │ -
1638 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1641 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1642
│ │ │ - │ │ │ -
│ │ │ -
1644 begin(size_type __n) const
│ │ │ -
1645 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1646
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1649 { return _M_h.cbegin(__n); }
│ │ │ -
│ │ │ -
1650 ///@}
│ │ │ -
1651
│ │ │ -
1652 ///@{
│ │ │ -
1653 /**
│ │ │ -
1654 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ -
1655 * the last bucket elements.
│ │ │ -
1656 * @param __n The bucket index.
│ │ │ -
1657 * @return A read-only local iterator.
│ │ │ -
1658 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1661 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1662
│ │ │ - │ │ │ -
│ │ │ -
1664 end(size_type __n) const
│ │ │ -
1665 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1666
│ │ │ - │ │ │ -
│ │ │ -
1668 cend(size_type __n) const
│ │ │ -
1669 { return _M_h.cend(__n); }
│ │ │ -
│ │ │ -
1670 ///@}
│ │ │ -
1671
│ │ │ -
1672 // hash policy.
│ │ │ -
1673
│ │ │ -
1674 /// Returns the average number of elements per bucket.
│ │ │ -
1675 float
│ │ │ -
│ │ │ -
1676 load_factor() const noexcept
│ │ │ -
1677 { return _M_h.load_factor(); }
│ │ │ -
│ │ │ -
1678
│ │ │ -
1679 /// Returns a positive number that the %unordered_multiset tries to keep the
│ │ │ -
1680 /// load factor less than or equal to.
│ │ │ -
1681 float
│ │ │ -
│ │ │ -
1682 max_load_factor() const noexcept
│ │ │ -
1683 { return _M_h.max_load_factor(); }
│ │ │ -
│ │ │ -
1684
│ │ │ -
1685 /**
│ │ │ -
1686 * @brief Change the %unordered_multiset maximum load factor.
│ │ │ -
1687 * @param __z The new maximum load factor.
│ │ │ + │ │ │ +
1585 { return _M_h.emplace(std::forward<_Pair>(__x)); }
│ │ │ +
│ │ │ +
1586 ///@}
│ │ │ +
1587
│ │ │ +
1588 ///@{
│ │ │ +
1589 /**
│ │ │ +
1590 * @brief Inserts a std::pair into the %unordered_multimap.
│ │ │ +
1591 * @param __hint An iterator that serves as a hint as to where the
│ │ │ +
1592 * pair should be inserted.
│ │ │ +
1593 * @param __x Pair to be inserted (see std::make_pair for easy creation
│ │ │ +
1594 * of pairs).
│ │ │ +
1595 * @return An iterator that points to the element with key of
│ │ │ +
1596 * @a __x (may or may not be the %pair passed in).
│ │ │ +
1597 *
│ │ │ +
1598 * Note that the first parameter is only a hint and can potentially
│ │ │ +
1599 * improve the performance of the insertion process. A bad hint would
│ │ │ +
1600 * cause no gains in efficiency.
│ │ │ +
1601 *
│ │ │ +
1602 * See
│ │ │ +
1603 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ +
1604 * for more on @a hinting.
│ │ │ +
1605 *
│ │ │ +
1606 * Insertion requires amortized constant time.
│ │ │ +
1607 */
│ │ │ +
1608 iterator
│ │ │ +
│ │ │ + │ │ │ +
1610 { return _M_h.insert(__hint, __x); }
│ │ │ +
│ │ │ +
1611
│ │ │ +
1612 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
1613 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ +
1614 iterator
│ │ │ +
│ │ │ + │ │ │ +
1616 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ +
│ │ │ +
1617
│ │ │ +
1618 template<typename _Pair>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1621 { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); }
│ │ │ +
│ │ │ +
1622 ///@}
│ │ │ +
1623
│ │ │ +
1624 /**
│ │ │ +
1625 * @brief A template function that attempts to insert a range of
│ │ │ +
1626 * elements.
│ │ │ +
1627 * @param __first Iterator pointing to the start of the range to be
│ │ │ +
1628 * inserted.
│ │ │ +
1629 * @param __last Iterator pointing to the end of the range.
│ │ │ +
1630 *
│ │ │ +
1631 * Complexity similar to that of the range constructor.
│ │ │ +
1632 */
│ │ │ +
1633 template<typename _InputIterator>
│ │ │ +
1634 void
│ │ │ +
│ │ │ + │ │ │ +
1636 { _M_h.insert(__first, __last); }
│ │ │ +
│ │ │ +
1637
│ │ │ +
1638 /**
│ │ │ +
1639 * @brief Attempts to insert a list of elements into the
│ │ │ +
1640 * %unordered_multimap.
│ │ │ +
1641 * @param __l A std::initializer_list<value_type> of elements
│ │ │ +
1642 * to be inserted.
│ │ │ +
1643 *
│ │ │ +
1644 * Complexity similar to that of the range constructor.
│ │ │ +
1645 */
│ │ │ +
1646 void
│ │ │ +
│ │ │ + │ │ │ +
1648 { _M_h.insert(__l); }
│ │ │ +
│ │ │ +
1649
│ │ │ +
1650#if __cplusplus > 201402L
│ │ │ +
1651 /// Extract a node.
│ │ │ +
1652 node_type
│ │ │ +
│ │ │ + │ │ │ +
1654 {
│ │ │ +
1655 __glibcxx_assert(__pos != end());
│ │ │ +
1656 return _M_h.extract(__pos);
│ │ │ +
1657 }
│ │ │ +
│ │ │ +
1658
│ │ │ +
1659 /// Extract a node.
│ │ │ +
1660 node_type
│ │ │ +
│ │ │ + │ │ │ +
1662 { return _M_h.extract(__key); }
│ │ │ +
│ │ │ +
1663
│ │ │ +
1664 /// Re-insert an extracted node.
│ │ │ +
1665 iterator
│ │ │ +
│ │ │ +
1666 insert(node_type&& __nh)
│ │ │ +
1667 { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); }
│ │ │ +
│ │ │ +
1668
│ │ │ +
1669 /// Re-insert an extracted node.
│ │ │ +
1670 iterator
│ │ │ +
│ │ │ + │ │ │ +
1672 { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); }
│ │ │ +
│ │ │ +
1673#endif // C++17
│ │ │ +
1674
│ │ │ +
1675 ///@{
│ │ │ +
1676 /**
│ │ │ +
1677 * @brief Erases an element from an %unordered_multimap.
│ │ │ +
1678 * @param __position An iterator pointing to the element to be erased.
│ │ │ +
1679 * @return An iterator pointing to the element immediately following
│ │ │ +
1680 * @a __position prior to the element being erased. If no such
│ │ │ +
1681 * element exists, end() is returned.
│ │ │ +
1682 *
│ │ │ +
1683 * This function erases an element, pointed to by the given iterator,
│ │ │ +
1684 * from an %unordered_multimap.
│ │ │ +
1685 * Note that this function only erases the element, and that if the
│ │ │ +
1686 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
1687 * any way. Managing the pointer is the user's responsibility.
│ │ │
1688 */
│ │ │ -
1689 void
│ │ │ +
1689 iterator
│ │ │
│ │ │ - │ │ │ -
1691 { _M_h.max_load_factor(__z); }
│ │ │ + │ │ │ +
1691 { return _M_h.erase(__position); }
│ │ │ +
│ │ │ +
1692
│ │ │ +
1693 // LWG 2059.
│ │ │ +
1694 iterator
│ │ │ +
│ │ │ + │ │ │ +
1696 { return _M_h.erase(__position); }
│ │ │ +
│ │ │ +
1697 ///@}
│ │ │ +
1698
│ │ │ +
1699 /**
│ │ │ +
1700 * @brief Erases elements according to the provided key.
│ │ │ +
1701 * @param __x Key of elements to be erased.
│ │ │ +
1702 * @return The number of elements erased.
│ │ │ +
1703 *
│ │ │ +
1704 * This function erases all the elements located by the given key from
│ │ │ +
1705 * an %unordered_multimap.
│ │ │ +
1706 * Note that this function only erases the element, and that if the
│ │ │ +
1707 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
1708 * any way. Managing the pointer is the user's responsibility.
│ │ │ +
1709 */
│ │ │ +
1710 size_type
│ │ │ +
│ │ │ +
1711 erase(const key_type& __x)
│ │ │ +
1712 { return _M_h.erase(__x); }
│ │ │ +
│ │ │ +
1713
│ │ │ +
1714 /**
│ │ │ +
1715 * @brief Erases a [__first,__last) range of elements from an
│ │ │ +
1716 * %unordered_multimap.
│ │ │ +
1717 * @param __first Iterator pointing to the start of the range to be
│ │ │ +
1718 * erased.
│ │ │ +
1719 * @param __last Iterator pointing to the end of the range to
│ │ │ +
1720 * be erased.
│ │ │ +
1721 * @return The iterator @a __last.
│ │ │ +
1722 *
│ │ │ +
1723 * This function erases a sequence of elements from an
│ │ │ +
1724 * %unordered_multimap.
│ │ │ +
1725 * Note that this function only erases the elements, and that if
│ │ │ +
1726 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ +
1727 * in any way. Managing the pointer is the user's responsibility.
│ │ │ +
1728 */
│ │ │ +
1729 iterator
│ │ │ +
│ │ │ + │ │ │ +
1731 { return _M_h.erase(__first, __last); }
│ │ │ +
│ │ │ +
1732
│ │ │ +
1733 /**
│ │ │ +
1734 * Erases all elements in an %unordered_multimap.
│ │ │ +
1735 * Note that this function only erases the elements, and that if the
│ │ │ +
1736 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ +
1737 * in any way. Managing the pointer is the user's responsibility.
│ │ │ +
1738 */
│ │ │ +
1739 void
│ │ │ +
│ │ │ +
1740 clear() noexcept
│ │ │ +
1741 { _M_h.clear(); }
│ │ │ +
│ │ │ +
1742
│ │ │ +
1743 /**
│ │ │ +
1744 * @brief Swaps data with another %unordered_multimap.
│ │ │ +
1745 * @param __x An %unordered_multimap of the same element and allocator
│ │ │ +
1746 * types.
│ │ │ +
1747 *
│ │ │ +
1748 * This exchanges the elements between two %unordered_multimap in
│ │ │ +
1749 * constant time.
│ │ │ +
1750 * Note that the global std::swap() function is specialized such that
│ │ │ +
1751 * std::swap(m1,m2) will feed to this function.
│ │ │ +
1752 */
│ │ │ +
1753 void
│ │ │ +
│ │ │ + │ │ │ +
1755 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ +
1756 { _M_h.swap(__x._M_h); }
│ │ │ +
│ │ │ +
1757
│ │ │ +
1758#if __cplusplus > 201402L
│ │ │ +
1759 template<typename, typename, typename>
│ │ │ +
1760 friend class std::_Hash_merge_helper;
│ │ │ +
1761
│ │ │ +
1762 template<typename _H2, typename _P2>
│ │ │ +
1763 void
│ │ │ + │ │ │ +
1765 {
│ │ │ +
1766 using _Merge_helper
│ │ │ + │ │ │ +
1768 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ +
1769 }
│ │ │ +
1770
│ │ │ +
1771 template<typename _H2, typename _P2>
│ │ │ +
1772 void
│ │ │ +
1773 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ +
1774 { merge(__source); }
│ │ │ +
1775
│ │ │ +
1776 template<typename _H2, typename _P2>
│ │ │ +
1777 void
│ │ │ +
1778 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source)
│ │ │ +
1779 {
│ │ │ +
1780 using _Merge_helper
│ │ │ +
1781 = _Hash_merge_helper<unordered_multimap, _H2, _P2>;
│ │ │ +
1782 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ +
1783 }
│ │ │ +
1784
│ │ │ +
1785 template<typename _H2, typename _P2>
│ │ │ +
1786 void
│ │ │ +
1787 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ +
1788 { merge(__source); }
│ │ │ +
1789#endif // C++17
│ │ │ +
1790
│ │ │ +
1791 // observers.
│ │ │ +
1792
│ │ │ +
1793 /// Returns the hash functor object with which the %unordered_multimap
│ │ │ +
1794 /// was constructed.
│ │ │ +
1795 hasher
│ │ │ +
│ │ │ + │ │ │ +
1797 { return _M_h.hash_function(); }
│ │ │ +
│ │ │ +
1798
│ │ │ +
1799 /// Returns the key comparison object with which the %unordered_multimap
│ │ │ +
1800 /// was constructed.
│ │ │ +
1801 key_equal
│ │ │ +
│ │ │ +
1802 key_eq() const
│ │ │ +
1803 { return _M_h.key_eq(); }
│ │ │ +
│ │ │ +
1804
│ │ │ +
1805 // lookup.
│ │ │ +
1806
│ │ │ +
1807 ///@{
│ │ │ +
1808 /**
│ │ │ +
1809 * @brief Tries to locate an element in an %unordered_multimap.
│ │ │ +
1810 * @param __x Key to be located.
│ │ │ +
1811 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ +
1812 * found.
│ │ │ +
1813 *
│ │ │ +
1814 * This function takes a key and tries to locate the element with which
│ │ │ +
1815 * the key matches. If successful the function returns an iterator
│ │ │ +
1816 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ +
1817 * past-the-end ( @c end() ) iterator.
│ │ │ +
1818 */
│ │ │ +
1819 iterator
│ │ │ +
│ │ │ +
1820 find(const key_type& __x)
│ │ │ +
1821 { return _M_h.find(__x); }
│ │ │ +
│ │ │ +
1822
│ │ │ +
1823#if __cplusplus > 201703L
│ │ │ +
1824 template<typename _Kt>
│ │ │ +
1825 auto
│ │ │ +
│ │ │ +
1826 find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x))
│ │ │ +
1827 { return _M_h._M_find_tr(__x); }
│ │ │ +
│ │ │ +
1828#endif
│ │ │ +
1829
│ │ │ + │ │ │ +
│ │ │ +
1831 find(const key_type& __x) const
│ │ │ +
1832 { return _M_h.find(__x); }
│ │ │ +
│ │ │ +
1833
│ │ │ +
1834#if __cplusplus > 201703L
│ │ │ +
1835 template<typename _Kt>
│ │ │ +
1836 auto
│ │ │ +
│ │ │ +
1837 find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x))
│ │ │ +
1838 { return _M_h._M_find_tr(__x); }
│ │ │ +
│ │ │ +
1839#endif
│ │ │ +
1840 ///@}
│ │ │ +
1841
│ │ │ +
1842 ///@{
│ │ │ +
1843 /**
│ │ │ +
1844 * @brief Finds the number of elements.
│ │ │ +
1845 * @param __x Key to count.
│ │ │ +
1846 * @return Number of elements with specified key.
│ │ │ +
1847 */
│ │ │ +
1848 size_type
│ │ │ +
│ │ │ +
1849 count(const key_type& __x) const
│ │ │ +
1850 { return _M_h.count(__x); }
│ │ │ +
│ │ │ +
1851
│ │ │ +
1852#if __cplusplus > 201703L
│ │ │ +
1853 template<typename _Kt>
│ │ │ +
1854 auto
│ │ │ +
│ │ │ +
1855 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ +
1856 { return _M_h._M_count_tr(__x); }
│ │ │ +
│ │ │ +
1857#endif
│ │ │ +
1858 ///@}
│ │ │ +
1859
│ │ │ +
1860#if __cplusplus > 201703L
│ │ │ +
1861 ///@{
│ │ │ +
1862 /**
│ │ │ +
1863 * @brief Finds whether an element with the given key exists.
│ │ │ +
1864 * @param __x Key of elements to be located.
│ │ │ +
1865 * @return True if there is any element with the specified key.
│ │ │ +
1866 */
│ │ │ +
1867 bool
│ │ │ +
│ │ │ +
1868 contains(const key_type& __x) const
│ │ │ +
1869 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ +
│ │ │ +
1870
│ │ │ +
1871 template<typename _Kt>
│ │ │ +
1872 auto
│ │ │ +
│ │ │ +
1873 contains(const _Kt& __x) const
│ │ │ +
1874 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ +
1875 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ +
│ │ │ +
1876 ///@}
│ │ │ +
1877#endif
│ │ │ +
1878
│ │ │ +
1879 ///@{
│ │ │ +
1880 /**
│ │ │ +
1881 * @brief Finds a subsequence matching given key.
│ │ │ +
1882 * @param __x Key to be located.
│ │ │ +
1883 * @return Pair of iterators that possibly points to the subsequence
│ │ │ +
1884 * matching given key.
│ │ │ +
1885 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1888 { return _M_h.equal_range(__x); }
│ │ │
│ │ │ -
1692
│ │ │ -
1693 /**
│ │ │ -
1694 * @brief May rehash the %unordered_multiset.
│ │ │ -
1695 * @param __n The new number of buckets.
│ │ │ -
1696 *
│ │ │ -
1697 * Rehash will occur only if the new number of buckets respect the
│ │ │ -
1698 * %unordered_multiset maximum load factor.
│ │ │ -
1699 */
│ │ │ -
1700 void
│ │ │ -
│ │ │ - │ │ │ -
1702 { _M_h.rehash(__n); }
│ │ │ -
│ │ │ -
1703
│ │ │ -
1704 /**
│ │ │ -
1705 * @brief Prepare the %unordered_multiset for a specified number of
│ │ │ -
1706 * elements.
│ │ │ -
1707 * @param __n Number of elements required.
│ │ │ -
1708 *
│ │ │ -
1709 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ -
1710 */
│ │ │ -
1711 void
│ │ │ -
│ │ │ - │ │ │ -
1713 { _M_h.reserve(__n); }
│ │ │ -
│ │ │ -
1714
│ │ │ -
1715 template<typename _Value1, typename _Hash1, typename _Pred1,
│ │ │ -
1716 typename _Alloc1>
│ │ │ -
1717 friend bool
│ │ │ - │ │ │ - │ │ │ -
1720 };
│ │ │ -
│ │ │ -
1721
│ │ │ -
1722
│ │ │ -
1723#if __cpp_deduction_guides >= 201606
│ │ │ -
1724
│ │ │ -
1725 template<typename _InputIterator,
│ │ │ -
1726 typename _Hash =
│ │ │ -
1727 hash<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1728 typename _Pred =
│ │ │ -
1729 equal_to<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1730 typename _Allocator =
│ │ │ -
1731 allocator<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1732 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1733 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1734 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
1735 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1736 unordered_multiset(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
1738 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ -
1739 _Allocator = _Allocator())
│ │ │ -
1740 -> unordered_multiset<typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
1741 _Hash, _Pred, _Allocator>;
│ │ │ -
1742
│ │ │ -
1743 template<typename _Tp, typename _Hash = hash<_Tp>,
│ │ │ -
1744 typename _Pred = equal_to<_Tp>,
│ │ │ -
1745 typename _Allocator = allocator<_Tp>,
│ │ │ -
1746 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1747 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
1748 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1749 unordered_multiset(initializer_list<_Tp>,
│ │ │ - │ │ │ -
1751 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ -
1752 _Allocator = _Allocator())
│ │ │ -
1753 -> unordered_multiset<_Tp, _Hash, _Pred, _Allocator>;
│ │ │ -
1754
│ │ │ -
1755 template<typename _InputIterator, typename _Allocator,
│ │ │ -
1756 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1757 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1758 unordered_multiset(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
1760 -> unordered_multiset<typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
1761 hash<typename
│ │ │ -
1762 iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1763 equal_to<typename
│ │ │ -
1764 iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1765 _Allocator>;
│ │ │ -
1766
│ │ │ -
1767 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ -
1768 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1769 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1770 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1771 unordered_multiset(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
1773 _Hash, _Allocator)
│ │ │ -
1774 -> unordered_multiset<typename
│ │ │ -
1775 iterator_traits<_InputIterator>::value_type,
│ │ │ -
1776 _Hash,
│ │ │ -
1777 equal_to<
│ │ │ -
1778 typename
│ │ │ -
1779 iterator_traits<_InputIterator>::value_type>,
│ │ │ -
1780 _Allocator>;
│ │ │ -
1781
│ │ │ -
1782 template<typename _Tp, typename _Allocator,
│ │ │ -
1783 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1784 unordered_multiset(initializer_list<_Tp>,
│ │ │ - │ │ │ -
1786 -> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>;
│ │ │ -
1787
│ │ │ -
1788 template<typename _Tp, typename _Hash, typename _Allocator,
│ │ │ -
1789 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1790 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1791 unordered_multiset(initializer_list<_Tp>,
│ │ │ -
1792 unordered_multiset<int>::size_type, _Hash, _Allocator)
│ │ │ -
1793 -> unordered_multiset<_Tp, _Hash, equal_to<_Tp>, _Allocator>;
│ │ │ -
1794
│ │ │ -
1795#endif
│ │ │ -
1796
│ │ │ -
1797 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1798 inline void
│ │ │ -
1799 swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
1800 unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
1801 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
1802 { __x.swap(__y); }
│ │ │ -
1803
│ │ │ -
1804 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1805 inline void
│ │ │ -
1806 swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
1807 unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
1808 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
1809 { __x.swap(__y); }
│ │ │ -
1810
│ │ │ -
1811 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1812 inline bool
│ │ │ -
1813 operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
1814 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
1815 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ -
1816
│ │ │ -
1817#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
1818 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1819 inline bool
│ │ │ -
1820 operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
1821 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
1822 { return !(__x == __y); }
│ │ │ -
1823#endif
│ │ │ -
1824
│ │ │ -
1825 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1826 inline bool
│ │ │ -
1827 operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
1828 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
1829 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ -
1830
│ │ │ -
1831#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
1832 template<class _Value, class _Hash, class _Pred, class _Alloc>
│ │ │ -
1833 inline bool
│ │ │ -
1834 operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
1835 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
1836 { return !(__x == __y); }
│ │ │ -
1837#endif
│ │ │ -
1838
│ │ │ -
1839_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ -
1840
│ │ │ -
1841#if __cplusplus > 201402L
│ │ │ -
1842 // Allow std::unordered_set access to internals of compatible sets.
│ │ │ -
1843 template<typename _Val, typename _Hash1, typename _Eq1, typename _Alloc,
│ │ │ -
1844 typename _Hash2, typename _Eq2>
│ │ │ -
1845 struct _Hash_merge_helper<
│ │ │ -
1846 _GLIBCXX_STD_C::unordered_set<_Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2>
│ │ │ -
1847 {
│ │ │ -
1848 private:
│ │ │ -
1849 template<typename... _Tp>
│ │ │ -
1850 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>;
│ │ │ -
1851 template<typename... _Tp>
│ │ │ -
1852 using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>;
│ │ │ -
1853
│ │ │ -
1854 friend unordered_set<_Val, _Hash1, _Eq1, _Alloc>;
│ │ │ -
1855
│ │ │ -
1856 static auto&
│ │ │ -
1857 _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set)
│ │ │ -
1858 { return __set._M_h; }
│ │ │ -
1859
│ │ │ -
1860 static auto&
│ │ │ -
1861 _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set)
│ │ │ -
1862 { return __set._M_h; }
│ │ │ -
1863 };
│ │ │ -
1864
│ │ │ -
1865 // Allow std::unordered_multiset access to internals of compatible sets.
│ │ │ -
1866 template<typename _Val, typename _Hash1, typename _Eq1, typename _Alloc,
│ │ │ -
1867 typename _Hash2, typename _Eq2>
│ │ │ -
1868 struct _Hash_merge_helper<
│ │ │ -
1869 _GLIBCXX_STD_C::unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>,
│ │ │ -
1870 _Hash2, _Eq2>
│ │ │ -
1871 {
│ │ │ -
1872 private:
│ │ │ -
1873 template<typename... _Tp>
│ │ │ -
1874 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>;
│ │ │ -
1875 template<typename... _Tp>
│ │ │ -
1876 using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>;
│ │ │ -
1877
│ │ │ -
1878 friend unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>;
│ │ │ -
1879
│ │ │ -
1880 static auto&
│ │ │ -
1881 _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set)
│ │ │ -
1882 { return __set._M_h; }
│ │ │ -
1883
│ │ │ -
1884 static auto&
│ │ │ -
1885 _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set)
│ │ │ -
1886 { return __set._M_h; }
│ │ │ -
1887 };
│ │ │ -
1888#endif // C++17
│ │ │
1889
│ │ │ -
1890_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
1891} // namespace std
│ │ │ -
1892
│ │ │ -
1893#endif /* _UNORDERED_SET_H */
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:97
│ │ │ +
1890#if __cplusplus > 201703L
│ │ │ +
1891 template<typename _Kt>
│ │ │ +
1892 auto
│ │ │ +
│ │ │ +
1893 equal_range(const _Kt& __x)
│ │ │ +
1894 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ +
1895 { return _M_h._M_equal_range_tr(__x); }
│ │ │ +
│ │ │ +
1896#endif
│ │ │ +
1897
│ │ │ + │ │ │ +
│ │ │ +
1899 equal_range(const key_type& __x) const
│ │ │ +
1900 { return _M_h.equal_range(__x); }
│ │ │ +
│ │ │ +
1901
│ │ │ +
1902#if __cplusplus > 201703L
│ │ │ +
1903 template<typename _Kt>
│ │ │ +
1904 auto
│ │ │ +
│ │ │ +
1905 equal_range(const _Kt& __x) const
│ │ │ +
1906 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ +
1907 { return _M_h._M_equal_range_tr(__x); }
│ │ │ +
│ │ │ +
1908#endif
│ │ │ +
1909 ///@}
│ │ │ +
1910
│ │ │ +
1911 // bucket interface.
│ │ │ +
1912
│ │ │ +
1913 /// Returns the number of buckets of the %unordered_multimap.
│ │ │ +
1914 size_type
│ │ │ +
│ │ │ +
1915 bucket_count() const noexcept
│ │ │ +
1916 { return _M_h.bucket_count(); }
│ │ │ +
│ │ │ +
1917
│ │ │ +
1918 /// Returns the maximum number of buckets of the %unordered_multimap.
│ │ │ +
1919 size_type
│ │ │ +
│ │ │ +
1920 max_bucket_count() const noexcept
│ │ │ +
1921 { return _M_h.max_bucket_count(); }
│ │ │ +
│ │ │ +
1922
│ │ │ +
1923 /*
│ │ │ +
1924 * @brief Returns the number of elements in a given bucket.
│ │ │ +
1925 * @param __n A bucket index.
│ │ │ +
1926 * @return The number of elements in the bucket.
│ │ │ +
1927 */
│ │ │ +
1928 size_type
│ │ │ +
1929 bucket_size(size_type __n) const
│ │ │ +
1930 { return _M_h.bucket_size(__n); }
│ │ │ +
1931
│ │ │ +
1932 /*
│ │ │ +
1933 * @brief Returns the bucket index of a given element.
│ │ │ +
1934 * @param __key A key instance.
│ │ │ +
1935 * @return The key bucket index.
│ │ │ +
1936 */
│ │ │ +
1937 size_type
│ │ │ +
1938 bucket(const key_type& __key) const
│ │ │ +
1939 { return _M_h.bucket(__key); }
│ │ │ +
1940
│ │ │ +
1941 /**
│ │ │ +
1942 * @brief Returns a read/write iterator pointing to the first bucket
│ │ │ +
1943 * element.
│ │ │ +
1944 * @param __n The bucket index.
│ │ │ +
1945 * @return A read/write local iterator.
│ │ │ +
1946 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1949 { return _M_h.begin(__n); }
│ │ │ +
│ │ │ +
1950
│ │ │ +
1951 ///@{
│ │ │ +
1952 /**
│ │ │ +
1953 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ +
1954 * bucket element.
│ │ │ +
1955 * @param __n The bucket index.
│ │ │ +
1956 * @return A read-only local iterator.
│ │ │ +
1957 */
│ │ │ + │ │ │ +
│ │ │ +
1959 begin(size_type __n) const
│ │ │ +
1960 { return _M_h.begin(__n); }
│ │ │ +
│ │ │ +
1961
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1964 { return _M_h.cbegin(__n); }
│ │ │ +
│ │ │ +
1965 ///@}
│ │ │ +
1966
│ │ │ +
1967 /**
│ │ │ +
1968 * @brief Returns a read/write iterator pointing to one past the last
│ │ │ +
1969 * bucket elements.
│ │ │ +
1970 * @param __n The bucket index.
│ │ │ +
1971 * @return A read/write local iterator.
│ │ │ +
1972 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
1975 { return _M_h.end(__n); }
│ │ │ +
│ │ │ +
1976
│ │ │ +
1977 ///@{
│ │ │ +
1978 /**
│ │ │ +
1979 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ +
1980 * the last bucket elements.
│ │ │ +
1981 * @param __n The bucket index.
│ │ │ +
1982 * @return A read-only local iterator.
│ │ │ +
1983 */
│ │ │ + │ │ │ +
│ │ │ +
1985 end(size_type __n) const
│ │ │ +
1986 { return _M_h.end(__n); }
│ │ │ +
│ │ │ +
1987
│ │ │ + │ │ │ +
│ │ │ +
1989 cend(size_type __n) const
│ │ │ +
1990 { return _M_h.cend(__n); }
│ │ │ +
│ │ │ +
1991 ///@}
│ │ │ +
1992
│ │ │ +
1993 // hash policy.
│ │ │ +
1994
│ │ │ +
1995 /// Returns the average number of elements per bucket.
│ │ │ +
1996 float
│ │ │ +
│ │ │ +
1997 load_factor() const noexcept
│ │ │ +
1998 { return _M_h.load_factor(); }
│ │ │ +
│ │ │ +
1999
│ │ │ +
2000 /// Returns a positive number that the %unordered_multimap tries to keep
│ │ │ +
2001 /// the load factor less than or equal to.
│ │ │ +
2002 float
│ │ │ +
│ │ │ +
2003 max_load_factor() const noexcept
│ │ │ +
2004 { return _M_h.max_load_factor(); }
│ │ │ +
│ │ │ +
2005
│ │ │ +
2006 /**
│ │ │ +
2007 * @brief Change the %unordered_multimap maximum load factor.
│ │ │ +
2008 * @param __z The new maximum load factor.
│ │ │ +
2009 */
│ │ │ +
2010 void
│ │ │ +
│ │ │ + │ │ │ +
2012 { _M_h.max_load_factor(__z); }
│ │ │ +
│ │ │ +
2013
│ │ │ +
2014 /**
│ │ │ +
2015 * @brief May rehash the %unordered_multimap.
│ │ │ +
2016 * @param __n The new number of buckets.
│ │ │ +
2017 *
│ │ │ +
2018 * Rehash will occur only if the new number of buckets respect the
│ │ │ +
2019 * %unordered_multimap maximum load factor.
│ │ │ +
2020 */
│ │ │ +
2021 void
│ │ │ +
│ │ │ + │ │ │ +
2023 { _M_h.rehash(__n); }
│ │ │ +
│ │ │ +
2024
│ │ │ +
2025 /**
│ │ │ +
2026 * @brief Prepare the %unordered_multimap for a specified number of
│ │ │ +
2027 * elements.
│ │ │ +
2028 * @param __n Number of elements required.
│ │ │ +
2029 *
│ │ │ +
2030 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ +
2031 */
│ │ │ +
2032 void
│ │ │ +
│ │ │ + │ │ │ +
2034 { _M_h.reserve(__n); }
│ │ │ +
│ │ │ +
2035
│ │ │ +
2036 template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1,
│ │ │ +
2037 typename _Alloc1>
│ │ │ +
2038 friend bool
│ │ │ +
2039 operator==(const unordered_multimap<_Key1, _Tp1,
│ │ │ +
2040 _Hash1, _Pred1, _Alloc1>&,
│ │ │ + │ │ │ +
2042 _Hash1, _Pred1, _Alloc1>&);
│ │ │ +
2043 };
│ │ │ +
│ │ │ +
2044
│ │ │ +
2045#if __cpp_deduction_guides >= 201606
│ │ │ +
2046
│ │ │ +
2047 template<typename _InputIterator,
│ │ │ +
2048 typename _Hash = hash<__iter_key_t<_InputIterator>>,
│ │ │ +
2049 typename _Pred = equal_to<__iter_key_t<_InputIterator>>,
│ │ │ +
2050 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
│ │ │ +
2051 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
2052 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
2053 typename = _RequireNotAllocator<_Pred>,
│ │ │ +
2054 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2055 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ + │ │ │ +
2057 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ +
2058 _Allocator = _Allocator())
│ │ │ +
2059 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ +
2060 __iter_val_t<_InputIterator>, _Hash, _Pred,
│ │ │ +
2061 _Allocator>;
│ │ │ +
2062
│ │ │ +
2063 template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
│ │ │ +
2064 typename _Pred = equal_to<_Key>,
│ │ │ +
2065 typename _Allocator = allocator<pair<const _Key, _Tp>>,
│ │ │ +
2066 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
2067 typename = _RequireNotAllocator<_Pred>,
│ │ │ +
2068 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2069 unordered_multimap(initializer_list<pair<_Key, _Tp>>,
│ │ │ + │ │ │ +
2071 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ +
2072 _Allocator = _Allocator())
│ │ │ +
2073 -> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Allocator>;
│ │ │ +
2074
│ │ │ +
2075 template<typename _InputIterator, typename _Allocator,
│ │ │ +
2076 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
2077 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2078 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ + │ │ │ +
2080 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ +
2081 __iter_val_t<_InputIterator>,
│ │ │ +
2082 hash<__iter_key_t<_InputIterator>>,
│ │ │ +
2083 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ +
2084
│ │ │ +
2085 template<typename _InputIterator, typename _Allocator,
│ │ │ +
2086 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
2087 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2088 unordered_multimap(_InputIterator, _InputIterator, _Allocator)
│ │ │ +
2089 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ +
2090 __iter_val_t<_InputIterator>,
│ │ │ +
2091 hash<__iter_key_t<_InputIterator>>,
│ │ │ +
2092 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ +
2093
│ │ │ +
2094 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ +
2095 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
2096 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
2097 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2098 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ + │ │ │ +
2100 _Allocator)
│ │ │ +
2101 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ +
2102 __iter_val_t<_InputIterator>, _Hash,
│ │ │ +
2103 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ +
2104
│ │ │ +
2105 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ +
2106 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2107 unordered_multimap(initializer_list<pair<_Key, _Tp>>,
│ │ │ + │ │ │ +
2109 _Allocator)
│ │ │ +
2110 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ +
2111
│ │ │ +
2112 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ +
2113 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2114 unordered_multimap(initializer_list<pair<_Key, _Tp>>, _Allocator)
│ │ │ +
2115 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ +
2116
│ │ │ +
2117 template<typename _Key, typename _Tp, typename _Hash, typename _Allocator,
│ │ │ +
2118 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ +
2119 typename = _RequireAllocator<_Allocator>>
│ │ │ +
2120 unordered_multimap(initializer_list<pair<_Key, _Tp>>,
│ │ │ + │ │ │ +
2122 _Hash, _Allocator)
│ │ │ +
2123 -> unordered_multimap<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>;
│ │ │ +
2124
│ │ │ +
2125#endif
│ │ │ +
2126
│ │ │ +
2127 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2128 inline void
│ │ │ +
2129 swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ +
2130 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ +
2131 noexcept(noexcept(__x.swap(__y)))
│ │ │ +
2132 { __x.swap(__y); }
│ │ │ +
2133
│ │ │ +
2134 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2135 inline void
│ │ │ +
2136 swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ +
2137 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ +
2138 noexcept(noexcept(__x.swap(__y)))
│ │ │ +
2139 { __x.swap(__y); }
│ │ │ +
2140
│ │ │ +
2141 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2142 inline bool
│ │ │ +
2143 operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ +
2144 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ +
2145 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ +
2146
│ │ │ +
2147#if __cpp_impl_three_way_comparison < 201907L
│ │ │ +
2148 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2149 inline bool
│ │ │ +
2150 operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ +
2151 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ +
2152 { return !(__x == __y); }
│ │ │ +
2153#endif
│ │ │ +
2154
│ │ │ +
2155 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2156 inline bool
│ │ │ +
2157 operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ +
2158 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ +
2159 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ +
2160
│ │ │ +
2161#if __cpp_impl_three_way_comparison < 201907L
│ │ │ +
2162 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ +
2163 inline bool
│ │ │ +
2164 operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ +
2165 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ +
2166 { return !(__x == __y); }
│ │ │ +
2167#endif
│ │ │ +
2168
│ │ │ +
2169_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ +
2170
│ │ │ +
2171#if __cplusplus > 201402L
│ │ │ +
2172 // Allow std::unordered_map access to internals of compatible maps.
│ │ │ +
2173 template<typename _Key, typename _Val, typename _Hash1, typename _Eq1,
│ │ │ +
2174 typename _Alloc, typename _Hash2, typename _Eq2>
│ │ │ +
2175 struct _Hash_merge_helper<
│ │ │ +
2176 _GLIBCXX_STD_C::unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>,
│ │ │ +
2177 _Hash2, _Eq2>
│ │ │ +
2178 {
│ │ │ +
2179 private:
│ │ │ +
2180 template<typename... _Tp>
│ │ │ +
2181 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>;
│ │ │ +
2182 template<typename... _Tp>
│ │ │ +
2183 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>;
│ │ │ +
2184
│ │ │ +
2185 friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>;
│ │ │ +
2186
│ │ │ +
2187 static auto&
│ │ │ +
2188 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ +
2189 { return __map._M_h; }
│ │ │ +
2190
│ │ │ +
2191 static auto&
│ │ │ +
2192 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ +
2193 { return __map._M_h; }
│ │ │ +
2194 };
│ │ │ +
2195
│ │ │ +
2196 // Allow std::unordered_multimap access to internals of compatible maps.
│ │ │ +
2197 template<typename _Key, typename _Val, typename _Hash1, typename _Eq1,
│ │ │ +
2198 typename _Alloc, typename _Hash2, typename _Eq2>
│ │ │ +
2199 struct _Hash_merge_helper<
│ │ │ +
2200 _GLIBCXX_STD_C::unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>,
│ │ │ +
2201 _Hash2, _Eq2>
│ │ │ +
2202 {
│ │ │ +
2203 private:
│ │ │ +
2204 template<typename... _Tp>
│ │ │ +
2205 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>;
│ │ │ +
2206 template<typename... _Tp>
│ │ │ +
2207 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>;
│ │ │ +
2208
│ │ │ +
2209 friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>;
│ │ │ +
2210
│ │ │ +
2211 static auto&
│ │ │ +
2212 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ +
2213 { return __map._M_h; }
│ │ │ +
2214
│ │ │ +
2215 static auto&
│ │ │ +
2216 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ +
2217 { return __map._M_h; }
│ │ │ +
2218 };
│ │ │ +
2219#endif // C++17
│ │ │ +
2220
│ │ │ +
2221_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
2222} // namespace std
│ │ │ +
2223
│ │ │ +
2224#endif /* _UNORDERED_MAP_H */
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:97
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
__detail::_Hashtable_traits< _Cache, true, true > __uset_traits
Base types for unordered_set.
│ │ │ -
__detail::_Hashtable_traits< _Cache, true, false > __umset_traits
Base types for unordered_multiset.
│ │ │ -
Common iterator class.
│ │ │ -
A standard container composed of equivalent keys (possibly containing multiple of each key value) in ...
│ │ │ -
auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_multiset.
│ │ │ -
iterator begin() noexcept
│ │ │ -
auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_multiset.
│ │ │ -
iterator insert(const_iterator __hint, const value_type &__x)
Inserts an element into the unordered_multiset.
│ │ │ -
_Hashtable::difference_type difference_type
Iterator-related typedefs.
│ │ │ -
void insert(initializer_list< value_type > __l)
Inserts a list of elements into the unordered_multiset.
│ │ │ -
_Hashtable::pointer pointer
Iterator-related typedefs.
│ │ │ -
bool contains(const key_type &__x) const
Finds whether an element with the given key exists.
│ │ │ -
void rehash(size_type __n)
May rehash the unordered_multiset.
│ │ │ -
local_iterator begin(size_type __n)
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_multiset.
│ │ │ - │ │ │ -
float max_load_factor() const noexcept
Returns a positive number that the unordered_multiset tries to keep the load factor less than or equa...
│ │ │ -
bool empty() const noexcept
Returns true if the unordered_multiset is empty.
│ │ │ -
const_iterator cend() const noexcept
│ │ │ -
_Hashtable::local_iterator local_iterator
Iterator-related typedefs.
│ │ │ -
node_type extract(const key_type &__key)
Extract a node.
│ │ │ -
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
iterator emplace(_Args &&... __args)
Builds and insert an element into the unordered_multiset.
│ │ │ -
unordered_multiset(_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_multiset from a range.
│ │ │ -
_Hashtable::const_iterator const_iterator
Iterator-related typedefs.
│ │ │ -
unordered_multiset(const allocator_type &__a)
Creates an unordered_multiset with no elements.
│ │ │ -
_Hashtable::allocator_type allocator_type
Public typedefs.
│ │ │ -
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
iterator find(const key_type &__x)
Tries to locate an element in an unordered_multiset.
│ │ │ -
_Hashtable::value_type value_type
Public typedefs.
│ │ │ -
unordered_multiset & operator=(unordered_multiset &&)=default
Move assignment operator.
│ │ │ -
float load_factor() const noexcept
Returns the average number of elements per bucket.
│ │ │ -
unordered_multiset()=default
Default constructor.
│ │ │ -
iterator insert(const_iterator __hint, node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ -
auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ -
_Hashtable::key_type key_type
Public typedefs.
│ │ │ -
unordered_multiset & operator=(const unordered_multiset &)=default
Copy assignment operator.
│ │ │ -
hasher hash_function() const
Returns the hash functor object with which the unordered_multiset was constructed.
│ │ │ -
unordered_multiset(initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_multiset from an initializer_list.
│ │ │ -
auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), true)
Finds whether an element with the given key exists.
│ │ │ -
auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x))
Finds the number of elements.
│ │ │ -
size_type count(const key_type &__x) const
Finds the number of elements.
│ │ │ -
iterator erase(const_iterator __position)
Erases an element from an unordered_multiset.
│ │ │ -
unordered_multiset(unordered_multiset &&)=default
Move constructor.
│ │ │ -
_Hashtable::reference reference
Iterator-related typedefs.
│ │ │ -
iterator end() noexcept
│ │ │ -
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Inserts an element into the unordered_multiset.
│ │ │ -
void swap(unordered_multiset &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_multiset.
│ │ │ -
const_iterator begin() const noexcept
│ │ │ -
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_multiset.
│ │ │ -
const_iterator cbegin() const noexcept
│ │ │ -
void insert(_InputIterator __first, _InputIterator __last)
A template function that inserts a range of elements.
│ │ │ -
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
│ │ │ -
key_equal key_eq() const
Returns the key comparison object with which the unordered_multiset was constructed.
│ │ │ -
_Hashtable::const_pointer const_pointer
Iterator-related typedefs.
│ │ │ -
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
│ │ │ -
iterator insert(value_type &&__x)
Inserts an element into the unordered_multiset.
│ │ │ -
iterator insert(const value_type &__x)
Inserts an element into the unordered_multiset.
│ │ │ -
const_iterator end() const noexcept
│ │ │ -
void reserve(size_type __n)
Prepare the unordered_multiset for a specified number of elements.
│ │ │ -
iterator insert(const_iterator __hint, value_type &&__x)
Inserts an element into the unordered_multiset.
│ │ │ -
_Hashtable::const_reference const_reference
Iterator-related typedefs.
│ │ │ -
iterator erase(iterator __position)
Erases an element from an unordered_multiset.
│ │ │ -
const_local_iterator cend(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_multiset.
│ │ │ -
iterator insert(node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
_Hashtable::hasher hasher
Public typedefs.
│ │ │ -
unordered_multiset(size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Default constructor creates no elements.
│ │ │ -
unordered_multiset & operator=(initializer_list< value_type > __l)
Unordered_multiset list assignment operator.
│ │ │ -
size_type size() const noexcept
Returns the size of the unordered_multiset.
│ │ │ -
_Hashtable::iterator iterator
Iterator-related typedefs.
│ │ │ -
local_iterator end(size_type __n)
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ -
node_type extract(const_iterator __pos)
Extract a node.
│ │ │ -
size_type max_size() const noexcept
Returns the maximum size of the unordered_multiset.
│ │ │ -
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
unordered_multiset(const unordered_multiset &)=default
Copy constructor.
│ │ │ -
_Hashtable::const_local_iterator const_local_iterator
Iterator-related typedefs.
│ │ │ -
size_type erase(const key_type &__x)
Erases elements according to the provided key.
│ │ │ -
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_multiset.
│ │ │ -
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_multiset.
│ │ │ -
_Hashtable::key_equal key_equal
Public typedefs.
│ │ │ -
void max_load_factor(float __z)
Change the unordered_multiset maximum load factor.
│ │ │ -
A standard container composed of unique keys (containing at most one of each key value) in which the ...
│ │ │ -
std::pair< iterator, bool > insert(const value_type &__x)
Attempts to insert an element into the unordered_set.
│ │ │ -
_Hashtable::iterator iterator
Iterator-related typedefs.
│ │ │ -
unordered_set(initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_set from an initializer_list.
│ │ │ -
void max_load_factor(float __z)
Change the unordered_set maximum load factor.
│ │ │ -
_Hashtable::reference reference
Iterator-related typedefs.
│ │ │ -
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
_Hashtable::value_type value_type
Public typedefs.
│ │ │ -
const_iterator cend() const noexcept
│ │ │ -
auto find(const _Kt &__k) -> decltype(_M_h._M_find_tr(__k))
Tries to locate an element in an unordered_set.
│ │ │ -
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_set.
│ │ │ -
_Hashtable::key_type key_type
Public typedefs.
│ │ │ -
size_type count(const key_type &__x) const
Finds the number of elements.
│ │ │ -
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
auto equal_range(const _Kt &__k) -> decltype(_M_h._M_equal_range_tr(__k))
Finds a subsequence matching given key.
│ │ │ -
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
auto count(const _Kt &__k) const -> decltype(_M_h._M_count_tr(__k))
Finds the number of elements.
│ │ │ -
const_iterator begin() const noexcept
│ │ │ -
_Hashtable::hasher hasher
Public typedefs.
│ │ │ -
_Hashtable::local_iterator local_iterator
Iterator-related typedefs.
│ │ │ -
insert_return_type insert(node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ -
const_iterator cbegin() const noexcept
│ │ │ -
bool empty() const noexcept
Returns true if the unordered_set is empty.
│ │ │ -
unordered_set & operator=(initializer_list< value_type > __l)
Unordered_set list assignment operator.
│ │ │ -
iterator erase(iterator __position)
Erases an element from an unordered_set.
│ │ │ -
unordered_set(unordered_set &&)=default
Move constructor.
│ │ │ -
unordered_set(const allocator_type &__a)
Creates an unordered_set with no elements.
│ │ │ -
const_local_iterator cend(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
auto contains(const _Kt &__k) const -> decltype(_M_h._M_find_tr(__k), void(), true)
Finds whether an element with the given key exists.
│ │ │ -
_Hashtable::const_pointer const_pointer
Iterator-related typedefs.
│ │ │ -
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
│ │ │ -
void swap(unordered_set &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_set.
│ │ │ -
iterator insert(const_iterator __hint, const value_type &__x)
Attempts to insert an element into the unordered_set.
│ │ │ -
std::pair< iterator, bool > insert(value_type &&__x)
Attempts to insert an element into the unordered_set.
│ │ │ -
float load_factor() const noexcept
Returns the average number of elements per bucket.
│ │ │ -
void rehash(size_type __n)
May rehash the unordered_set.
│ │ │ -
local_iterator end(size_type __n)
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
_Hashtable::key_equal key_equal
Public typedefs.
│ │ │ -
size_type size() const noexcept
Returns the size of the unordered_set.
│ │ │ -
iterator insert(const_iterator, node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
_Hashtable::const_iterator const_iterator
Iterator-related typedefs.
│ │ │ -
_Hashtable::difference_type difference_type
Iterator-related typedefs.
│ │ │ -
_Hashtable::const_reference const_reference
Iterator-related typedefs.
│ │ │ -
hasher hash_function() const
Returns the hash functor object with which the unordered_set was constructed.
│ │ │ -
unordered_set(const unordered_set &)=default
Copy constructor.
│ │ │ -
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
│ │ │ -
auto find(const _Kt &__k) const -> decltype(_M_h._M_find_tr(__k))
Tries to locate an element in an unordered_set.
│ │ │ -
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Attempts to insert an element into the unordered_set.
│ │ │ -
key_equal key_eq() const
Returns the key comparison object with which the unordered_set was constructed.
│ │ │ -
_Hashtable::allocator_type allocator_type
Public typedefs.
│ │ │ -
iterator insert(const_iterator __hint, value_type &&__x)
Attempts to insert an element into the unordered_set.
│ │ │ -
const_iterator end() const noexcept
│ │ │ -
iterator end() noexcept
│ │ │ -
node_type extract(const key_type &__key)
Extract a node.
│ │ │ -
local_iterator begin(size_type __n)
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
unordered_set()=default
Default constructor.
│ │ │ -
unordered_set & operator=(unordered_set &&)=default
Move assignment operator.
│ │ │ -
void insert(_InputIterator __first, _InputIterator __last)
A template function that attempts to insert a range of elements.
│ │ │ -
float max_load_factor() const noexcept
Returns a positive number that the unordered_set tries to keep the load factor less than or equal to.
│ │ │ -
bool contains(const key_type &__x) const
Finds whether an element with the given key exists.
│ │ │ -
std::pair< iterator, bool > emplace(_Args &&... __args)
Attempts to build and insert an element into the unordered_set.
│ │ │ -
unordered_set & operator=(const unordered_set &)=default
Copy assignment operator.
│ │ │ -
size_type erase(const key_type &__x)
Erases elements according to the provided key.
│ │ │ -
unordered_set(size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Default constructor creates no elements.
│ │ │ -
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_set.
│ │ │ -
iterator erase(const_iterator __position)
Erases an element from an unordered_set.
│ │ │ -
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_set.
│ │ │ -
auto equal_range(const _Kt &__k) const -> decltype(_M_h._M_equal_range_tr(__k))
Finds a subsequence matching given key.
│ │ │ -
_Hashtable::const_local_iterator const_local_iterator
Iterator-related typedefs.
│ │ │ -
void clear() noexcept
│ │ │ -
void insert(initializer_list< value_type > __l)
Attempts to insert a list of elements into the unordered_set.
│ │ │ -
unordered_set(_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_set from a range.
│ │ │ -
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_set.
│ │ │ -
void reserve(size_type __n)
Prepare the unordered_set for a specified number of elements.
│ │ │ -
node_type extract(const_iterator __pos)
Extract a node.
│ │ │ -
_Hashtable::pointer pointer
Iterator-related typedefs.
│ │ │ -
iterator begin() noexcept
│ │ │ -
iterator find(const key_type &__x)
Tries to locate an element in an unordered_set.
│ │ │ -
size_type max_size() const noexcept
Returns the maximum size of the unordered_set.
│ │ │ -
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_set.
│ │ │ - │ │ │ +
__detail::_Hashtable_traits< _Cache, false, false > __ummap_traits
Base types for unordered_multimap.
│ │ │ +
__detail::_Hashtable_traits< _Cache, false, true > __umap_traits
Base types for unordered_map.
│ │ │ +
Common iterator class.
│ │ │ +
A standard container composed of equivalent keys (possibly containing multiple of each key value) tha...
│ │ │ +
float load_factor() const noexcept
Returns the average number of elements per bucket.
│ │ │ +
_Hashtable::reference reference
Iterator-related typedefs.
│ │ │ +
iterator erase(iterator __position)
Erases an element from an unordered_multimap.
│ │ │ +
const_iterator end() const noexcept
│ │ │ +
size_type erase(const key_type &__x)
Erases elements according to the provided key.
│ │ │ +
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
│ │ │ +
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_multimap.
│ │ │ +
_Hashtable::iterator iterator
Iterator-related typedefs.
│ │ │ +
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_multimap.
│ │ │ +
iterator begin() noexcept
│ │ │ +
const_iterator begin() const noexcept
│ │ │ +
hasher hash_function() const
Returns the hash functor object with which the unordered_multimap was constructed.
│ │ │ +
iterator insert(const_iterator __hint, node_type &&__nh)
Re-insert an extracted node.
│ │ │ +
__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > insert(const_iterator __hint, _Pair &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ +
unordered_multimap & operator=(const unordered_multimap &)=default
Copy assignment operator.
│ │ │ +
key_equal key_eq() const
Returns the key comparison object with which the unordered_multimap was constructed.
│ │ │ +
size_type count(const key_type &__x) const
Finds the number of elements.
│ │ │ +
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_multimap.
│ │ │ +
_Hashtable::mapped_type mapped_type
Public typedefs.
│ │ │ +
auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_multimap.
│ │ │ +
local_iterator end(size_type __n)
Returns a read/write iterator pointing to one past the last bucket elements.
│ │ │ +
void insert(_InputIterator __first, _InputIterator __last)
A template function that attempts to insert a range of elements.
│ │ │ +
unordered_multimap & operator=(initializer_list< value_type > __l)
Unordered_multimap list assignment operator.
│ │ │ +
unordered_multimap(size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Default constructor creates no elements.
│ │ │ +
_Hashtable::value_type value_type
Public typedefs.
│ │ │ +
iterator emplace(_Args &&... __args)
Attempts to build and insert a std::pair into the unordered_multimap.
│ │ │ +
node_type extract(const key_type &__key)
Extract a node.
│ │ │ +
bool contains(const key_type &__x) const
Finds whether an element with the given key exists.
│ │ │ +
_Hashtable::const_reference const_reference
Iterator-related typedefs.
│ │ │ +
iterator insert(node_type &&__nh)
Re-insert an extracted node.
│ │ │ +
iterator erase(const_iterator __position)
Erases an element from an unordered_multimap.
│ │ │ +
iterator end() noexcept
│ │ │ +
local_iterator begin(size_type __n)
Returns a read/write iterator pointing to the first bucket element.
│ │ │ +
float max_load_factor() const noexcept
Returns a positive number that the unordered_multimap tries to keep the load factor less than or equa...
│ │ │ +
unordered_multimap()=default
Default constructor.
│ │ │ +
iterator insert(value_type &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ +
iterator insert(const value_type &__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ +
unordered_multimap & operator=(unordered_multimap &&)=default
Move assignment operator.
│ │ │ +
_Hashtable::hasher hasher
Public typedefs.
│ │ │ +
_Hashtable::local_iterator local_iterator
Iterator-related typedefs.
│ │ │ +
void reserve(size_type __n)
Prepare the unordered_multimap for a specified number of elements.
│ │ │ +
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
│ │ │ +
unordered_multimap(_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_multimap from a range.
│ │ │ + │ │ │ +
iterator find(const key_type &__x)
Tries to locate an element in an unordered_multimap.
│ │ │ +
unordered_multimap(initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_multimap from an initializer_list.
│ │ │ +
auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x))
Finds the number of elements.
│ │ │ +
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_multimap.
│ │ │ +
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ +
_Hashtable::pointer pointer
Iterator-related typedefs.
│ │ │ +
_Hashtable::allocator_type allocator_type
Public typedefs.
│ │ │ +
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ +
auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_multimap.
│ │ │ +
_Hashtable::const_local_iterator const_local_iterator
Iterator-related typedefs.
│ │ │ +
unordered_multimap(unordered_multimap &&)=default
Move constructor.
│ │ │ +
unordered_multimap(const allocator_type &__a)
Creates an unordered_multimap with no elements.
│ │ │ +
_Hashtable::difference_type difference_type
Iterator-related typedefs.
│ │ │ +
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ +
_Hashtable::const_pointer const_pointer
Iterator-related typedefs.
│ │ │ +
__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > insert(_Pair &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ +
auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), true)
Finds whether an element with the given key exists.
│ │ │ +
void swap(unordered_multimap &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_multimap.
│ │ │ +
void rehash(size_type __n)
May rehash the unordered_multimap.
│ │ │ +
_Hashtable::const_iterator const_iterator
Iterator-related typedefs.
│ │ │ +
void insert(initializer_list< value_type > __l)
Attempts to insert a list of elements into the unordered_multimap.
│ │ │ +
const_iterator cend() const noexcept
│ │ │ +
size_type max_size() const noexcept
Returns the maximum size of the unordered_multimap.
│ │ │ +
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ +
bool empty() const noexcept
Returns true if the unordered_multimap is empty.
│ │ │ +
const_iterator cbegin() const noexcept
│ │ │ +
_Hashtable::key_type key_type
Public typedefs.
│ │ │ +
node_type extract(const_iterator __pos)
Extract a node.
│ │ │ +
const_local_iterator cend(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ +
iterator insert(const_iterator __hint, const value_type &__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ +
size_type size() const noexcept
Returns the size of the unordered_multimap.
│ │ │ +
unordered_multimap(const unordered_multimap &)=default
Copy constructor.
│ │ │ +
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_multimap.
│ │ │ +
iterator insert(const_iterator __hint, value_type &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ +
auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ +
_Hashtable::key_equal key_equal
Public typedefs.
│ │ │ +
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_multimap.
│ │ │ +
void max_load_factor(float __z)
Change the unordered_multimap maximum load factor.
│ │ │ +
auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ +
A standard container composed of unique keys (containing at most one of each key value) that associat...
│ │ │ +
iterator insert(const_iterator __hint, value_type &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
_Hashtable::iterator iterator
Iterator-related typedefs.
│ │ │ +
void max_load_factor(float __z)
Change the unordered_map maximum load factor.
│ │ │ +
const mapped_type & at(const key_type &__k) const
Access to unordered_map data.
│ │ │ +
bool contains(const key_type &__x) const
Finds whether an element with the given key exists.
│ │ │ +
node_type extract(const key_type &__key)
Extract a node.
│ │ │ +
void insert(_InputIterator __first, _InputIterator __last)
A template function that attempts to insert a range of elements.
│ │ │ +
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_map.
│ │ │ +
auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_map.
│ │ │ +
unordered_map & operator=(initializer_list< value_type > __l)
Unordered_map list assignment operator.
│ │ │ +
_Hashtable::const_pointer const_pointer
Iterator-related typedefs.
│ │ │ +
auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_map.
│ │ │ +
void insert(initializer_list< value_type > __l)
Attempts to insert a list of elements into the unordered_map.
│ │ │ +
__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > insert(const_iterator __hint, _Pair &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
│ │ │ +
mapped_type & at(const key_type &__k)
Access to unordered_map data.
│ │ │ +
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_map.
│ │ │ +
iterator try_emplace(const_iterator __hint, const key_type &__k, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ +
node_type extract(const_iterator __pos)
Extract a node.
│ │ │ +
std::pair< iterator, bool > insert(const value_type &__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
void reserve(size_type __n)
Prepare the unordered_map for a specified number of elements.
│ │ │ +
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ +
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
│ │ │ +
iterator insert(const_iterator, node_type &&__nh)
Re-insert an extracted node.
│ │ │ +
_Hashtable::reference reference
Iterator-related typedefs.
│ │ │ +
iterator insert(const_iterator __hint, const value_type &__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
iterator end() noexcept
│ │ │ +
_Hashtable::allocator_type allocator_type
Public typedefs.
│ │ │ +
unordered_map(const unordered_map &)=default
Copy constructor.
│ │ │ +
size_type count(const key_type &__x) const
Finds the number of elements.
│ │ │ +
bool empty() const noexcept
Returns true if the unordered_map is empty.
│ │ │ +
size_type erase(const key_type &__x)
Erases elements according to the provided key.
│ │ │ +
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_map.
│ │ │ +
unordered_map(unordered_map &&)=default
Move constructor.
│ │ │ +
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ +
auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ +
auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), true)
Finds whether an element with the given key exists.
│ │ │ +
size_type max_size() const noexcept
Returns the maximum size of the unordered_map.
│ │ │ +
const_iterator end() const noexcept
│ │ │ +
unordered_map()=default
Default constructor.
│ │ │ +
_Hashtable::mapped_type mapped_type
Public typedefs.
│ │ │ +
unordered_map & operator=(unordered_map &&)=default
Move assignment operator.
│ │ │ +
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ +
unordered_map(size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Default constructor creates no elements.
│ │ │ +
std::pair< iterator, bool > emplace(_Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ +
const_local_iterator cend(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ +
size_type size() const noexcept
Returns the size of the unordered_map.
│ │ │ +
__enable_if_t< is_constructible< value_type, _Pair && >::value, pair< iterator, bool > > insert(_Pair &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
mapped_type & operator[](key_type &&__k)
Subscript ( [] ) access to unordered_map data.
│ │ │ +
std::pair< iterator, bool > insert(value_type &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
_Hashtable::hasher hasher
Public typedefs.
│ │ │ +
pair< iterator, bool > insert_or_assign(const key_type &__k, _Obj &&__obj)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
unordered_map(_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_map from a range.
│ │ │ +
void clear() noexcept
│ │ │ +
mapped_type & operator[](const key_type &__k)
Subscript ( [] ) access to unordered_map data.
│ │ │ +
pair< iterator, bool > try_emplace(const key_type &__k, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ +
const_iterator begin() const noexcept
│ │ │ +
key_equal key_eq() const
Returns the key comparison object with which the unordered_map was constructed.
│ │ │ +
_Hashtable::const_reference const_reference
Iterator-related typedefs.
│ │ │ +
_Hashtable::key_equal key_equal
Public typedefs.
│ │ │ +
_Hashtable::local_iterator local_iterator
Iterator-related typedefs.
│ │ │ +
iterator erase(iterator __position)
Erases an element from an unordered_map.
│ │ │ +
const_iterator cend() const noexcept
│ │ │ +
local_iterator end(size_type __n)
Returns a read/write iterator pointing to one past the last bucket elements.
│ │ │ +
_Hashtable::pointer pointer
Iterator-related typedefs.
│ │ │ +
iterator insert_or_assign(const_iterator __hint, const key_type &__k, _Obj &&__obj)
Attempts to insert a std::pair into the unordered_map.
│ │ │ +
unordered_map(const allocator_type &__a)
Creates an unordered_map with no elements.
│ │ │ +
_Hashtable::key_type key_type
Public typedefs.
│ │ │ +
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_map.
│ │ │ +
iterator begin() noexcept
│ │ │ +
hasher hash_function() const
Returns the hash functor object with which the unordered_map was constructed.
│ │ │ +
auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ +
unordered_map(initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_map from an initializer_list.
│ │ │ +
_Hashtable::const_iterator const_iterator
Iterator-related typedefs.
│ │ │ +
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ +
iterator find(const key_type &__x)
Tries to locate an element in an unordered_map.
│ │ │ +
float load_factor() const noexcept
Returns the average number of elements per bucket.
│ │ │ +
iterator erase(const_iterator __position)
Erases an element from an unordered_map.
│ │ │ +
void swap(unordered_map &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_map.
│ │ │ +
local_iterator begin(size_type __n)
Returns a read/write iterator pointing to the first bucket element.
│ │ │ +
float max_load_factor() const noexcept
Returns a positive number that the unordered_map tries to keep the load factor less than or equal to.
│ │ │ +
unordered_map & operator=(const unordered_map &)=default
Copy assignment operator.
│ │ │ +
_Hashtable::difference_type difference_type
Iterator-related typedefs.
│ │ │ +
auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x))
Finds the number of elements.
│ │ │ +
_Hashtable::const_local_iterator const_local_iterator
Iterator-related typedefs.
│ │ │ +
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_map.
│ │ │ +
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ +
insert_return_type insert(node_type &&__nh)
Re-insert an extracted node.
│ │ │ +
_Hashtable::value_type value_type
Public typedefs.
│ │ │ +
void rehash(size_type __n)
May rehash the unordered_map.
│ │ │ +
const_iterator cbegin() const noexcept
│ │ │ + │ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ libstdc++ │ │ │ │ -unordered_set.h │ │ │ │ +unordered_map.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// unordered_set implementation -*- C++ -*- │ │ │ │ +1// unordered_map implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ 3// Copyright (C) 2010-2023 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,2557 +21,2947 @@ │ │ │ │ 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/unordered_map.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{unordered_map} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _UNORDERED_SET_H │ │ │ │ -31#define _UNORDERED_SET_H │ │ │ │ +30#ifndef _UNORDERED_MAP_H │ │ │ │ +31#define _UNORDERED_MAP_H │ │ │ │ 32 │ │ │ │ 33#include <_b_i_t_s_/_h_a_s_h_t_a_b_l_e_._h> │ │ │ │ 34#include <_b_i_t_s_/_a_l_l_o_c_a_t_o_r_._h> │ │ │ │ 35#include <_b_i_t_s_/_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h> // hash │ │ │ │ 36#include <_b_i_t_s_/_s_t_l___f_u_n_c_t_i_o_n_._h> // equal_to │ │ │ │ 37 │ │ │ │ 38namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ 39{ │ │ │ │ 40_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ 41_GLIBCXX_BEGIN_NAMESPACE_CONTAINER │ │ │ │ 42 │ │ │ │ -43 /// Base types for unordered_set. │ │ │ │ +43 /// Base types for unordered_map. │ │ │ │ 44 template │ │ │ │ -_4_5 using _____u_s_e_t___t_r_a_i_t_s = __detail::_Hashtable_traits<_Cache, true, true>; │ │ │ │ +_4_5 using _____u_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits<_Cache, false, true>; │ │ │ │ 46 │ │ │ │ -47 template, │ │ │ │ -49 typename ___P_r_e_d = _s_t_d_:_:_e_q_u_a_l___t_o_<___V_a_l_u_e_>, │ │ │ │ -50 typename _Alloc = _s_t_d_:_:_a_l_l_o_c_a_t_o_r_<___V_a_l_u_e_>, │ │ │ │ -51 typename ___T_r = _____u_s_e_t___t_r_a_i_t_s_<_____c_a_c_h_e___d_e_f_a_u_l_t_<___V_a_l_u_e_,_ ___H_a_s_h_>_:_:_v_a_l_u_e>> │ │ │ │ -52 using _____u_s_e_t___h_a_s_h_t_a_b_l_e = _Hashtable<_Value, _Value, _Alloc, │ │ │ │ -53 __detail::_Identity, ___P_r_e_d, ___H_a_s_h, │ │ │ │ -54 __detail::_Mod_range_hashing, │ │ │ │ -55 __detail::_Default_ranged_hash, │ │ │ │ -56 __detail::_Prime_rehash_policy, ___T_r>; │ │ │ │ -57 │ │ │ │ -58 /// Base types for unordered_multiset. │ │ │ │ -59 template │ │ │ │ -_6_0 using _____u_m_s_e_t___t_r_a_i_t_s = __detail::_Hashtable_traits<_Cache, true, false>; │ │ │ │ -61 │ │ │ │ -62 template, │ │ │ │ -64 typename ___P_r_e_d = _s_t_d_:_:_e_q_u_a_l___t_o_<___V_a_l_u_e_>, │ │ │ │ -65 typename _Alloc = _s_t_d_:_:_a_l_l_o_c_a_t_o_r_<___V_a_l_u_e_>, │ │ │ │ -66 typename ___T_r = _____u_m_s_e_t___t_r_a_i_t_s_<_____c_a_c_h_e___d_e_f_a_u_l_t_<___V_a_l_u_e_,_ ___H_a_s_h_>_:_:_v_a_l_u_e>> │ │ │ │ -67 using _____u_m_s_e_t___h_a_s_h_t_a_b_l_e = _Hashtable<_Value, _Value, _Alloc, │ │ │ │ -68 __detail::_Identity, │ │ │ │ -69 ___P_r_e_d, ___H_a_s_h, │ │ │ │ -70 __detail::_Mod_range_hashing, │ │ │ │ -71 __detail::_Default_ranged_hash, │ │ │ │ -72 __detail::_Prime_rehash_policy, ___T_r>; │ │ │ │ -73 │ │ │ │ -74 template │ │ │ │ -75 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t; │ │ │ │ +47 template, │ │ │ │ +50 typename ___P_r_e_d = _s_t_d_:_:_e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ +51 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_> >, │ │ │ │ +52 typename ___T_r = _____u_m_a_p___t_r_a_i_t_s_<_____c_a_c_h_e___d_e_f_a_u_l_t_<___K_e_y_,_ ___H_a_s_h_>_:_:_v_a_l_u_e>> │ │ │ │ +53 using _____u_m_a_p___h_a_s_h_t_a_b_l_e = ___H_a_s_h_t_a_b_l_e_<___K_e_y_,_ _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t_ ___K_e_y_,_ ___T_p_>, │ │ │ │ +54 _Alloc, __detail::_Select1st, │ │ │ │ +55 ___P_r_e_d, ___H_a_s_h, │ │ │ │ +56 __detail::_Mod_range_hashing, │ │ │ │ +57 __detail::_Default_ranged_hash, │ │ │ │ +58 __detail::_Prime_rehash_policy, ___T_r>; │ │ │ │ +59 │ │ │ │ +60 /// Base types for unordered_multimap. │ │ │ │ +61 template │ │ │ │ +_6_2 using _____u_m_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits<_Cache, false, false>; │ │ │ │ +63 │ │ │ │ +64 template, │ │ │ │ +67 typename ___P_r_e_d = _s_t_d_:_:_e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ +68 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_> >, │ │ │ │ +69 typename ___T_r = _____u_m_m_a_p___t_r_a_i_t_s_<_____c_a_c_h_e___d_e_f_a_u_l_t_<___K_e_y_,_ ___H_a_s_h_>_:_:_v_a_l_u_e>> │ │ │ │ +70 using _____u_m_m_a_p___h_a_s_h_t_a_b_l_e = ___H_a_s_h_t_a_b_l_e_<___K_e_y_,_ _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t_ ___K_e_y_,_ ___T_p_>, │ │ │ │ +71 _Alloc, __detail::_Select1st, │ │ │ │ +72 ___P_r_e_d, ___H_a_s_h, │ │ │ │ +73 __detail::_Mod_range_hashing, │ │ │ │ +74 __detail::_Default_ranged_hash, │ │ │ │ +75 __detail::_Prime_rehash_policy, ___T_r>; │ │ │ │ 76 │ │ │ │ -77 /** │ │ │ │ -78 * @brief A standard container composed of unique keys (containing │ │ │ │ -79 * at most one of each key value) in which the elements' keys are │ │ │ │ -80 * the elements themselves. │ │ │ │ -81 * │ │ │ │ -82 * @ingroup unordered_associative_containers │ │ │ │ -83 * @headerfile unordered_set │ │ │ │ -84 * @since C++11 │ │ │ │ -85 * │ │ │ │ -86 * @tparam _Value Type of key objects. │ │ │ │ -87 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ -88 │ │ │ │ -89 * @tparam _Pred Predicate function object type, defaults to │ │ │ │ -90 * equal_to<_Value>. │ │ │ │ -91 * │ │ │ │ -92 * @tparam _Alloc Allocator type, defaults to allocator<_Key>. │ │ │ │ -93 * │ │ │ │ -94 * Meets the requirements of a container, and │ │ │ │ -95 * unordered associative container │ │ │ │ +77 template │ │ │ │ +78 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p; │ │ │ │ +79 │ │ │ │ +80 /** │ │ │ │ +81 * @brief A standard container composed of unique keys (containing │ │ │ │ +82 * at most one of each key value) that associates values of another type │ │ │ │ +83 * with the keys. │ │ │ │ +84 * │ │ │ │ +85 * @ingroup unordered_associative_containers │ │ │ │ +86 * @headerfile unordered_map │ │ │ │ +87 * @since C++11 │ │ │ │ +88 * │ │ │ │ +89 * @tparam _Key Type of key objects. │ │ │ │ +90 * @tparam _Tp Type of mapped objects. │ │ │ │ +91 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ +92 * @tparam _Pred Predicate function object type, defaults │ │ │ │ +93 * to equal_to<_Value>. │ │ │ │ +94 * @tparam _Alloc Allocator type, defaults to │ │ │ │ +95 * std::allocator>. │ │ │ │ 96 * │ │ │ │ -97 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ -98 * alias __uset_hashtable. │ │ │ │ -99 */ │ │ │ │ -100 template, │ │ │ │ -102 typename ___P_r_e_d = _e_q_u_a_l___t_o_<___V_a_l_u_e_>, │ │ │ │ -103 typename _Alloc = _a_l_l_o_c_a_t_o_r_<___V_a_l_u_e_>> │ │ │ │ -_1_0_4 class _u_n_o_r_d_e_r_e_d___s_e_t │ │ │ │ -105 { │ │ │ │ -106 typedef _____u_s_e_t___h_a_s_h_t_a_b_l_e_<___V_a_l_u_e_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_> ___H_a_s_h_t_a_b_l_e; │ │ │ │ -107 ___H_a_s_h_t_a_b_l_e _M_h; │ │ │ │ -108 │ │ │ │ -109 public: │ │ │ │ -110 // typedefs: │ │ │ │ -111 ///@{ │ │ │ │ -112 /// Public typedefs. │ │ │ │ -_1_1_3 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ -_1_1_4 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ -_1_1_5 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ -_1_1_6 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ -_1_1_7 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ -118 ///@} │ │ │ │ -119 │ │ │ │ -120 ///@{ │ │ │ │ -121 /// Iterator-related typedefs. │ │ │ │ -_1_2_2 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ -_1_2_3 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ -_1_2_4 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_2_5 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_2_6 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_7 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_8 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_9 typedef typename _Hashtable::const_local_iterator _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_3_0 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ -_1_3_1 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ -132 ///@} │ │ │ │ -133 │ │ │ │ -134#if __cplusplus > 201402L │ │ │ │ -135 using node_type = typename _Hashtable::node_type; │ │ │ │ -136 using insert_return_type = typename _Hashtable::insert_return_type; │ │ │ │ -137#endif │ │ │ │ -138 │ │ │ │ -139 // construct/destroy/copy │ │ │ │ -140 │ │ │ │ -141 /// Default constructor. │ │ │ │ -_1_4_2 _u_n_o_r_d_e_r_e_d___s_e_t() = default; │ │ │ │ -143 │ │ │ │ -144 /** │ │ │ │ -145 * @brief Default constructor creates no elements. │ │ │ │ -146 * @param __n Minimal initial number of buckets. │ │ │ │ -147 * @param __hf A hash functor. │ │ │ │ -148 * @param __eql A key equality functor. │ │ │ │ -149 * @param __a An allocator object. │ │ │ │ -150 */ │ │ │ │ -151 explicit │ │ │ │ -_1_5_2 _u_n_o_r_d_e_r_e_d___s_e_t(_s_i_z_e___t_y_p_e __n, │ │ │ │ -153 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -154 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -155 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()) │ │ │ │ -156 : _M_h(__n, _____h_f, _____e_q_l, __a) │ │ │ │ -157 { } │ │ │ │ -158 │ │ │ │ -159 /** │ │ │ │ -160 * @brief Builds an %unordered_set from a range. │ │ │ │ -161 * @param __first An input iterator. │ │ │ │ -162 * @param __last An input iterator. │ │ │ │ -163 * @param __n Minimal initial number of buckets. │ │ │ │ -164 * @param __hf A hash functor. │ │ │ │ -165 * @param __eql A key equality functor. │ │ │ │ -166 * @param __a An allocator object. │ │ │ │ -167 * │ │ │ │ -168 * Create an %unordered_set consisting of copies of the elements from │ │ │ │ -169 * [__first,__last). This is linear in N (where N is │ │ │ │ -170 * distance(__first,__last)). │ │ │ │ -171 */ │ │ │ │ -172 template │ │ │ │ -_1_7_3 _u_n_o_r_d_e_r_e_d___s_e_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ -174 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -175 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -176 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -177 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()) │ │ │ │ -178 : _M_h(__first, __last, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -179 { } │ │ │ │ -180 │ │ │ │ -181 /// Copy constructor. │ │ │ │ -_1_8_2 _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; │ │ │ │ -183 │ │ │ │ -184 /// Move constructor. │ │ │ │ -_1_8_5 _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; │ │ │ │ +97 * Meets the requirements of a container, and │ │ │ │ +98 * unordered associative container │ │ │ │ +99 * │ │ │ │ +100 * The resulting value type of the container is std::pair. │ │ │ │ +101 * │ │ │ │ +102 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ +103 * alias __umap_hashtable. │ │ │ │ +104 */ │ │ │ │ +105 template, │ │ │ │ +107 typename ___P_r_e_d = _e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ +108 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_9 class _u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ +110 { │ │ │ │ +111 typedef _____u_m_a_p___h_a_s_h_t_a_b_l_e_<___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_> ___H_a_s_h_t_a_b_l_e; │ │ │ │ +112 ___H_a_s_h_t_a_b_l_e _M_h; │ │ │ │ +113 │ │ │ │ +114 public: │ │ │ │ +115 // typedefs: │ │ │ │ +116 ///@{ │ │ │ │ +117 /// Public typedefs. │ │ │ │ +_1_1_8 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ +_1_1_9 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ +_1_2_0 typedef typename _Hashtable::mapped_type _m_a_p_p_e_d___t_y_p_e; │ │ │ │ +_1_2_1 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ +_1_2_2 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ +_1_2_3 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ +124 ///@} │ │ │ │ +125 │ │ │ │ +126 ///@{ │ │ │ │ +127 /// Iterator-related typedefs. │ │ │ │ +_1_2_8 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ +_1_2_9 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ +_1_3_0 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ +_1_3_1 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ +_1_3_2 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ +_1_3_3 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ +_1_3_4 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ +_1_3_5 typedef typename _Hashtable::const_local_iterator _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ +_1_3_6 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ +_1_3_7 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ +138 ///@} │ │ │ │ +139 │ │ │ │ +140#if __cplusplus > 201402L │ │ │ │ +141 using node_type = typename _Hashtable::node_type; │ │ │ │ +142 using insert_return_type = typename _Hashtable::insert_return_type; │ │ │ │ +143#endif │ │ │ │ +144 │ │ │ │ +145 //construct/destroy/copy │ │ │ │ +146 │ │ │ │ +147 /// Default constructor. │ │ │ │ +_1_4_8 _u_n_o_r_d_e_r_e_d___m_a_p() = default; │ │ │ │ +149 │ │ │ │ +150 /** │ │ │ │ +151 * @brief Default constructor creates no elements. │ │ │ │ +152 * @param __n Minimal initial number of buckets. │ │ │ │ +153 * @param __hf A hash functor. │ │ │ │ +154 * @param __eql A key equality functor. │ │ │ │ +155 * @param __a An allocator object. │ │ │ │ +156 */ │ │ │ │ +157 explicit │ │ │ │ +_1_5_8 _u_n_o_r_d_e_r_e_d___m_a_p(_s_i_z_e___t_y_p_e __n, │ │ │ │ +159 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ +160 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ +161 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()) │ │ │ │ +162 : _M_h(__n, _____h_f, _____e_q_l, __a) │ │ │ │ +163 { } │ │ │ │ +164 │ │ │ │ +165 /** │ │ │ │ +166 * @brief Builds an %unordered_map from a range. │ │ │ │ +167 * @param __first An input iterator. │ │ │ │ +168 * @param __last An input iterator. │ │ │ │ +169 * @param __n Minimal initial number of buckets. │ │ │ │ +170 * @param __hf A hash functor. │ │ │ │ +171 * @param __eql A key equality functor. │ │ │ │ +172 * @param __a An allocator object. │ │ │ │ +173 * │ │ │ │ +174 * Create an %unordered_map consisting of copies of the elements from │ │ │ │ +175 * [__first,__last). This is linear in N (where N is │ │ │ │ +176 * distance(__first,__last)). │ │ │ │ +177 */ │ │ │ │ +178 template │ │ │ │ +_1_7_9 _u_n_o_r_d_e_r_e_d___m_a_p(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ +180 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ +181 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ +182 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ +183 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()) │ │ │ │ +184 : _M_h(__first, __last, __n, _____h_f, _____e_q_l, __a) │ │ │ │ +185 { } │ │ │ │ 186 │ │ │ │ -187 /** │ │ │ │ -188 * @brief Creates an %unordered_set with no elements. │ │ │ │ -189 * @param __a An allocator object. │ │ │ │ -190 */ │ │ │ │ -191 explicit │ │ │ │ -_1_9_2 _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) │ │ │ │ -193 : _M_h(__a) │ │ │ │ -194 { } │ │ │ │ -195 │ │ │ │ -196 /* │ │ │ │ -197 * @brief Copy constructor with allocator argument. │ │ │ │ -198 * @param __uset Input %unordered_set to copy. │ │ │ │ -199 * @param __a An allocator object. │ │ │ │ -200 */ │ │ │ │ -201 _u_n_o_r_d_e_r_e_d___s_e_t(const _u_n_o_r_d_e_r_e_d___s_e_t& _____u_s_e_t, │ │ │ │ -202 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -203 : _M_h(_____u_s_e_t._M_h, __a) │ │ │ │ -204 { } │ │ │ │ -205 │ │ │ │ -206 /* │ │ │ │ -207 * @brief Move constructor with allocator argument. │ │ │ │ -208 * @param __uset Input %unordered_set to move. │ │ │ │ -209 * @param __a An allocator object. │ │ │ │ -210 */ │ │ │ │ -211 _u_n_o_r_d_e_r_e_d___s_e_t(_u_n_o_r_d_e_r_e_d___s_e_t&& __uset, │ │ │ │ -212 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -213 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__uset._M_h), __a)) ) │ │ │ │ -214 : _M_h(_s_t_d_:_:_m_o_v_e(__uset._M_h), __a) │ │ │ │ -215 { } │ │ │ │ -216 │ │ │ │ -217 /** │ │ │ │ -218 * @brief Builds an %unordered_set from an initializer_list. │ │ │ │ -219 * @param __l An initializer_list. │ │ │ │ -220 * @param __n Minimal initial number of buckets. │ │ │ │ -221 * @param __hf A hash functor. │ │ │ │ -222 * @param __eql A key equality functor. │ │ │ │ -223 * @param __a An allocator object. │ │ │ │ -224 * │ │ │ │ -225 * Create an %unordered_set consisting of copies of the elements in the │ │ │ │ -226 * list. This is linear in N (where N is @a __l.size()). │ │ │ │ -227 */ │ │ │ │ -_2_2_8 _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, │ │ │ │ -229 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -230 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -231 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -232 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()) │ │ │ │ -233 : _M_h(_____l, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -234 { } │ │ │ │ -235 │ │ │ │ -236 _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) │ │ │ │ -237 : _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) │ │ │ │ -238 { } │ │ │ │ -239 │ │ │ │ -240 _u_n_o_r_d_e_r_e_d___s_e_t(_s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -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(__n, __hf, _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, │ │ │ │ -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, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -250 { } │ │ │ │ -251 │ │ │ │ -252 template │ │ │ │ -253 _u_n_o_r_d_e_r_e_d___s_e_t(_InputIterator __first, _InputIterator __last, │ │ │ │ -254 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -255 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -256 : _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) │ │ │ │ -257 { } │ │ │ │ -258 │ │ │ │ -259 _u_n_o_r_d_e_r_e_d___s_e_t(initializer_list __l, │ │ │ │ -260 _s_i_z_e___t_y_p_e __n, │ │ │ │ +187 /// Copy constructor. │ │ │ │ +_1_8_8 _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; │ │ │ │ +189 │ │ │ │ +190 /// Move constructor. │ │ │ │ +_1_9_1 _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; │ │ │ │ +192 │ │ │ │ +193 /** │ │ │ │ +194 * @brief Creates an %unordered_map with no elements. │ │ │ │ +195 * @param __a An allocator object. │ │ │ │ +196 */ │ │ │ │ +197 explicit │ │ │ │ +_1_9_8 _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) │ │ │ │ +199 : _M_h(__a) │ │ │ │ +200 { } │ │ │ │ +201 │ │ │ │ +202 /* │ │ │ │ +203 * @brief Copy constructor with allocator argument. │ │ │ │ +204 * @param __uset Input %unordered_map to copy. │ │ │ │ +205 * @param __a An allocator object. │ │ │ │ +206 */ │ │ │ │ +207 _u_n_o_r_d_e_r_e_d___m_a_p(const _u_n_o_r_d_e_r_e_d___m_a_p& _____u_m_a_p, │ │ │ │ +208 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +209 : _M_h(_____u_m_a_p._M_h, __a) │ │ │ │ +210 { } │ │ │ │ +211 │ │ │ │ +212 /* │ │ │ │ +213 * @brief Move constructor with allocator argument. │ │ │ │ +214 * @param __uset Input %unordered_map to move. │ │ │ │ +215 * @param __a An allocator object. │ │ │ │ +216 */ │ │ │ │ +217 _u_n_o_r_d_e_r_e_d___m_a_p(_u_n_o_r_d_e_r_e_d___m_a_p&& __umap, │ │ │ │ +218 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +219 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__umap._M_h), __a)) ) │ │ │ │ +220 : _M_h(_s_t_d_:_:_m_o_v_e(__umap._M_h), __a) │ │ │ │ +221 { } │ │ │ │ +222 │ │ │ │ +223 /** │ │ │ │ +224 * @brief Builds an %unordered_map from an initializer_list. │ │ │ │ +225 * @param __l An initializer_list. │ │ │ │ +226 * @param __n Minimal initial number of buckets. │ │ │ │ +227 * @param __hf A hash functor. │ │ │ │ +228 * @param __eql A key equality functor. │ │ │ │ +229 * @param __a An allocator object. │ │ │ │ +230 * │ │ │ │ +231 * Create an %unordered_map consisting of copies of the elements in the │ │ │ │ +232 * list. This is linear in N (where N is @a __l.size()). │ │ │ │ +233 */ │ │ │ │ +_2_3_4 _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, │ │ │ │ +235 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ +236 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ +237 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ +238 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()) │ │ │ │ +239 : _M_h(_____l, __n, _____h_f, _____e_q_l, __a) │ │ │ │ +240 { } │ │ │ │ +241 │ │ │ │ +242 _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) │ │ │ │ +243 : _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) │ │ │ │ +244 { } │ │ │ │ +245 │ │ │ │ +246 _u_n_o_r_d_e_r_e_d___m_a_p(_s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +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(__n, __hf, _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, │ │ │ │ +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, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +256 { } │ │ │ │ +257 │ │ │ │ +258 template │ │ │ │ +259 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ +260 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ 261 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -262 : _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) │ │ │ │ +262 : _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) │ │ │ │ 263 { } │ │ │ │ 264 │ │ │ │ -265 _u_n_o_r_d_e_r_e_d___s_e_t(initializer_list __l, │ │ │ │ -266 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +265 _u_n_o_r_d_e_r_e_d___m_a_p(initializer_list __l, │ │ │ │ +266 _s_i_z_e___t_y_p_e __n, │ │ │ │ 267 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -268 : _u_n_o_r_d_e_r_e_d___s_e_t(__l, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +268 : _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) │ │ │ │ 269 { } │ │ │ │ 270 │ │ │ │ -271 /// Copy assignment operator. │ │ │ │ -272 _u_n_o_r_d_e_r_e_d___s_e_t& │ │ │ │ -_2_7_3 _o_p_e_r_a_t_o_r_=(const _u_n_o_r_d_e_r_e_d___s_e_t&) = default; │ │ │ │ -274 │ │ │ │ -275 /// Move assignment operator. │ │ │ │ -276 _u_n_o_r_d_e_r_e_d___s_e_t& │ │ │ │ -_2_7_7 _o_p_e_r_a_t_o_r_=(_u_n_o_r_d_e_r_e_d___s_e_t&&) = default; │ │ │ │ -278 │ │ │ │ -279 /** │ │ │ │ -280 * @brief %Unordered_set list assignment operator. │ │ │ │ -281 * @param __l An initializer_list. │ │ │ │ -282 * │ │ │ │ -283 * This function fills an %unordered_set with copies of the elements in │ │ │ │ -284 * the initializer list @a __l. │ │ │ │ -285 * │ │ │ │ -286 * Note that the assignment completely changes the %unordered_set and │ │ │ │ -287 * that the resulting %unordered_set's size is the same as the number │ │ │ │ -288 * of elements assigned. │ │ │ │ -289 */ │ │ │ │ -290 _u_n_o_r_d_e_r_e_d___s_e_t& │ │ │ │ -_2_9_1 _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) │ │ │ │ -292 { │ │ │ │ -293 _M_h = _____l; │ │ │ │ -294 return *this; │ │ │ │ -295 } │ │ │ │ -296 │ │ │ │ -297 /// Returns the allocator object used by the %unordered_set. │ │ │ │ -298 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_2_9_9 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ -300 { return _M_h.get_allocator(); } │ │ │ │ -301 │ │ │ │ -302 // size and capacity: │ │ │ │ -303 │ │ │ │ -304 /// Returns true if the %unordered_set is empty. │ │ │ │ -305 _GLIBCXX_NODISCARD bool │ │ │ │ -_3_0_6 _e_m_p_t_y() const noexcept │ │ │ │ -307 { return _M_h.empty(); } │ │ │ │ -308 │ │ │ │ -309 /// Returns the size of the %unordered_set. │ │ │ │ -310 _s_i_z_e___t_y_p_e │ │ │ │ -_3_1_1 _s_i_z_e() const noexcept │ │ │ │ -312 { return _M_h.size(); } │ │ │ │ -313 │ │ │ │ -314 /// Returns the maximum size of the %unordered_set. │ │ │ │ -315 _s_i_z_e___t_y_p_e │ │ │ │ -_3_1_6 _m_a_x___s_i_z_e() const noexcept │ │ │ │ -317 { return _M_h.max_size(); } │ │ │ │ -318 │ │ │ │ -319 // iterators. │ │ │ │ -320 │ │ │ │ -321 ///@{ │ │ │ │ -322 /** │ │ │ │ -323 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -324 * element in the %unordered_set. │ │ │ │ -325 */ │ │ │ │ -326 _i_t_e_r_a_t_o_r │ │ │ │ -_3_2_7 _b_e_g_i_n() noexcept │ │ │ │ -328 { return _M_h.begin(); } │ │ │ │ -329 │ │ │ │ -330 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_3_1 _b_e_g_i_n() const noexcept │ │ │ │ -332 { return _M_h.begin(); } │ │ │ │ -333 ///@} │ │ │ │ +271 _u_n_o_r_d_e_r_e_d___m_a_p(initializer_list __l, │ │ │ │ +272 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +273 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +274 : _u_n_o_r_d_e_r_e_d___m_a_p(__l, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +275 { } │ │ │ │ +276 │ │ │ │ +277 /// Copy assignment operator. │ │ │ │ +278 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ +_2_7_9 _o_p_e_r_a_t_o_r_=(const _u_n_o_r_d_e_r_e_d___m_a_p&) = default; │ │ │ │ +280 │ │ │ │ +281 /// Move assignment operator. │ │ │ │ +282 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ +_2_8_3 _o_p_e_r_a_t_o_r_=(_u_n_o_r_d_e_r_e_d___m_a_p&&) = default; │ │ │ │ +284 │ │ │ │ +285 /** │ │ │ │ +286 * @brief %Unordered_map list assignment operator. │ │ │ │ +287 * @param __l An initializer_list. │ │ │ │ +288 * │ │ │ │ +289 * This function fills an %unordered_map with copies of the elements in │ │ │ │ +290 * the initializer list @a __l. │ │ │ │ +291 * │ │ │ │ +292 * Note that the assignment completely changes the %unordered_map and │ │ │ │ +293 * that the resulting %unordered_map's size is the same as the number │ │ │ │ +294 * of elements assigned. │ │ │ │ +295 */ │ │ │ │ +296 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ +_2_9_7 _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) │ │ │ │ +298 { │ │ │ │ +299 _M_h = _____l; │ │ │ │ +300 return *this; │ │ │ │ +301 } │ │ │ │ +302 │ │ │ │ +303 /// Returns the allocator object used by the %unordered_map. │ │ │ │ +304 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ +_3_0_5 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ +306 { return _M_h.get_allocator(); } │ │ │ │ +307 │ │ │ │ +308 // size and capacity: │ │ │ │ +309 │ │ │ │ +310 /// Returns true if the %unordered_map is empty. │ │ │ │ +311 _GLIBCXX_NODISCARD bool │ │ │ │ +_3_1_2 _e_m_p_t_y() const noexcept │ │ │ │ +313 { return _M_h.empty(); } │ │ │ │ +314 │ │ │ │ +315 /// Returns the size of the %unordered_map. │ │ │ │ +316 _s_i_z_e___t_y_p_e │ │ │ │ +_3_1_7 _s_i_z_e() const noexcept │ │ │ │ +318 { return _M_h.size(); } │ │ │ │ +319 │ │ │ │ +320 /// Returns the maximum size of the %unordered_map. │ │ │ │ +321 _s_i_z_e___t_y_p_e │ │ │ │ +_3_2_2 _m_a_x___s_i_z_e() const noexcept │ │ │ │ +323 { return _M_h.max_size(); } │ │ │ │ +324 │ │ │ │ +325 // iterators. │ │ │ │ +326 │ │ │ │ +327 /** │ │ │ │ +328 * Returns a read/write iterator that points to the first element in the │ │ │ │ +329 * %unordered_map. │ │ │ │ +330 */ │ │ │ │ +331 _i_t_e_r_a_t_o_r │ │ │ │ +_3_3_2 _b_e_g_i_n() noexcept │ │ │ │ +333 { return _M_h.begin(); } │ │ │ │ 334 │ │ │ │ 335 ///@{ │ │ │ │ 336 /** │ │ │ │ -337 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -338 * element in the %unordered_set. │ │ │ │ +337 * Returns a read-only (constant) iterator that points to the first │ │ │ │ +338 * element in the %unordered_map. │ │ │ │ 339 */ │ │ │ │ -340 _i_t_e_r_a_t_o_r │ │ │ │ -_3_4_1 _e_n_d() noexcept │ │ │ │ -342 { return _M_h.end(); } │ │ │ │ +340 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_3_4_1 _b_e_g_i_n() const noexcept │ │ │ │ +342 { return _M_h.begin(); } │ │ │ │ 343 │ │ │ │ 344 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_4_5 _e_n_d() const noexcept │ │ │ │ -346 { return _M_h.end(); } │ │ │ │ +_3_4_5 _c_b_e_g_i_n() const noexcept │ │ │ │ +346 { return _M_h.begin(); } │ │ │ │ 347 ///@} │ │ │ │ 348 │ │ │ │ 349 /** │ │ │ │ -350 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -351 * element in the %unordered_set. │ │ │ │ +350 * Returns a read/write iterator that points one past the last element in │ │ │ │ +351 * the %unordered_map. │ │ │ │ 352 */ │ │ │ │ -353 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_5_4 _c_b_e_g_i_n() const noexcept │ │ │ │ -355 { return _M_h.begin(); } │ │ │ │ +353 _i_t_e_r_a_t_o_r │ │ │ │ +_3_5_4 _e_n_d() noexcept │ │ │ │ +355 { return _M_h.end(); } │ │ │ │ 356 │ │ │ │ -357 /** │ │ │ │ -358 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -359 * element in the %unordered_set. │ │ │ │ -360 */ │ │ │ │ -361 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_6_2 _c_e_n_d() const noexcept │ │ │ │ -363 { return _M_h.end(); } │ │ │ │ -364 │ │ │ │ -365 // modifiers. │ │ │ │ -366 │ │ │ │ -367 /** │ │ │ │ -368 * @brief Attempts to build and insert an element into the │ │ │ │ -369 * %unordered_set. │ │ │ │ -370 * @param __args Arguments used to generate an element. │ │ │ │ -371 * @return A pair, of which the first element is an iterator that points │ │ │ │ -372 * to the possibly inserted element, and the second is a bool │ │ │ │ -373 * that is true if the element was actually inserted. │ │ │ │ -374 * │ │ │ │ -375 * This function attempts to build and insert an element into the │ │ │ │ -376 * %unordered_set. An %unordered_set relies on unique keys and thus an │ │ │ │ -377 * element is only inserted if it is not already present in the │ │ │ │ -378 * %unordered_set. │ │ │ │ -379 * │ │ │ │ -380 * Insertion requires amortized constant time. │ │ │ │ -381 */ │ │ │ │ -382 template │ │ │ │ -383 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_3_8_4 _e_m_p_l_a_c_e(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -385 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -386 │ │ │ │ -387 /** │ │ │ │ -388 * @brief Attempts to insert an element into the %unordered_set. │ │ │ │ -389 * @param __pos An iterator that serves as a hint as to where the │ │ │ │ -390 * element should be inserted. │ │ │ │ -391 * @param __args Arguments used to generate the element to be │ │ │ │ -392 * inserted. │ │ │ │ -393 * @return An iterator that points to the element with key equivalent to │ │ │ │ -394 * the one generated from @a __args (may or may not be the │ │ │ │ -395 * element itself). │ │ │ │ -396 * │ │ │ │ -397 * This function is not concerned about whether the insertion took place, │ │ │ │ -398 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ -399 * does. Note that the first parameter is only a hint and can │ │ │ │ -400 * potentially improve the performance of the insertion process. A bad │ │ │ │ -401 * hint would cause no gains in efficiency. │ │ │ │ -402 * │ │ │ │ -403 * For more on @a hinting, see: │ │ │ │ -404 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +357 ///@{ │ │ │ │ +358 /** │ │ │ │ +359 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ +360 * element in the %unordered_map. │ │ │ │ +361 */ │ │ │ │ +362 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_3_6_3 _e_n_d() const noexcept │ │ │ │ +364 { return _M_h.end(); } │ │ │ │ +365 │ │ │ │ +366 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_3_6_7 _c_e_n_d() const noexcept │ │ │ │ +368 { return _M_h.end(); } │ │ │ │ +369 ///@} │ │ │ │ +370 │ │ │ │ +371 // modifiers. │ │ │ │ +372 │ │ │ │ +373 /** │ │ │ │ +374 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +375 * %unordered_map. │ │ │ │ +376 * │ │ │ │ +377 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ +378 * std::piecewise_contruct for passing arguments to each │ │ │ │ +379 * part of the pair constructor). │ │ │ │ +380 * │ │ │ │ +381 * @return A pair, of which the first element is an iterator that points │ │ │ │ +382 * to the possibly inserted pair, and the second is a bool that │ │ │ │ +383 * is true if the pair was actually inserted. │ │ │ │ +384 * │ │ │ │ +385 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ +386 * the %unordered_map. │ │ │ │ +387 * An %unordered_map relies on unique keys and thus a %pair is only │ │ │ │ +388 * inserted if its first element (the key) is not already present in the │ │ │ │ +389 * %unordered_map. │ │ │ │ +390 * │ │ │ │ +391 * Insertion requires amortized constant time. │ │ │ │ +392 */ │ │ │ │ +393 template │ │ │ │ +394 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_3_9_5 _e_m_p_l_a_c_e(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +396 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ +397 │ │ │ │ +398 /** │ │ │ │ +399 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +400 * %unordered_map. │ │ │ │ +401 * │ │ │ │ +402 * @param __pos An iterator that serves as a hint as to where the pair │ │ │ │ +403 * should be inserted. │ │ │ │ +404 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ +405 * std::piecewise_contruct for passing arguments to each │ │ │ │ +406 * part of the pair constructor). │ │ │ │ +407 * @return An iterator that points to the element with key of the │ │ │ │ +408 * std::pair built from @a __args (may or may not be that │ │ │ │ +409 * std::pair). │ │ │ │ +410 * │ │ │ │ +411 * This function is not concerned about whether the insertion took place, │ │ │ │ +412 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ +413 * does. │ │ │ │ +414 * Note that the first parameter is only a hint and can potentially │ │ │ │ +415 * improve the performance of the insertion process. A bad hint would │ │ │ │ +416 * cause no gains in efficiency. │ │ │ │ +417 * │ │ │ │ +418 * See │ │ │ │ +419 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ associative.html#containers.associative.insert_hints │ │ │ │ -405 * │ │ │ │ -406 * Insertion requires amortized constant time. │ │ │ │ -407 */ │ │ │ │ -408 template │ │ │ │ -409 _i_t_e_r_a_t_o_r │ │ │ │ -_4_1_0 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -411 { return _M_h.emplace_hint(_____p_o_s, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -412 │ │ │ │ -413 ///@{ │ │ │ │ -414 /** │ │ │ │ -415 * @brief Attempts to insert an element into the %unordered_set. │ │ │ │ -416 * @param __x Element to be inserted. │ │ │ │ -417 * @return A pair, of which the first element is an iterator that points │ │ │ │ -418 * to the possibly inserted element, and the second is a bool │ │ │ │ -419 * that is true if the element was actually inserted. │ │ │ │ -420 * │ │ │ │ -421 * This function attempts to insert an element into the %unordered_set. │ │ │ │ -422 * An %unordered_set relies on unique keys and thus an element is only │ │ │ │ -423 * inserted if it is not already present in the %unordered_set. │ │ │ │ -424 * │ │ │ │ -425 * Insertion requires amortized constant time. │ │ │ │ -426 */ │ │ │ │ -427 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_4_2_8 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -429 { return _M_h.insert(__x); } │ │ │ │ -430 │ │ │ │ -431 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_4_3_2 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -433 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -434 ///@} │ │ │ │ -435 │ │ │ │ -436 ///@{ │ │ │ │ -437 /** │ │ │ │ -438 * @brief Attempts to insert an element into the %unordered_set. │ │ │ │ -439 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -440 * element should be inserted. │ │ │ │ -441 * @param __x Element to be inserted. │ │ │ │ -442 * @return An iterator that points to the element with key of │ │ │ │ -443 * @a __x (may or may not be the element passed in). │ │ │ │ -444 * │ │ │ │ -445 * This function is not concerned about whether the insertion took place, │ │ │ │ -446 * and thus does not return a boolean like the single-argument insert() │ │ │ │ -447 * does. Note that the first parameter is only a hint and can │ │ │ │ -448 * potentially improve the performance of the insertion process. A bad │ │ │ │ -449 * hint would cause no gains in efficiency. │ │ │ │ -450 * │ │ │ │ -451 * For more on @a hinting, see: │ │ │ │ -452 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +420 * for more on @a hinting. │ │ │ │ +421 * │ │ │ │ +422 * Insertion requires amortized constant time. │ │ │ │ +423 */ │ │ │ │ +424 template │ │ │ │ +425 _i_t_e_r_a_t_o_r │ │ │ │ +_4_2_6 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +427 { return _M_h.emplace_hint(_____p_o_s, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ +428 │ │ │ │ +429#if __cplusplus > 201402L │ │ │ │ +430 /// Extract a node. │ │ │ │ +431 node_type │ │ │ │ +_4_3_2 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ +433 { │ │ │ │ +434 __glibcxx_assert(_____p_o_s != _e_n_d()); │ │ │ │ +435 return _M_h.extract(_____p_o_s); │ │ │ │ +436 } │ │ │ │ +437 │ │ │ │ +438 /// Extract a node. │ │ │ │ +439 node_type │ │ │ │ +_4_4_0 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& _____k_e_y) │ │ │ │ +441 { return _M_h.extract(_____k_e_y); } │ │ │ │ +442 │ │ │ │ +443 /// Re-insert an extracted node. │ │ │ │ +444 insert_return_type │ │ │ │ +_4_4_5 _i_n_s_e_r_t(node_type&& _____n_h) │ │ │ │ +446 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ +447 │ │ │ │ +448 /// Re-insert an extracted node. │ │ │ │ +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, node_type&& _____n_h) │ │ │ │ +451 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(_____n_h)).position; } │ │ │ │ +452 │ │ │ │ +453#define __cpp_lib_unordered_map_try_emplace 201411L │ │ │ │ +454 /** │ │ │ │ +455 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +456 * %unordered_map. │ │ │ │ +457 * │ │ │ │ +458 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ +459 * the unordered_map. │ │ │ │ +460 * @param __args Arguments used to generate the .second for a │ │ │ │ +461 * new pair instance. │ │ │ │ +462 * │ │ │ │ +463 * @return A pair, of which the first element is an iterator that points │ │ │ │ +464 * to the possibly inserted pair, and the second is a bool that │ │ │ │ +465 * is true if the pair was actually inserted. │ │ │ │ +466 * │ │ │ │ +467 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ +468 * the %unordered_map. │ │ │ │ +469 * An %unordered_map relies on unique keys and thus a %pair is only │ │ │ │ +470 * inserted if its first element (the key) is not already present in the │ │ │ │ +471 * %unordered_map. │ │ │ │ +472 * If a %pair is not inserted, this function has no effect. │ │ │ │ +473 * │ │ │ │ +474 * Insertion requires amortized constant time. │ │ │ │ +475 */ │ │ │ │ +476 template │ │ │ │ +477 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_4_7_8 _t_r_y___e_m_p_l_a_c_e(const _k_e_y___t_y_p_e& _____k, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +479 { │ │ │ │ +480 return _M_h.try_emplace(_c_e_n_d(), _____k, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ +481 } │ │ │ │ +482 │ │ │ │ +483 // move-capable overload │ │ │ │ +484 template │ │ │ │ +485 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +486 _t_r_y___e_m_p_l_a_c_e(_k_e_y___t_y_p_e&& _____k, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +487 { │ │ │ │ +488 return _M_h.try_emplace(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ +489 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ +490 } │ │ │ │ +491 │ │ │ │ +492 /** │ │ │ │ +493 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +494 * %unordered_map. │ │ │ │ +495 * │ │ │ │ +496 * @param __hint An iterator that serves as a hint as to where the pair │ │ │ │ +497 * should be inserted. │ │ │ │ +498 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ +499 * the unordered_map. │ │ │ │ +500 * @param __args Arguments used to generate the .second for a │ │ │ │ +501 * new pair instance. │ │ │ │ +502 * @return An iterator that points to the element with key of the │ │ │ │ +503 * std::pair built from @a __args (may or may not be that │ │ │ │ +504 * std::pair). │ │ │ │ +505 * │ │ │ │ +506 * This function is not concerned about whether the insertion took place, │ │ │ │ +507 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ +508 * does. However, if insertion did not take place, │ │ │ │ +509 * this function has no effect. │ │ │ │ +510 * Note that the first parameter is only a hint and can potentially │ │ │ │ +511 * improve the performance of the insertion process. A bad hint would │ │ │ │ +512 * cause no gains in efficiency. │ │ │ │ +513 * │ │ │ │ +514 * See │ │ │ │ +515 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ associative.html#containers.associative.insert_hints │ │ │ │ -453 * │ │ │ │ -454 * Insertion requires amortized constant. │ │ │ │ -455 */ │ │ │ │ -456 _i_t_e_r_a_t_o_r │ │ │ │ -_4_5_7 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -458 { return _M_h.insert(_____h_i_n_t, __x); } │ │ │ │ -459 │ │ │ │ -460 _i_t_e_r_a_t_o_r │ │ │ │ -_4_6_1 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -462 { return _M_h.insert(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -463 ///@} │ │ │ │ -464 │ │ │ │ -465 /** │ │ │ │ -466 * @brief A template function that attempts to insert a range of │ │ │ │ -467 * elements. │ │ │ │ -468 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -469 * inserted. │ │ │ │ -470 * @param __last Iterator pointing to the end of the range. │ │ │ │ -471 * │ │ │ │ -472 * Complexity similar to that of the range constructor. │ │ │ │ -473 */ │ │ │ │ -474 template │ │ │ │ -475 void │ │ │ │ -_4_7_6 _i_n_s_e_r_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ -477 { _M_h.insert(__first, __last); } │ │ │ │ -478 │ │ │ │ -479 /** │ │ │ │ -480 * @brief Attempts to insert a list of elements into the %unordered_set. │ │ │ │ -481 * @param __l A std::initializer_list of elements │ │ │ │ -482 * to be inserted. │ │ │ │ -483 * │ │ │ │ -484 * Complexity similar to that of the range constructor. │ │ │ │ -485 */ │ │ │ │ -486 void │ │ │ │ -_4_8_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) │ │ │ │ -488 { _M_h.insert(_____l); } │ │ │ │ -489 │ │ │ │ -490#if __cplusplus > 201402L │ │ │ │ -491 /// Extract a node. │ │ │ │ -492 node_type │ │ │ │ -_4_9_3 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ -494 { │ │ │ │ -495 __glibcxx_assert(_____p_o_s != _e_n_d()); │ │ │ │ -496 return _M_h.extract(_____p_o_s); │ │ │ │ -497 } │ │ │ │ -498 │ │ │ │ -499 /// Extract a node. │ │ │ │ -500 node_type │ │ │ │ -_5_0_1 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& _____k_e_y) │ │ │ │ -502 { return _M_h.extract(_____k_e_y); } │ │ │ │ -503 │ │ │ │ -504 /// Re-insert an extracted node. │ │ │ │ -505 insert_return_type │ │ │ │ -_5_0_6 _i_n_s_e_r_t(node_type&& _____n_h) │ │ │ │ -507 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ -508 │ │ │ │ -509 /// Re-insert an extracted node. │ │ │ │ -510 _i_t_e_r_a_t_o_r │ │ │ │ -_5_1_1 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r, node_type&& _____n_h) │ │ │ │ -512 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(_____n_h)).position; } │ │ │ │ -513#endif // C++17 │ │ │ │ -514 │ │ │ │ -515 ///@{ │ │ │ │ -516 /** │ │ │ │ -517 * @brief Erases an element from an %unordered_set. │ │ │ │ -518 * @param __position An iterator pointing to the element to be erased. │ │ │ │ -519 * @return An iterator pointing to the element immediately following │ │ │ │ -520 * @a __position prior to the element being erased. If no such │ │ │ │ -521 * element exists, end() is returned. │ │ │ │ -522 * │ │ │ │ -523 * This function erases an element, pointed to by the given iterator, │ │ │ │ -524 * from an %unordered_set. Note that this function only erases the │ │ │ │ -525 * element, and that if the element is itself a pointer, the pointed-to │ │ │ │ -526 * memory is not touched in any way. Managing the pointer is the user's │ │ │ │ -527 * responsibility. │ │ │ │ -528 */ │ │ │ │ -529 _i_t_e_r_a_t_o_r │ │ │ │ -_5_3_0 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -531 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -532 │ │ │ │ -533 // LWG 2059. │ │ │ │ -534 _i_t_e_r_a_t_o_r │ │ │ │ -_5_3_5 _e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -536 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -537 ///@} │ │ │ │ +516 * for more on @a hinting. │ │ │ │ +517 * │ │ │ │ +518 * Insertion requires amortized constant time. │ │ │ │ +519 */ │ │ │ │ +520 template │ │ │ │ +521 _i_t_e_r_a_t_o_r │ │ │ │ +_5_2_2 _t_r_y___e_m_p_l_a_c_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _k_e_y___t_y_p_e& _____k, │ │ │ │ +523 ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +524 { │ │ │ │ +525 return _M_h.try_emplace(_____h_i_n_t, _____k, │ │ │ │ +526 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...).first; │ │ │ │ +527 } │ │ │ │ +528 │ │ │ │ +529 // move-capable overload │ │ │ │ +530 template │ │ │ │ +531 _i_t_e_r_a_t_o_r │ │ │ │ +532 _t_r_y___e_m_p_l_a_c_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _k_e_y___t_y_p_e&& _____k, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +533 { │ │ │ │ +534 return _M_h.try_emplace(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ +535 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...).first; │ │ │ │ +536 } │ │ │ │ +537#endif // C++17 │ │ │ │ 538 │ │ │ │ -539 /** │ │ │ │ -540 * @brief Erases elements according to the provided key. │ │ │ │ -541 * @param __x Key of element to be erased. │ │ │ │ -542 * @return The number of elements erased. │ │ │ │ -543 * │ │ │ │ -544 * This function erases all the elements located by the given key from │ │ │ │ -545 * an %unordered_set. For an %unordered_set the result of this function │ │ │ │ -546 * can only be 0 (not present) or 1 (present). │ │ │ │ -547 * Note that this function only erases the element, and that if │ │ │ │ -548 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -549 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -550 */ │ │ │ │ -551 _s_i_z_e___t_y_p_e │ │ │ │ -_5_5_2 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -553 { return _M_h.erase(__x); } │ │ │ │ -554 │ │ │ │ -555 /** │ │ │ │ -556 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ -557 * %unordered_set. │ │ │ │ -558 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -559 * erased. │ │ │ │ -560 * @param __last Iterator pointing to the end of the range to │ │ │ │ -561 * be erased. │ │ │ │ -562 * @return The iterator @a __last. │ │ │ │ -563 * │ │ │ │ -564 * This function erases a sequence of elements from an %unordered_set. │ │ │ │ -565 * Note that this function only erases the element, and that if │ │ │ │ -566 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -567 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -568 */ │ │ │ │ -569 _i_t_e_r_a_t_o_r │ │ │ │ -_5_7_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) │ │ │ │ -571 { return _M_h.erase(__first, __last); } │ │ │ │ -572 │ │ │ │ -573 /** │ │ │ │ -574 * Erases all elements in an %unordered_set. Note that this function only │ │ │ │ -575 * erases the elements, and that if the elements themselves are pointers, │ │ │ │ -576 * the pointed-to memory is not touched in any way. Managing the pointer │ │ │ │ -577 * is the user's responsibility. │ │ │ │ -578 */ │ │ │ │ -579 void │ │ │ │ -_5_8_0 _c_l_e_a_r() noexcept │ │ │ │ -581 { _M_h.clear(); } │ │ │ │ -582 │ │ │ │ -583 /** │ │ │ │ -584 * @brief Swaps data with another %unordered_set. │ │ │ │ -585 * @param __x An %unordered_set of the same element and allocator │ │ │ │ -586 * types. │ │ │ │ -587 * │ │ │ │ -588 * This exchanges the elements between two sets in constant time. │ │ │ │ -589 * Note that the global std::swap() function is specialized such that │ │ │ │ -590 * std::swap(s1,s2) will feed to this function. │ │ │ │ -591 */ │ │ │ │ -592 void │ │ │ │ -_5_9_3 _s_w_a_p(_u_n_o_r_d_e_r_e_d___s_e_t& __x) │ │ │ │ -594 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ -595 { _M_h.swap(__x._M_h); } │ │ │ │ -596 │ │ │ │ -597#if __cplusplus > 201402L │ │ │ │ -598 template │ │ │ │ -599 friend class std::_Hash_merge_helper; │ │ │ │ -600 │ │ │ │ -601 template │ │ │ │ -602 void │ │ │ │ -603 merge(_u_n_o_r_d_e_r_e_d___s_e_t_<___V_a_l_u_e_,_ ___H_2_,_ ___P_2_,_ ___A_l_l_o_c_>& _____s_o_u_r_c_e) │ │ │ │ -604 { │ │ │ │ -605 using ___M_e_r_g_e___h_e_l_p_e_r = ___H_a_s_h___m_e_r_g_e___h_e_l_p_e_r_<_u_n_o_r_d_e_r_e_d___s_e_t_,_ ___H_2_,_ ___P_2_>; │ │ │ │ -606 _M_h._M_merge_unique(_Merge_helper::_S_get_table(_____s_o_u_r_c_e)); │ │ │ │ -607 } │ │ │ │ -608 │ │ │ │ -609 template │ │ │ │ -610 void │ │ │ │ -611 merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source) │ │ │ │ -612 { merge(__source); } │ │ │ │ -613 │ │ │ │ -614 template │ │ │ │ -615 void │ │ │ │ -616 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>& __source) │ │ │ │ -617 { │ │ │ │ -618 using _Merge_helper = _Hash_merge_helper; │ │ │ │ -619 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); │ │ │ │ -620 } │ │ │ │ -621 │ │ │ │ -622 template │ │ │ │ -623 void │ │ │ │ -624 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source) │ │ │ │ -625 { merge(__source); } │ │ │ │ -626#endif // C++17 │ │ │ │ -627 │ │ │ │ -628 // observers. │ │ │ │ -629 │ │ │ │ -630 /// Returns the hash functor object with which the %unordered_set was │ │ │ │ -631 /// constructed. │ │ │ │ -632 _h_a_s_h_e_r │ │ │ │ -_6_3_3 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ -634 { return _M_h.hash_function(); } │ │ │ │ -635 │ │ │ │ -636 /// Returns the key comparison object with which the %unordered_set was │ │ │ │ -637 /// constructed. │ │ │ │ -638 _k_e_y___e_q_u_a_l │ │ │ │ -_6_3_9 _k_e_y___e_q() const │ │ │ │ -640 { return _M_h.key_eq(); } │ │ │ │ -641 │ │ │ │ -642 // lookup. │ │ │ │ -643 │ │ │ │ -644 ///@{ │ │ │ │ -645 /** │ │ │ │ -646 * @brief Tries to locate an element in an %unordered_set. │ │ │ │ -647 * @param __x Element to be located. │ │ │ │ -648 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ -649 * found. │ │ │ │ -650 * │ │ │ │ -651 * This function takes a key and tries to locate the element with which │ │ │ │ -652 * the key matches. If successful the function returns an iterator │ │ │ │ -653 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ -654 * past-the-end ( @c end() ) iterator. │ │ │ │ -655 */ │ │ │ │ -656 _i_t_e_r_a_t_o_r │ │ │ │ -_6_5_7 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -658 { return _M_h.find(__x); } │ │ │ │ -659 │ │ │ │ -660#if __cplusplus > 201703L │ │ │ │ -661 template │ │ │ │ -662 auto │ │ │ │ -_6_6_3 _f_i_n_d(const ___K_t& _____k) │ │ │ │ -664 -> decltype(_M_h._M_find_tr(_____k)) │ │ │ │ -665 { return _M_h._M_find_tr(_____k); } │ │ │ │ -666#endif │ │ │ │ -667 │ │ │ │ -668 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_6_6_9 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -670 { return _M_h.find(__x); } │ │ │ │ -671 │ │ │ │ -672#if __cplusplus > 201703L │ │ │ │ -673 template │ │ │ │ -674 auto │ │ │ │ -_6_7_5 _f_i_n_d(const ___K_t& _____k) const │ │ │ │ -676 -> decltype(_M_h._M_find_tr(_____k)) │ │ │ │ -677 { return _M_h._M_find_tr(_____k); } │ │ │ │ -678#endif │ │ │ │ -679 ///@} │ │ │ │ -680 │ │ │ │ -681 ///@{ │ │ │ │ +539 ///@{ │ │ │ │ +540 /** │ │ │ │ +541 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ +542 │ │ │ │ +543 * @param __x Pair to be inserted (see std::make_pair for easy │ │ │ │ +544 * creation of pairs). │ │ │ │ +545 * │ │ │ │ +546 * @return A pair, of which the first element is an iterator that │ │ │ │ +547 * points to the possibly inserted pair, and the second is │ │ │ │ +548 * a bool that is true if the pair was actually inserted. │ │ │ │ +549 * │ │ │ │ +550 * This function attempts to insert a (key, value) %pair into the │ │ │ │ +551 * %unordered_map. An %unordered_map relies on unique keys and thus a │ │ │ │ +552 * %pair is only inserted if its first element (the key) is not already │ │ │ │ +553 * present in the %unordered_map. │ │ │ │ +554 * │ │ │ │ +555 * Insertion requires amortized constant time. │ │ │ │ +556 */ │ │ │ │ +557 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_5_5_8 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ +559 { return _M_h.insert(__x); } │ │ │ │ +560 │ │ │ │ +561 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +562 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ +563 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_5_6_4 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +565 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +566 │ │ │ │ +567 template │ │ │ │ +568 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, │ │ │ │ +569 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_>> │ │ │ │ +_5_7_0 _i_n_s_e_r_t(___P_a_i_r&& __x) │ │ │ │ +571 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ +572 ///@} │ │ │ │ +573 │ │ │ │ +574 ///@{ │ │ │ │ +575 /** │ │ │ │ +576 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ +577 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ +578 * pair should be inserted. │ │ │ │ +579 * @param __x Pair to be inserted (see std::make_pair for easy creation │ │ │ │ +580 * of pairs). │ │ │ │ +581 * @return An iterator that points to the element with key of │ │ │ │ +582 * @a __x (may or may not be the %pair passed in). │ │ │ │ +583 * │ │ │ │ +584 * This function is not concerned about whether the insertion took place, │ │ │ │ +585 * and thus does not return a boolean like the single-argument insert() │ │ │ │ +586 * does. Note that the first parameter is only a hint and can │ │ │ │ +587 * potentially improve the performance of the insertion process. A bad │ │ │ │ +588 * hint would cause no gains in efficiency. │ │ │ │ +589 * │ │ │ │ +590 * See │ │ │ │ +591 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +592 * for more on @a hinting. │ │ │ │ +593 * │ │ │ │ +594 * Insertion requires amortized constant time. │ │ │ │ +595 */ │ │ │ │ +596 _i_t_e_r_a_t_o_r │ │ │ │ +_5_9_7 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ +598 { return _M_h.insert(_____h_i_n_t, __x); } │ │ │ │ +599 │ │ │ │ +600 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +601 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ +602 _i_t_e_r_a_t_o_r │ │ │ │ +_6_0_3 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +604 { return _M_h.insert(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +605 │ │ │ │ +606 template │ │ │ │ +607 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, _i_t_e_r_a_t_o_r> │ │ │ │ +_6_0_8 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, ___P_a_i_r&& __x) │ │ │ │ +609 { return _M_h.emplace_hint(_____h_i_n_t, _s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ +610 ///@} │ │ │ │ +611 │ │ │ │ +612 /** │ │ │ │ +613 * @brief A template function that attempts to insert a range of │ │ │ │ +614 * elements. │ │ │ │ +615 * @param __first Iterator pointing to the start of the range to be │ │ │ │ +616 * inserted. │ │ │ │ +617 * @param __last Iterator pointing to the end of the range. │ │ │ │ +618 * │ │ │ │ +619 * Complexity similar to that of the range constructor. │ │ │ │ +620 */ │ │ │ │ +621 template │ │ │ │ +622 void │ │ │ │ +_6_2_3 _i_n_s_e_r_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ +624 { _M_h.insert(__first, __last); } │ │ │ │ +625 │ │ │ │ +626 /** │ │ │ │ +627 * @brief Attempts to insert a list of elements into the %unordered_map. │ │ │ │ +628 * @param __l A std::initializer_list of elements │ │ │ │ +629 * to be inserted. │ │ │ │ +630 * │ │ │ │ +631 * Complexity similar to that of the range constructor. │ │ │ │ +632 */ │ │ │ │ +633 void │ │ │ │ +_6_3_4 _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) │ │ │ │ +635 { _M_h.insert(_____l); } │ │ │ │ +636 │ │ │ │ +637 │ │ │ │ +638#if __cplusplus > 201402L │ │ │ │ +639 /** │ │ │ │ +640 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ +641 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ +642 * the map. │ │ │ │ +643 * @param __obj Argument used to generate the .second for a pair │ │ │ │ +644 * instance. │ │ │ │ +645 * │ │ │ │ +646 * @return A pair, of which the first element is an iterator that │ │ │ │ +647 * points to the possibly inserted pair, and the second is │ │ │ │ +648 * a bool that is true if the pair was actually inserted. │ │ │ │ +649 * │ │ │ │ +650 * This function attempts to insert a (key, value) %pair into the │ │ │ │ +651 * %unordered_map. An %unordered_map relies on unique keys and thus a │ │ │ │ +652 * %pair is only inserted if its first element (the key) is not already │ │ │ │ +653 * present in the %unordered_map. │ │ │ │ +654 * If the %pair was already in the %unordered_map, the .second of │ │ │ │ +655 * the %pair is assigned from __obj. │ │ │ │ +656 * │ │ │ │ +657 * Insertion requires amortized constant time. │ │ │ │ +658 */ │ │ │ │ +659 template │ │ │ │ +660 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +_6_6_1 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(const _k_e_y___t_y_p_e& _____k, _Obj&& _____o_b_j) │ │ │ │ +662 { │ │ │ │ +663 auto _____r_e_t = _M_h.try_emplace(_c_e_n_d(), _____k, │ │ │ │ +664 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ +665 if (!_____r_e_t.second) │ │ │ │ +666 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ +667 return _____r_e_t; │ │ │ │ +668 } │ │ │ │ +669 │ │ │ │ +670 // move-capable overload │ │ │ │ +671 template │ │ │ │ +672 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ +673 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_k_e_y___t_y_p_e&& _____k, _Obj&& _____o_b_j) │ │ │ │ +674 { │ │ │ │ +675 auto _____r_e_t = _M_h.try_emplace(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ +676 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ +677 if (!_____r_e_t.second) │ │ │ │ +678 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ +679 return _____r_e_t; │ │ │ │ +680 } │ │ │ │ +681 │ │ │ │ 682 /** │ │ │ │ -683 * @brief Finds the number of elements. │ │ │ │ -684 * @param __x Element to located. │ │ │ │ -685 * @return Number of elements with specified key. │ │ │ │ -686 * │ │ │ │ -687 * This function only makes sense for unordered_multisets; for │ │ │ │ -688 * unordered_set the result will either be 0 (not present) or 1 │ │ │ │ -689 * (present). │ │ │ │ -690 */ │ │ │ │ -691 _s_i_z_e___t_y_p_e │ │ │ │ -_6_9_2 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -693 { return _M_h.count(__x); } │ │ │ │ -694 │ │ │ │ -695#if __cplusplus > 201703L │ │ │ │ -696 template │ │ │ │ -697 auto │ │ │ │ -_6_9_8 _c_o_u_n_t(const ___K_t& _____k) const │ │ │ │ -699 -> decltype(_M_h._M_count_tr(_____k)) │ │ │ │ -700 { return _M_h._M_count_tr(_____k); } │ │ │ │ -701#endif │ │ │ │ -702 ///@} │ │ │ │ -703 │ │ │ │ -704#if __cplusplus > 201703L │ │ │ │ -705 ///@{ │ │ │ │ -706 /** │ │ │ │ -707 * @brief Finds whether an element with the given key exists. │ │ │ │ -708 * @param __x Key of elements to be located. │ │ │ │ -709 * @return True if there is any element with the specified key. │ │ │ │ -710 */ │ │ │ │ -711 bool │ │ │ │ -_7_1_2 _c_o_n_t_a_i_n_s(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -713 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ -714 │ │ │ │ -715 template │ │ │ │ -716 auto │ │ │ │ -_7_1_7 _c_o_n_t_a_i_n_s(const ___K_t& _____k) const │ │ │ │ -718 -> decltype(_M_h._M_find_tr(_____k), _v_o_i_d(), true) │ │ │ │ -719 { return _M_h._M_find_tr(_____k) != _M_h.end(); } │ │ │ │ -720 ///@} │ │ │ │ -721#endif │ │ │ │ -722 │ │ │ │ -723 ///@{ │ │ │ │ -724 /** │ │ │ │ -725 * @brief Finds a subsequence matching given key. │ │ │ │ -726 * @param __x Key to be located. │ │ │ │ -727 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ -728 * matching given key. │ │ │ │ -729 * │ │ │ │ -730 * This function probably only makes sense for multisets. │ │ │ │ -731 */ │ │ │ │ -732 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_> │ │ │ │ -_7_3_3 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -734 { return _M_h.equal_range(__x); } │ │ │ │ -735 │ │ │ │ -736#if __cplusplus > 201703L │ │ │ │ -737 template │ │ │ │ -738 auto │ │ │ │ -_7_3_9 _e_q_u_a_l___r_a_n_g_e(const ___K_t& _____k) │ │ │ │ -740 -> decltype(_M_h._M_equal_range_tr(_____k)) │ │ │ │ -741 { return _M_h._M_equal_range_tr(_____k); } │ │ │ │ -742#endif │ │ │ │ -743 │ │ │ │ -744 _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t___i_t_e_r_a_t_o_r_,_ _c_o_n_s_t___i_t_e_r_a_t_o_r_> │ │ │ │ -_7_4_5 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -746 { return _M_h.equal_range(__x); } │ │ │ │ -747 │ │ │ │ -748#if __cplusplus > 201703L │ │ │ │ -749 template │ │ │ │ -750 auto │ │ │ │ -_7_5_1 _e_q_u_a_l___r_a_n_g_e(const ___K_t& _____k) const │ │ │ │ -752 -> decltype(_M_h._M_equal_range_tr(_____k)) │ │ │ │ -753 { return _M_h._M_equal_range_tr(_____k); } │ │ │ │ -754#endif │ │ │ │ -755 ///@} │ │ │ │ -756 │ │ │ │ -757 // bucket interface. │ │ │ │ -758 │ │ │ │ -759 /// Returns the number of buckets of the %unordered_set. │ │ │ │ -760 _s_i_z_e___t_y_p_e │ │ │ │ -_7_6_1 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -762 { return _M_h.bucket_count(); } │ │ │ │ -763 │ │ │ │ -764 /// Returns the maximum number of buckets of the %unordered_set. │ │ │ │ -765 _s_i_z_e___t_y_p_e │ │ │ │ -_7_6_6 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -767 { return _M_h.max_bucket_count(); } │ │ │ │ -768 │ │ │ │ -769 /* │ │ │ │ -770 * @brief Returns the number of elements in a given bucket. │ │ │ │ -771 * @param __n A bucket index. │ │ │ │ -772 * @return The number of elements in the bucket. │ │ │ │ -773 */ │ │ │ │ -774 _s_i_z_e___t_y_p_e │ │ │ │ -775 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -776 { return _M_h.bucket_size(__n); } │ │ │ │ -777 │ │ │ │ -778 /* │ │ │ │ -779 * @brief Returns the bucket index of a given element. │ │ │ │ -780 * @param __key A key instance. │ │ │ │ -781 * @return The key bucket index. │ │ │ │ -782 */ │ │ │ │ -783 _s_i_z_e___t_y_p_e │ │ │ │ -784 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ -785 { return _M_h.bucket(__key); } │ │ │ │ -786 │ │ │ │ -787 ///@{ │ │ │ │ -788 /** │ │ │ │ -789 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ -790 * bucket element. │ │ │ │ -791 * @param __n The bucket index. │ │ │ │ -792 * @return A read-only local iterator. │ │ │ │ -793 */ │ │ │ │ -794 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_7_9_5 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ -796 { return _M_h.begin(__n); } │ │ │ │ -797 │ │ │ │ -798 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_7_9_9 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -800 { return _M_h.begin(__n); } │ │ │ │ -801 │ │ │ │ -802 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_8_0_3 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -804 { return _M_h.cbegin(__n); } │ │ │ │ -805 ///@} │ │ │ │ -806 │ │ │ │ -807 ///@{ │ │ │ │ -808 /** │ │ │ │ -809 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ -810 * the last bucket elements. │ │ │ │ -811 * @param __n The bucket index. │ │ │ │ -812 * @return A read-only local iterator. │ │ │ │ -813 */ │ │ │ │ -814 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_8_1_5 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ -816 { return _M_h.end(__n); } │ │ │ │ -817 │ │ │ │ -818 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_8_1_9 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -820 { return _M_h.end(__n); } │ │ │ │ -821 │ │ │ │ -822 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_8_2_3 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -824 { return _M_h.cend(__n); } │ │ │ │ -825 ///@} │ │ │ │ +683 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ +684 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ +685 * pair should be inserted. │ │ │ │ +686 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ +687 * the unordered_map. │ │ │ │ +688 * @param __obj Argument used to generate the .second for a pair │ │ │ │ +689 * instance. │ │ │ │ +690 * @return An iterator that points to the element with key of │ │ │ │ +691 * @a __x (may or may not be the %pair passed in). │ │ │ │ +692 * │ │ │ │ +693 * This function is not concerned about whether the insertion took place, │ │ │ │ +694 * and thus does not return a boolean like the single-argument insert() │ │ │ │ +695 * does. │ │ │ │ +696 * If the %pair was already in the %unordered map, the .second of │ │ │ │ +697 * the %pair is assigned from __obj. │ │ │ │ +698 * Note that the first parameter is only a hint and can │ │ │ │ +699 * potentially improve the performance of the insertion process. A bad │ │ │ │ +700 * hint would cause no gains in efficiency. │ │ │ │ +701 * │ │ │ │ +702 * See │ │ │ │ +703 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +704 * for more on @a hinting. │ │ │ │ +705 * │ │ │ │ +706 * Insertion requires amortized constant time. │ │ │ │ +707 */ │ │ │ │ +708 template │ │ │ │ +709 _i_t_e_r_a_t_o_r │ │ │ │ +_7_1_0 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _k_e_y___t_y_p_e& _____k, │ │ │ │ +711 _Obj&& _____o_b_j) │ │ │ │ +712 { │ │ │ │ +713 auto _____r_e_t = _M_h.try_emplace(_____h_i_n_t, _____k, _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ +714 if (!_____r_e_t.second) │ │ │ │ +715 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ +716 return _____r_e_t.first; │ │ │ │ +717 } │ │ │ │ +718 │ │ │ │ +719 // move-capable overload │ │ │ │ +720 template │ │ │ │ +721 _i_t_e_r_a_t_o_r │ │ │ │ +722 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _k_e_y___t_y_p_e&& _____k, _Obj&& _____o_b_j) │ │ │ │ +723 { │ │ │ │ +724 auto _____r_e_t = _M_h.try_emplace(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ +725 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ +726 if (!_____r_e_t.second) │ │ │ │ +727 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ +728 return _____r_e_t.first; │ │ │ │ +729 } │ │ │ │ +730#endif │ │ │ │ +731 │ │ │ │ +732 ///@{ │ │ │ │ +733 /** │ │ │ │ +734 * @brief Erases an element from an %unordered_map. │ │ │ │ +735 * @param __position An iterator pointing to the element to be erased. │ │ │ │ +736 * @return An iterator pointing to the element immediately following │ │ │ │ +737 * @a __position prior to the element being erased. If no such │ │ │ │ +738 * element exists, end() is returned. │ │ │ │ +739 * │ │ │ │ +740 * This function erases an element, pointed to by the given iterator, │ │ │ │ +741 * from an %unordered_map. │ │ │ │ +742 * Note that this function only erases the element, and that if the │ │ │ │ +743 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +744 * any way. Managing the pointer is the user's responsibility. │ │ │ │ +745 */ │ │ │ │ +746 _i_t_e_r_a_t_o_r │ │ │ │ +_7_4_7 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ +748 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ +749 │ │ │ │ +750 // LWG 2059. │ │ │ │ +751 _i_t_e_r_a_t_o_r │ │ │ │ +_7_5_2 _e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ +753 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ +754 ///@} │ │ │ │ +755 │ │ │ │ +756 /** │ │ │ │ +757 * @brief Erases elements according to the provided key. │ │ │ │ +758 * @param __x Key of element to be erased. │ │ │ │ +759 * @return The number of elements erased. │ │ │ │ +760 * │ │ │ │ +761 * This function erases all the elements located by the given key from │ │ │ │ +762 * an %unordered_map. For an %unordered_map the result of this function │ │ │ │ +763 * can only be 0 (not present) or 1 (present). │ │ │ │ +764 * Note that this function only erases the element, and that if the │ │ │ │ +765 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +766 * any way. Managing the pointer is the user's responsibility. │ │ │ │ +767 */ │ │ │ │ +768 _s_i_z_e___t_y_p_e │ │ │ │ +_7_6_9 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ +770 { return _M_h.erase(__x); } │ │ │ │ +771 │ │ │ │ +772 /** │ │ │ │ +773 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ +774 * %unordered_map. │ │ │ │ +775 * @param __first Iterator pointing to the start of the range to be │ │ │ │ +776 * erased. │ │ │ │ +777 * @param __last Iterator pointing to the end of the range to │ │ │ │ +778 * be erased. │ │ │ │ +779 * @return The iterator @a __last. │ │ │ │ +780 * │ │ │ │ +781 * This function erases a sequence of elements from an %unordered_map. │ │ │ │ +782 * Note that this function only erases the elements, and that if │ │ │ │ +783 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ +784 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ +785 */ │ │ │ │ +786 _i_t_e_r_a_t_o_r │ │ │ │ +_7_8_7 _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) │ │ │ │ +788 { return _M_h.erase(__first, __last); } │ │ │ │ +789 │ │ │ │ +790 /** │ │ │ │ +791 * Erases all elements in an %unordered_map. │ │ │ │ +792 * Note that this function only erases the elements, and that if the │ │ │ │ +793 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ +794 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ +795 */ │ │ │ │ +796 void │ │ │ │ +_7_9_7 _c_l_e_a_r() noexcept │ │ │ │ +798 { _M_h.clear(); } │ │ │ │ +799 │ │ │ │ +800 /** │ │ │ │ +801 * @brief Swaps data with another %unordered_map. │ │ │ │ +802 * @param __x An %unordered_map of the same element and allocator │ │ │ │ +803 * types. │ │ │ │ +804 * │ │ │ │ +805 * This exchanges the elements between two %unordered_map in constant │ │ │ │ +806 * time. │ │ │ │ +807 * Note that the global std::swap() function is specialized such that │ │ │ │ +808 * std::swap(m1,m2) will feed to this function. │ │ │ │ +809 */ │ │ │ │ +810 void │ │ │ │ +_8_1_1 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_a_p& __x) │ │ │ │ +812 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ +813 { _M_h.swap(__x._M_h); } │ │ │ │ +814 │ │ │ │ +815#if __cplusplus > 201402L │ │ │ │ +816 template │ │ │ │ +817 friend class std::_Hash_merge_helper; │ │ │ │ +818 │ │ │ │ +819 template │ │ │ │ +820 void │ │ │ │ +821 merge(_u_n_o_r_d_e_r_e_d___m_a_p_<___K_e_y_,_ ___T_p_,_ ___H_2_,_ ___P_2_,_ ___A_l_l_o_c_>& _____s_o_u_r_c_e) │ │ │ │ +822 { │ │ │ │ +823 using ___M_e_r_g_e___h_e_l_p_e_r = ___H_a_s_h___m_e_r_g_e___h_e_l_p_e_r_<_u_n_o_r_d_e_r_e_d___m_a_p_,_ ___H_2_,_ ___P_2_>; │ │ │ │ +824 _M_h._M_merge_unique(_Merge_helper::_S_get_table(_____s_o_u_r_c_e)); │ │ │ │ +825 } │ │ │ │ 826 │ │ │ │ -827 // hash policy. │ │ │ │ -828 │ │ │ │ -829 /// Returns the average number of elements per bucket. │ │ │ │ -830 float │ │ │ │ -_8_3_1 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -832 { return _M_h.load_factor(); } │ │ │ │ -833 │ │ │ │ -834 /// Returns a positive number that the %unordered_set tries to keep the │ │ │ │ -835 /// load factor less than or equal to. │ │ │ │ -836 float │ │ │ │ -_8_3_7 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -838 { return _M_h.max_load_factor(); } │ │ │ │ +827 template │ │ │ │ +828 void │ │ │ │ +829 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ +830 { merge(__source); } │ │ │ │ +831 │ │ │ │ +832 template │ │ │ │ +833 void │ │ │ │ +834 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) │ │ │ │ +835 { │ │ │ │ +836 using _Merge_helper = _Hash_merge_helper; │ │ │ │ +837 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); │ │ │ │ +838 } │ │ │ │ 839 │ │ │ │ -840 /** │ │ │ │ -841 * @brief Change the %unordered_set maximum load factor. │ │ │ │ -842 * @param __z The new maximum load factor. │ │ │ │ -843 */ │ │ │ │ -844 void │ │ │ │ -_8_4_5 _m_a_x___l_o_a_d___f_a_c_t_o_r(float _____z) │ │ │ │ -846 { _M_h.max_load_factor(_____z); } │ │ │ │ +840 template │ │ │ │ +841 void │ │ │ │ +842 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ +843 { merge(__source); } │ │ │ │ +844#endif // C++17 │ │ │ │ +845 │ │ │ │ +846 // observers. │ │ │ │ 847 │ │ │ │ -848 /** │ │ │ │ -849 * @brief May rehash the %unordered_set. │ │ │ │ -850 * @param __n The new number of buckets. │ │ │ │ -851 * │ │ │ │ -852 * Rehash will occur only if the new number of buckets respect the │ │ │ │ -853 * %unordered_set maximum load factor. │ │ │ │ -854 */ │ │ │ │ -855 void │ │ │ │ -_8_5_6 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ -857 { _M_h.rehash(__n); } │ │ │ │ -858 │ │ │ │ -859 /** │ │ │ │ -860 * @brief Prepare the %unordered_set for a specified number of │ │ │ │ -861 * elements. │ │ │ │ -862 * @param __n Number of elements required. │ │ │ │ -863 * │ │ │ │ -864 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ -865 */ │ │ │ │ -866 void │ │ │ │ -_8_6_7 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ -868 { _M_h.reserve(__n); } │ │ │ │ -869 │ │ │ │ -870 template │ │ │ │ -872 friend bool │ │ │ │ -873 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_>&, │ │ │ │ -874 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_>&); │ │ │ │ -875 }; │ │ │ │ -876 │ │ │ │ -877#if __cpp_deduction_guides >= 201606 │ │ │ │ -878 │ │ │ │ -879 template::value_type>, │ │ │ │ -882 typename _Pred = │ │ │ │ -883 equal_to::value_type>, │ │ │ │ -884 typename _Allocator = │ │ │ │ -885 allocator::value_type>, │ │ │ │ -886 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -887 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -888 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -889 typename = _RequireAllocator<_Allocator>> │ │ │ │ -890 unordered_set(_InputIterator, _InputIterator, │ │ │ │ -891 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ -892 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ -893 -> unordered_set::value_type, │ │ │ │ -894 _Hash, _Pred, _Allocator>; │ │ │ │ -895 │ │ │ │ -896 template, │ │ │ │ -897 typename _Pred = equal_to<_Tp>, │ │ │ │ -898 typename _Allocator = allocator<_Tp>, │ │ │ │ -899 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -900 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -901 typename = _RequireAllocator<_Allocator>> │ │ │ │ -902 unordered_set(initializer_list<_Tp>, │ │ │ │ -903 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e = {}, │ │ │ │ -904 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ -905 -> unordered_set<_Tp, _Hash, _Pred, _Allocator>; │ │ │ │ -906 │ │ │ │ -907 template, │ │ │ │ -909 typename = _RequireAllocator<_Allocator>> │ │ │ │ -910 unordered_set(_InputIterator, _InputIterator, │ │ │ │ -911 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Allocator) │ │ │ │ -912 -> unordered_set::value_type, │ │ │ │ -913 hash< │ │ │ │ -914 typename iterator_traits<_InputIterator>::value_type>, │ │ │ │ -915 equal_to< │ │ │ │ -916 typename iterator_traits<_InputIterator>::value_type>, │ │ │ │ -917 _Allocator>; │ │ │ │ +848 /// Returns the hash functor object with which the %unordered_map was │ │ │ │ +849 /// constructed. │ │ │ │ +850 _h_a_s_h_e_r │ │ │ │ +_8_5_1 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ +852 { return _M_h.hash_function(); } │ │ │ │ +853 │ │ │ │ +854 /// Returns the key comparison object with which the %unordered_map was │ │ │ │ +855 /// constructed. │ │ │ │ +856 _k_e_y___e_q_u_a_l │ │ │ │ +_8_5_7 _k_e_y___e_q() const │ │ │ │ +858 { return _M_h.key_eq(); } │ │ │ │ +859 │ │ │ │ +860 // lookup. │ │ │ │ +861 │ │ │ │ +862 ///@{ │ │ │ │ +863 /** │ │ │ │ +864 * @brief Tries to locate an element in an %unordered_map. │ │ │ │ +865 * @param __x Key to be located. │ │ │ │ +866 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ +867 * found. │ │ │ │ +868 * │ │ │ │ +869 * This function takes a key and tries to locate the element with which │ │ │ │ +870 * the key matches. If successful the function returns an iterator │ │ │ │ +871 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ +872 * past-the-end ( @c end() ) iterator. │ │ │ │ +873 */ │ │ │ │ +874 _i_t_e_r_a_t_o_r │ │ │ │ +_8_7_5 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ +876 { return _M_h.find(__x); } │ │ │ │ +877 │ │ │ │ +878#if __cplusplus > 201703L │ │ │ │ +879 template │ │ │ │ +880 auto │ │ │ │ +_8_8_1 _f_i_n_d(const ___K_t& __x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +882 { return _M_h._M_find_tr(__x); } │ │ │ │ +883#endif │ │ │ │ +884 │ │ │ │ +885 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_8_8_6 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +887 { return _M_h.find(__x); } │ │ │ │ +888 │ │ │ │ +889#if __cplusplus > 201703L │ │ │ │ +890 template │ │ │ │ +891 auto │ │ │ │ +_8_9_2 _f_i_n_d(const ___K_t& __x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +893 { return _M_h._M_find_tr(__x); } │ │ │ │ +894#endif │ │ │ │ +895 ///@} │ │ │ │ +896 │ │ │ │ +897 ///@{ │ │ │ │ +898 /** │ │ │ │ +899 * @brief Finds the number of elements. │ │ │ │ +900 * @param __x Key to count. │ │ │ │ +901 * @return Number of elements with specified key. │ │ │ │ +902 * │ │ │ │ +903 * This function only makes sense for %unordered_multimap; for │ │ │ │ +904 * %unordered_map the result will either be 0 (not present) or 1 │ │ │ │ +905 * (present). │ │ │ │ +906 */ │ │ │ │ +907 _s_i_z_e___t_y_p_e │ │ │ │ +_9_0_8 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +909 { return _M_h.count(__x); } │ │ │ │ +910 │ │ │ │ +911#if __cplusplus > 201703L │ │ │ │ +912 template │ │ │ │ +913 auto │ │ │ │ +_9_1_4 _c_o_u_n_t(const ___K_t& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ +915 { return _M_h._M_count_tr(__x); } │ │ │ │ +916#endif │ │ │ │ +917 ///@} │ │ │ │ 918 │ │ │ │ -919 template, │ │ │ │ -921 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -922 typename = _RequireAllocator<_Allocator>> │ │ │ │ -923 unordered_set(_InputIterator, _InputIterator, │ │ │ │ -924 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e, │ │ │ │ -925 _Hash, _Allocator) │ │ │ │ -926 -> unordered_set::value_type, │ │ │ │ -927 _Hash, │ │ │ │ -928 equal_to< │ │ │ │ -929 typename iterator_traits<_InputIterator>::value_type>, │ │ │ │ -930 _Allocator>; │ │ │ │ -931 │ │ │ │ -932 template> │ │ │ │ -934 unordered_set(initializer_list<_Tp>, │ │ │ │ -935 _u_n_o_r_d_e_r_e_d___s_e_t_<_i_n_t_>_:_:_s_i_z_e___t_y_p_e, _Allocator) │ │ │ │ -936 -> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>; │ │ │ │ +919#if __cplusplus > 201703L │ │ │ │ +920 ///@{ │ │ │ │ +921 /** │ │ │ │ +922 * @brief Finds whether an element with the given key exists. │ │ │ │ +923 * @param __x Key of elements to be located. │ │ │ │ +924 * @return True if there is any element with the specified key. │ │ │ │ +925 */ │ │ │ │ +926 bool │ │ │ │ +_9_2_7 _c_o_n_t_a_i_n_s(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +928 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ +929 │ │ │ │ +930 template │ │ │ │ +931 auto │ │ │ │ +_9_3_2 _c_o_n_t_a_i_n_s(const ___K_t& __x) const │ │ │ │ +933 -> decltype(_M_h._M_find_tr(__x), _v_o_i_d(), true) │ │ │ │ +934 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ +935 ///@} │ │ │ │ +936#endif │ │ │ │ 937 │ │ │ │ -938 template, │ │ │ │ -940 typename = _RequireAllocator<_Allocator>> │ │ │ │ -941 unordered_set(initializer_list<_Tp>, │ │ │ │ -942 _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) │ │ │ │ -943 -> unordered_set<_Tp, _Hash, equal_to<_Tp>, _Allocator>; │ │ │ │ -944 │ │ │ │ -945#endif │ │ │ │ -946 │ │ │ │ -947 /** │ │ │ │ -948 * @brief A standard container composed of equivalent keys │ │ │ │ -949 * (possibly containing multiple of each key value) in which the │ │ │ │ -950 * elements' keys are the elements themselves. │ │ │ │ -951 * │ │ │ │ -952 * @ingroup unordered_associative_containers │ │ │ │ -953 * @headerfile unordered_set │ │ │ │ -954 * @since C++11 │ │ │ │ -955 * │ │ │ │ -956 * @tparam _Value Type of key objects. │ │ │ │ -957 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ -958 * @tparam _Pred Predicate function object type, defaults │ │ │ │ -959 * to equal_to<_Value>. │ │ │ │ -960 * @tparam _Alloc Allocator type, defaults to allocator<_Key>. │ │ │ │ -961 * │ │ │ │ -962 * Meets the requirements of a container, and │ │ │ │ -963 * unordered associative container │ │ │ │ -964 * │ │ │ │ -965 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ -966 * alias __umset_hashtable. │ │ │ │ -967 */ │ │ │ │ -968 template, │ │ │ │ -970 typename _Pred = equal_to<_Value>, │ │ │ │ -971 typename _Alloc = allocator<_Value>> │ │ │ │ -_9_7_2 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -973 { │ │ │ │ -974 typedef _____u_m_s_e_t___h_a_s_h_t_a_b_l_e_<___V_a_l_u_e_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_> ___H_a_s_h_t_a_b_l_e; │ │ │ │ -975 ___H_a_s_h_t_a_b_l_e _M_h; │ │ │ │ -976 │ │ │ │ -977 public: │ │ │ │ -978 // typedefs: │ │ │ │ -979 ///@{ │ │ │ │ -980 /// Public typedefs. │ │ │ │ -_9_8_1 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ -_9_8_2 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ -_9_8_3 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ -_9_8_4 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ -_9_8_5 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ -986 ///@} │ │ │ │ -987 │ │ │ │ -988 ///@{ │ │ │ │ -989 /// Iterator-related typedefs. │ │ │ │ -_9_9_0 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ -_9_9_1 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ -_9_9_2 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ -_9_9_3 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ -_9_9_4 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ -_9_9_5 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ -_9_9_6 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_9_9_7 typedef typename _Hashtable::const_local_iterator _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_9_9_8 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ -_9_9_9 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ -1000 ///@} │ │ │ │ -1001 │ │ │ │ -1002#if __cplusplus > 201402L │ │ │ │ -1003 using node_type = typename _Hashtable::node_type; │ │ │ │ -1004#endif │ │ │ │ +938 ///@{ │ │ │ │ +939 /** │ │ │ │ +940 * @brief Finds a subsequence matching given key. │ │ │ │ +941 * @param __x Key to be located. │ │ │ │ +942 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ +943 * matching given key. │ │ │ │ +944 * │ │ │ │ +945 * This function probably only makes sense for %unordered_multimap. │ │ │ │ +946 */ │ │ │ │ +947 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_> │ │ │ │ +_9_4_8 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ +949 { return _M_h.equal_range(__x); } │ │ │ │ +950 │ │ │ │ +951#if __cplusplus > 201703L │ │ │ │ +952 template │ │ │ │ +953 auto │ │ │ │ +_9_5_4 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) │ │ │ │ +955 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +956 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ +957#endif │ │ │ │ +958 │ │ │ │ +959 _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_6_0 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +961 { return _M_h.equal_range(__x); } │ │ │ │ +962 │ │ │ │ +963#if __cplusplus > 201703L │ │ │ │ +964 template │ │ │ │ +965 auto │ │ │ │ +_9_6_6 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) const │ │ │ │ +967 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +968 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ +969#endif │ │ │ │ +970 ///@} │ │ │ │ +971 │ │ │ │ +972 ///@{ │ │ │ │ +973 /** │ │ │ │ +974 * @brief Subscript ( @c [] ) access to %unordered_map data. │ │ │ │ +975 * @param __k The key for which data should be retrieved. │ │ │ │ +976 * @return A reference to the data of the (key,data) %pair. │ │ │ │ +977 * │ │ │ │ +978 * Allows for easy lookup with the subscript ( @c [] )operator. Returns │ │ │ │ +979 * data associated with the key specified in subscript. If the key does │ │ │ │ +980 * not exist, a pair with that key is created using default values, which │ │ │ │ +981 * is then returned. │ │ │ │ +982 * │ │ │ │ +983 * Lookup requires constant time. │ │ │ │ +984 */ │ │ │ │ +985 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ +_9_8_6 _o_p_e_r_a_t_o_r_[_](const _k_e_y___t_y_p_e& _____k) │ │ │ │ +987 { return _M_h[_____k]; } │ │ │ │ +988 │ │ │ │ +989 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ +_9_9_0 _o_p_e_r_a_t_o_r_[_](_k_e_y___t_y_p_e&& _____k) │ │ │ │ +991 { return _M_h[_s_t_d_:_:_m_o_v_e(_____k)]; } │ │ │ │ +992 ///@} │ │ │ │ +993 │ │ │ │ +994 ///@{ │ │ │ │ +995 /** │ │ │ │ +996 * @brief Access to %unordered_map data. │ │ │ │ +997 * @param __k The key for which data should be retrieved. │ │ │ │ +998 * @return A reference to the data whose key is equal to @a __k, if │ │ │ │ +999 * such a data is present in the %unordered_map. │ │ │ │ +1000 * @throw std::out_of_range If no such data is present. │ │ │ │ +1001 */ │ │ │ │ +1002 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ +_1_0_0_3 _a_t(const _k_e_y___t_y_p_e& _____k) │ │ │ │ +1004 { return _M_h.at(_____k); } │ │ │ │ 1005 │ │ │ │ -1006 // construct/destroy/copy │ │ │ │ -1007 │ │ │ │ -1008 /// Default constructor. │ │ │ │ -_1_0_0_9 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t() = default; │ │ │ │ +1006 const _m_a_p_p_e_d___t_y_p_e& │ │ │ │ +_1_0_0_7 _a_t(const _k_e_y___t_y_p_e& _____k) const │ │ │ │ +1008 { return _M_h.at(_____k); } │ │ │ │ +1009 ///@} │ │ │ │ 1010 │ │ │ │ -1011 /** │ │ │ │ -1012 * @brief Default constructor creates no elements. │ │ │ │ -1013 * @param __n Minimal initial number of buckets. │ │ │ │ -1014 * @param __hf A hash functor. │ │ │ │ -1015 * @param __eql A key equality functor. │ │ │ │ -1016 * @param __a An allocator object. │ │ │ │ -1017 */ │ │ │ │ -1018 explicit │ │ │ │ -_1_0_1_9 _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, │ │ │ │ -1020 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -1021 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -1022 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()) │ │ │ │ -1023 : _M_h(__n, _____h_f, _____e_q_l, __a) │ │ │ │ -1024 { } │ │ │ │ -1025 │ │ │ │ -1026 /** │ │ │ │ -1027 * @brief Builds an %unordered_multiset from a range. │ │ │ │ -1028 * @param __first An input iterator. │ │ │ │ -1029 * @param __last An input iterator. │ │ │ │ -1030 * @param __n Minimal initial number of buckets. │ │ │ │ -1031 * @param __hf A hash functor. │ │ │ │ -1032 * @param __eql A key equality functor. │ │ │ │ -1033 * @param __a An allocator object. │ │ │ │ -1034 * │ │ │ │ -1035 * Create an %unordered_multiset consisting of copies of the elements │ │ │ │ -1036 * from [__first,__last). This is linear in N (where N is │ │ │ │ -1037 * distance(__first,__last)). │ │ │ │ -1038 */ │ │ │ │ -1039 template │ │ │ │ -_1_0_4_0 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ -1041 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -1042 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -1043 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -1044 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()) │ │ │ │ -1045 : _M_h(__first, __last, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -1046 { } │ │ │ │ -1047 │ │ │ │ -1048 /// Copy constructor. │ │ │ │ -_1_0_4_9 _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; │ │ │ │ +1011 // bucket interface. │ │ │ │ +1012 │ │ │ │ +1013 /// Returns the number of buckets of the %unordered_map. │ │ │ │ +1014 _s_i_z_e___t_y_p_e │ │ │ │ +_1_0_1_5 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ +1016 { return _M_h.bucket_count(); } │ │ │ │ +1017 │ │ │ │ +1018 /// Returns the maximum number of buckets of the %unordered_map. │ │ │ │ +1019 _s_i_z_e___t_y_p_e │ │ │ │ +_1_0_2_0 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ +1021 { return _M_h.max_bucket_count(); } │ │ │ │ +1022 │ │ │ │ +1023 /* │ │ │ │ +1024 * @brief Returns the number of elements in a given bucket. │ │ │ │ +1025 * @param __n A bucket index. │ │ │ │ +1026 * @return The number of elements in the bucket. │ │ │ │ +1027 */ │ │ │ │ +1028 _s_i_z_e___t_y_p_e │ │ │ │ +1029 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1030 { return _M_h.bucket_size(__n); } │ │ │ │ +1031 │ │ │ │ +1032 /* │ │ │ │ +1033 * @brief Returns the bucket index of a given element. │ │ │ │ +1034 * @param __key A key instance. │ │ │ │ +1035 * @return The key bucket index. │ │ │ │ +1036 */ │ │ │ │ +1037 _s_i_z_e___t_y_p_e │ │ │ │ +1038 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ +1039 { return _M_h.bucket(__key); } │ │ │ │ +1040 │ │ │ │ +1041 /** │ │ │ │ +1042 * @brief Returns a read/write iterator pointing to the first bucket │ │ │ │ +1043 * element. │ │ │ │ +1044 * @param __n The bucket index. │ │ │ │ +1045 * @return A read/write local iterator. │ │ │ │ +1046 */ │ │ │ │ +1047 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_4_8 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1049 { return _M_h.begin(__n); } │ │ │ │ 1050 │ │ │ │ -1051 /// Move constructor. │ │ │ │ -_1_0_5_2 _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; │ │ │ │ -1053 │ │ │ │ -1054 /** │ │ │ │ -1055 * @brief Builds an %unordered_multiset from an initializer_list. │ │ │ │ -1056 * @param __l An initializer_list. │ │ │ │ -1057 * @param __n Minimal initial number of buckets. │ │ │ │ -1058 * @param __hf A hash functor. │ │ │ │ -1059 * @param __eql A key equality functor. │ │ │ │ -1060 * @param __a An allocator object. │ │ │ │ -1061 * │ │ │ │ -1062 * Create an %unordered_multiset consisting of copies of the elements in │ │ │ │ -1063 * the list. This is linear in N (where N is @a __l.size()). │ │ │ │ -1064 */ │ │ │ │ -_1_0_6_5 _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, │ │ │ │ -1066 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -1067 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -1068 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -1069 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()) │ │ │ │ -1070 : _M_h(_____l, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -1071 { } │ │ │ │ -1072 │ │ │ │ -1073 /// Copy assignment operator. │ │ │ │ -1074 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t& │ │ │ │ -_1_0_7_5 _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; │ │ │ │ +1051 ///@{ │ │ │ │ +1052 /** │ │ │ │ +1053 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ +1054 * bucket element. │ │ │ │ +1055 * @param __n The bucket index. │ │ │ │ +1056 * @return A read-only local iterator. │ │ │ │ +1057 */ │ │ │ │ +1058 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_5_9 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1060 { return _M_h.begin(__n); } │ │ │ │ +1061 │ │ │ │ +1062 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_6_3 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1064 { return _M_h.cbegin(__n); } │ │ │ │ +1065 ///@} │ │ │ │ +1066 │ │ │ │ +1067 /** │ │ │ │ +1068 * @brief Returns a read/write iterator pointing to one past the last │ │ │ │ +1069 * bucket elements. │ │ │ │ +1070 * @param __n The bucket index. │ │ │ │ +1071 * @return A read/write local iterator. │ │ │ │ +1072 */ │ │ │ │ +1073 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_7_4 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1075 { return _M_h.end(__n); } │ │ │ │ 1076 │ │ │ │ -1077 /// Move assignment operator. │ │ │ │ -1078 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t& │ │ │ │ -_1_0_7_9 _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; │ │ │ │ -1080 │ │ │ │ -1081 /** │ │ │ │ -1082 * @brief Creates an %unordered_multiset with no elements. │ │ │ │ -1083 * @param __a An allocator object. │ │ │ │ -1084 */ │ │ │ │ -1085 explicit │ │ │ │ -_1_0_8_6 _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) │ │ │ │ -1087 : _M_h(__a) │ │ │ │ -1088 { } │ │ │ │ -1089 │ │ │ │ -1090 /* │ │ │ │ -1091 * @brief Copy constructor with allocator argument. │ │ │ │ -1092 * @param __uset Input %unordered_multiset to copy. │ │ │ │ -1093 * @param __a An allocator object. │ │ │ │ -1094 */ │ │ │ │ -1095 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t& _____u_m_s_e_t, │ │ │ │ -1096 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1097 : _M_h(_____u_m_s_e_t._M_h, __a) │ │ │ │ -1098 { } │ │ │ │ +1077 ///@{ │ │ │ │ +1078 /** │ │ │ │ +1079 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ +1080 * the last bucket elements. │ │ │ │ +1081 * @param __n The bucket index. │ │ │ │ +1082 * @return A read-only local iterator. │ │ │ │ +1083 */ │ │ │ │ +1084 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_8_5 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1086 { return _M_h.end(__n); } │ │ │ │ +1087 │ │ │ │ +1088 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_0_8_9 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1090 { return _M_h.cend(__n); } │ │ │ │ +1091 ///@} │ │ │ │ +1092 │ │ │ │ +1093 // hash policy. │ │ │ │ +1094 │ │ │ │ +1095 /// Returns the average number of elements per bucket. │ │ │ │ +1096 float │ │ │ │ +_1_0_9_7 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ +1098 { return _M_h.load_factor(); } │ │ │ │ 1099 │ │ │ │ -1100 /* │ │ │ │ -1101 * @brief Move constructor with allocator argument. │ │ │ │ -1102 * @param __umset Input %unordered_multiset to move. │ │ │ │ -1103 * @param __a An allocator object. │ │ │ │ -1104 */ │ │ │ │ -1105 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t&& __umset, │ │ │ │ -1106 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1107 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__umset._M_h), __a)) ) │ │ │ │ -1108 : _M_h(_s_t_d_:_:_m_o_v_e(__umset._M_h), __a) │ │ │ │ -1109 { } │ │ │ │ -1110 │ │ │ │ -1111 _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) │ │ │ │ -1112 : _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) │ │ │ │ -1113 { } │ │ │ │ -1114 │ │ │ │ -1115 _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, │ │ │ │ -1116 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1117 : _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) │ │ │ │ -1118 { } │ │ │ │ -1119 │ │ │ │ -1120 template │ │ │ │ -1121 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_InputIterator __first, _InputIterator __last, │ │ │ │ -1122 _s_i_z_e___t_y_p_e __n, │ │ │ │ -1123 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1124 : _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) │ │ │ │ -1125 { } │ │ │ │ -1126 │ │ │ │ -1127 template │ │ │ │ -1128 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(_InputIterator __first, _InputIterator __last, │ │ │ │ -1129 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1130 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1131 : _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) │ │ │ │ -1132 { } │ │ │ │ -1133 │ │ │ │ -1134 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(initializer_list __l, │ │ │ │ -1135 _s_i_z_e___t_y_p_e __n, │ │ │ │ -1136 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1137 : _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) │ │ │ │ -1138 { } │ │ │ │ -1139 │ │ │ │ -1140 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t(initializer_list __l, │ │ │ │ -1141 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1142 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1143 : _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) │ │ │ │ -1144 { } │ │ │ │ -1145 │ │ │ │ -1146 /** │ │ │ │ -1147 * @brief %Unordered_multiset list assignment operator. │ │ │ │ -1148 * @param __l An initializer_list. │ │ │ │ -1149 * │ │ │ │ -1150 * This function fills an %unordered_multiset with copies of the elements │ │ │ │ -1151 * in the initializer list @a __l. │ │ │ │ -1152 * │ │ │ │ -1153 * Note that the assignment completely changes the %unordered_multiset │ │ │ │ -1154 * and that the resulting %unordered_multiset's size is the same as the │ │ │ │ -1155 * number of elements assigned. │ │ │ │ -1156 */ │ │ │ │ -1157 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t& │ │ │ │ -_1_1_5_8 _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) │ │ │ │ -1159 { │ │ │ │ -1160 _M_h = _____l; │ │ │ │ -1161 return *this; │ │ │ │ -1162 } │ │ │ │ -1163 │ │ │ │ -1164 /// Returns the allocator object used by the %unordered_multiset. │ │ │ │ -1165 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_1_1_6_6 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ -1167 { return _M_h.get_allocator(); } │ │ │ │ -1168 │ │ │ │ -1169 // size and capacity: │ │ │ │ +1100 /// Returns a positive number that the %unordered_map tries to keep the │ │ │ │ +1101 /// load factor less than or equal to. │ │ │ │ +1102 float │ │ │ │ +_1_1_0_3 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ +1104 { return _M_h.max_load_factor(); } │ │ │ │ +1105 │ │ │ │ +1106 /** │ │ │ │ +1107 * @brief Change the %unordered_map maximum load factor. │ │ │ │ +1108 * @param __z The new maximum load factor. │ │ │ │ +1109 */ │ │ │ │ +1110 void │ │ │ │ +_1_1_1_1 _m_a_x___l_o_a_d___f_a_c_t_o_r(float _____z) │ │ │ │ +1112 { _M_h.max_load_factor(_____z); } │ │ │ │ +1113 │ │ │ │ +1114 /** │ │ │ │ +1115 * @brief May rehash the %unordered_map. │ │ │ │ +1116 * @param __n The new number of buckets. │ │ │ │ +1117 * │ │ │ │ +1118 * Rehash will occur only if the new number of buckets respect the │ │ │ │ +1119 * %unordered_map maximum load factor. │ │ │ │ +1120 */ │ │ │ │ +1121 void │ │ │ │ +_1_1_2_2 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1123 { _M_h.rehash(__n); } │ │ │ │ +1124 │ │ │ │ +1125 /** │ │ │ │ +1126 * @brief Prepare the %unordered_map for a specified number of │ │ │ │ +1127 * elements. │ │ │ │ +1128 * @param __n Number of elements required. │ │ │ │ +1129 * │ │ │ │ +1130 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ +1131 */ │ │ │ │ +1132 void │ │ │ │ +_1_1_3_3 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1134 { _M_h.reserve(__n); } │ │ │ │ +1135 │ │ │ │ +1136 template │ │ │ │ +1138 friend bool │ │ │ │ +1139 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_>&, │ │ │ │ +1140 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_>&); │ │ │ │ +1141 }; │ │ │ │ +1142 │ │ │ │ +1143#if __cpp_deduction_guides >= 201606 │ │ │ │ +1144 │ │ │ │ +1145 template>, │ │ │ │ +1147 typename _Pred = equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ +1148 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, │ │ │ │ +1149 typename = _RequireInputIter<_InputIterator>, │ │ │ │ +1150 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +1151 typename = _RequireNotAllocator<_Pred>, │ │ │ │ +1152 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1153 unordered_map(_InputIterator, _InputIterator, │ │ │ │ +1154 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 = {}, │ │ │ │ +1155 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ +1156 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ +1157 __iter_val_t<_InputIterator>, │ │ │ │ +1158 _Hash, _Pred, _Allocator>; │ │ │ │ +1159 │ │ │ │ +1160 template, │ │ │ │ +1161 typename _Pred = equal_to<_Key>, │ │ │ │ +1162 typename _Allocator = allocator>, │ │ │ │ +1163 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +1164 typename = _RequireNotAllocator<_Pred>, │ │ │ │ +1165 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1166 unordered_map(initializer_list>, │ │ │ │ +1167 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 = {}, │ │ │ │ +1168 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ +1169 -> unordered_map<_Key, _Tp, _Hash, _Pred, _Allocator>; │ │ │ │ 1170 │ │ │ │ -1171 /// Returns true if the %unordered_multiset is empty. │ │ │ │ -1172 _GLIBCXX_NODISCARD bool │ │ │ │ -_1_1_7_3 _e_m_p_t_y() const noexcept │ │ │ │ -1174 { return _M_h.empty(); } │ │ │ │ -1175 │ │ │ │ -1176 /// Returns the size of the %unordered_multiset. │ │ │ │ -1177 _s_i_z_e___t_y_p_e │ │ │ │ -_1_1_7_8 _s_i_z_e() const noexcept │ │ │ │ -1179 { return _M_h.size(); } │ │ │ │ -1180 │ │ │ │ -1181 /// Returns the maximum size of the %unordered_multiset. │ │ │ │ -1182 _s_i_z_e___t_y_p_e │ │ │ │ -_1_1_8_3 _m_a_x___s_i_z_e() const noexcept │ │ │ │ -1184 { return _M_h.max_size(); } │ │ │ │ -1185 │ │ │ │ -1186 // iterators. │ │ │ │ -1187 │ │ │ │ -1188 ///@{ │ │ │ │ -1189 /** │ │ │ │ -1190 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -1191 * element in the %unordered_multiset. │ │ │ │ -1192 */ │ │ │ │ -1193 _i_t_e_r_a_t_o_r │ │ │ │ -_1_1_9_4 _b_e_g_i_n() noexcept │ │ │ │ -1195 { return _M_h.begin(); } │ │ │ │ -1196 │ │ │ │ -1197 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_1_9_8 _b_e_g_i_n() const noexcept │ │ │ │ -1199 { return _M_h.begin(); } │ │ │ │ -1200 ///@} │ │ │ │ -1201 │ │ │ │ -1202 ///@{ │ │ │ │ -1203 /** │ │ │ │ -1204 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -1205 * element in the %unordered_multiset. │ │ │ │ -1206 */ │ │ │ │ -1207 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_0_8 _e_n_d() noexcept │ │ │ │ -1209 { return _M_h.end(); } │ │ │ │ -1210 │ │ │ │ -1211 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_2_1_2 _e_n_d() const noexcept │ │ │ │ -1213 { return _M_h.end(); } │ │ │ │ -1214 ///@} │ │ │ │ -1215 │ │ │ │ -1216 /** │ │ │ │ -1217 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -1218 * element in the %unordered_multiset. │ │ │ │ -1219 */ │ │ │ │ -1220 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_2_2_1 _c_b_e_g_i_n() const noexcept │ │ │ │ -1222 { return _M_h.begin(); } │ │ │ │ -1223 │ │ │ │ -1224 /** │ │ │ │ -1225 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -1226 * element in the %unordered_multiset. │ │ │ │ -1227 */ │ │ │ │ -1228 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_2_2_9 _c_e_n_d() const noexcept │ │ │ │ -1230 { return _M_h.end(); } │ │ │ │ -1231 │ │ │ │ -1232 // modifiers. │ │ │ │ -1233 │ │ │ │ -1234 /** │ │ │ │ -1235 * @brief Builds and insert an element into the %unordered_multiset. │ │ │ │ -1236 * @param __args Arguments used to generate an element. │ │ │ │ -1237 * @return An iterator that points to the inserted element. │ │ │ │ -1238 * │ │ │ │ -1239 * Insertion requires amortized constant time. │ │ │ │ -1240 */ │ │ │ │ -1241 template │ │ │ │ -1242 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_4_3 _e_m_p_l_a_c_e(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -1244 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -1245 │ │ │ │ -1246 /** │ │ │ │ -1247 * @brief Inserts an element into the %unordered_multiset. │ │ │ │ -1248 * @param __pos An iterator that serves as a hint as to where the │ │ │ │ -1249 * element should be inserted. │ │ │ │ -1250 * @param __args Arguments used to generate the element to be │ │ │ │ -1251 * inserted. │ │ │ │ -1252 * @return An iterator that points to the inserted element. │ │ │ │ -1253 * │ │ │ │ -1254 * Note that the first parameter is only a hint and can potentially │ │ │ │ -1255 * improve the performance of the insertion process. A bad hint would │ │ │ │ -1256 * cause no gains in efficiency. │ │ │ │ -1257 * │ │ │ │ -1258 * For more on @a hinting, see: │ │ │ │ -1259 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -1260 * │ │ │ │ -1261 * Insertion requires amortized constant time. │ │ │ │ -1262 */ │ │ │ │ -1263 template │ │ │ │ -1264 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_6_5 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -1266 { return _M_h.emplace_hint(_____p_o_s, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -1267 │ │ │ │ -1268 ///@{ │ │ │ │ -1269 /** │ │ │ │ -1270 * @brief Inserts an element into the %unordered_multiset. │ │ │ │ -1271 * @param __x Element to be inserted. │ │ │ │ -1272 * @return An iterator that points to the inserted element. │ │ │ │ -1273 * │ │ │ │ -1274 * Insertion requires amortized constant time. │ │ │ │ -1275 */ │ │ │ │ -1276 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_7_7 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -1278 { return _M_h.insert(__x); } │ │ │ │ -1279 │ │ │ │ -1280 _i_t_e_r_a_t_o_r │ │ │ │ -_1_2_8_1 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -1282 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +1171 template, │ │ │ │ +1173 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1174 unordered_map(_InputIterator, _InputIterator, │ │ │ │ +1175 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) │ │ │ │ +1176 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ +1177 __iter_val_t<_InputIterator>, │ │ │ │ +1178 hash<__iter_key_t<_InputIterator>>, │ │ │ │ +1179 equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ +1180 _Allocator>; │ │ │ │ +1181 │ │ │ │ +1182 template, │ │ │ │ +1184 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1185 unordered_map(_InputIterator, _InputIterator, _Allocator) │ │ │ │ +1186 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ +1187 __iter_val_t<_InputIterator>, │ │ │ │ +1188 hash<__iter_key_t<_InputIterator>>, │ │ │ │ +1189 equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ +1190 _Allocator>; │ │ │ │ +1191 │ │ │ │ +1192 template, │ │ │ │ +1194 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +1195 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1196 unordered_map(_InputIterator, _InputIterator, │ │ │ │ +1197 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, │ │ │ │ +1198 _Hash, _Allocator) │ │ │ │ +1199 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ +1200 __iter_val_t<_InputIterator>, _Hash, │ │ │ │ +1201 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ +1202 │ │ │ │ +1203 template> │ │ │ │ +1205 unordered_map(initializer_list>, │ │ │ │ +1206 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, │ │ │ │ +1207 _Allocator) │ │ │ │ +1208 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ +1209 │ │ │ │ +1210 template> │ │ │ │ +1212 unordered_map(initializer_list>, _Allocator) │ │ │ │ +1213 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ +1214 │ │ │ │ +1215 template, │ │ │ │ +1217 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1218 unordered_map(initializer_list>, │ │ │ │ +1219 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, │ │ │ │ +1220 _Hash, _Allocator) │ │ │ │ +1221 -> unordered_map<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>; │ │ │ │ +1222 │ │ │ │ +1223#endif │ │ │ │ +1224 │ │ │ │ +1225 /** │ │ │ │ +1226 * @brief A standard container composed of equivalent keys │ │ │ │ +1227 * (possibly containing multiple of each key value) that associates │ │ │ │ +1228 * values of another type with the keys. │ │ │ │ +1229 * │ │ │ │ +1230 * @ingroup unordered_associative_containers │ │ │ │ +1231 * @headerfile unordered_map │ │ │ │ +1232 * @since C++11 │ │ │ │ +1233 * │ │ │ │ +1234 * @tparam _Key Type of key objects. │ │ │ │ +1235 * @tparam _Tp Type of mapped objects. │ │ │ │ +1236 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ +1237 * @tparam _Pred Predicate function object type, defaults │ │ │ │ +1238 * to equal_to<_Value>. │ │ │ │ +1239 * @tparam _Alloc Allocator type, defaults to │ │ │ │ +1240 * std::allocator>. │ │ │ │ +1241 * │ │ │ │ +1242 * Meets the requirements of a container, and │ │ │ │ +1243 * unordered associative container │ │ │ │ +1244 * │ │ │ │ +1245 * The resulting value type of the container is std::pair. │ │ │ │ +1246 * │ │ │ │ +1247 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ +1248 * alias __ummap_hashtable. │ │ │ │ +1249 */ │ │ │ │ +1250 template, │ │ │ │ +1252 typename _Pred = equal_to<_Key>, │ │ │ │ +1253 typename _Alloc = allocator>> │ │ │ │ +_1_2_5_4 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ +1255 { │ │ │ │ +1256 typedef _____u_m_m_a_p___h_a_s_h_t_a_b_l_e_<___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_> ___H_a_s_h_t_a_b_l_e; │ │ │ │ +1257 ___H_a_s_h_t_a_b_l_e _M_h; │ │ │ │ +1258 │ │ │ │ +1259 public: │ │ │ │ +1260 // typedefs: │ │ │ │ +1261 ///@{ │ │ │ │ +1262 /// Public typedefs. │ │ │ │ +_1_2_6_3 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ +_1_2_6_4 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ +_1_2_6_5 typedef typename _Hashtable::mapped_type _m_a_p_p_e_d___t_y_p_e; │ │ │ │ +_1_2_6_6 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ +_1_2_6_7 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ +_1_2_6_8 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ +1269 ///@} │ │ │ │ +1270 │ │ │ │ +1271 ///@{ │ │ │ │ +1272 /// Iterator-related typedefs. │ │ │ │ +_1_2_7_3 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ +_1_2_7_4 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ +_1_2_7_5 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ +_1_2_7_6 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ +_1_2_7_7 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_7_8 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_7_9 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_8_0 typedef typename _Hashtable::const_local_iterator _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ +_1_2_8_1 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ +_1_2_8_2 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ 1283 ///@} │ │ │ │ 1284 │ │ │ │ -1285 ///@{ │ │ │ │ -1286 /** │ │ │ │ -1287 * @brief Inserts an element into the %unordered_multiset. │ │ │ │ -1288 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -1289 * element should be inserted. │ │ │ │ -1290 * @param __x Element to be inserted. │ │ │ │ -1291 * @return An iterator that points to the inserted element. │ │ │ │ -1292 * │ │ │ │ -1293 * Note that the first parameter is only a hint and can potentially │ │ │ │ -1294 * improve the performance of the insertion process. A bad hint would │ │ │ │ -1295 * cause no gains in efficiency. │ │ │ │ -1296 * │ │ │ │ -1297 * For more on @a hinting, see: │ │ │ │ -1298 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -1299 * │ │ │ │ -1300 * Insertion requires amortized constant. │ │ │ │ -1301 */ │ │ │ │ -1302 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_0_3 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -1304 { return _M_h.insert(_____h_i_n_t, __x); } │ │ │ │ -1305 │ │ │ │ -1306 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_0_7 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -1308 { return _M_h.insert(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -1309 ///@} │ │ │ │ -1310 │ │ │ │ -1311 /** │ │ │ │ -1312 * @brief A template function that inserts a range of elements. │ │ │ │ -1313 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -1314 * inserted. │ │ │ │ -1315 * @param __last Iterator pointing to the end of the range. │ │ │ │ -1316 * │ │ │ │ -1317 * Complexity similar to that of the range constructor. │ │ │ │ -1318 */ │ │ │ │ -1319 template │ │ │ │ -1320 void │ │ │ │ -_1_3_2_1 _i_n_s_e_r_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ -1322 { _M_h.insert(__first, __last); } │ │ │ │ -1323 │ │ │ │ -1324 /** │ │ │ │ -1325 * @brief Inserts a list of elements into the %unordered_multiset. │ │ │ │ -1326 * @param __l A std::initializer_list of elements to be │ │ │ │ -1327 * inserted. │ │ │ │ -1328 * │ │ │ │ -1329 * Complexity similar to that of the range constructor. │ │ │ │ -1330 */ │ │ │ │ -1331 void │ │ │ │ -_1_3_3_2 _i_n_s_e_r_t(_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<_v_a_l_u_e___t_y_p_e_> _____l) │ │ │ │ -1333 { _M_h.insert(_____l); } │ │ │ │ -1334 │ │ │ │ -1335#if __cplusplus > 201402L │ │ │ │ -1336 /// Extract a node. │ │ │ │ -1337 node_type │ │ │ │ -_1_3_3_8 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ -1339 { │ │ │ │ -1340 __glibcxx_assert(_____p_o_s != _e_n_d()); │ │ │ │ -1341 return _M_h.extract(_____p_o_s); │ │ │ │ -1342 } │ │ │ │ -1343 │ │ │ │ -1344 /// Extract a node. │ │ │ │ -1345 node_type │ │ │ │ -_1_3_4_6 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& _____k_e_y) │ │ │ │ -1347 { return _M_h.extract(_____k_e_y); } │ │ │ │ -1348 │ │ │ │ -1349 /// Re-insert an extracted node. │ │ │ │ -1350 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_5_1 _i_n_s_e_r_t(node_type&& _____n_h) │ │ │ │ -1352 { return _M_h._M_reinsert_node_multi(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ -1353 │ │ │ │ -1354 /// Re-insert an extracted node. │ │ │ │ -1355 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_5_6 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, node_type&& _____n_h) │ │ │ │ -1357 { return _M_h._M_reinsert_node_multi(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ -1358#endif // C++17 │ │ │ │ -1359 │ │ │ │ -1360 ///@{ │ │ │ │ -1361 /** │ │ │ │ -1362 * @brief Erases an element from an %unordered_multiset. │ │ │ │ -1363 * @param __position An iterator pointing to the element to be erased. │ │ │ │ -1364 * @return An iterator pointing to the element immediately following │ │ │ │ -1365 * @a __position prior to the element being erased. If no such │ │ │ │ -1366 * element exists, end() is returned. │ │ │ │ -1367 * │ │ │ │ -1368 * This function erases an element, pointed to by the given iterator, │ │ │ │ -1369 * from an %unordered_multiset. │ │ │ │ -1370 * │ │ │ │ -1371 * Note that this function only erases the element, and that if the │ │ │ │ -1372 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -1373 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -1374 */ │ │ │ │ -1375 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_7_6 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -1377 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -1378 │ │ │ │ -1379 // LWG 2059. │ │ │ │ -1380 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_8_1 _e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -1382 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -1383 ///@} │ │ │ │ -1384 │ │ │ │ +1285#if __cplusplus > 201402L │ │ │ │ +1286 using node_type = typename _Hashtable::node_type; │ │ │ │ +1287#endif │ │ │ │ +1288 │ │ │ │ +1289 //construct/destroy/copy │ │ │ │ +1290 │ │ │ │ +1291 /// Default constructor. │ │ │ │ +_1_2_9_2 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p() = default; │ │ │ │ +1293 │ │ │ │ +1294 /** │ │ │ │ +1295 * @brief Default constructor creates no elements. │ │ │ │ +1296 * @param __n Mnimal initial number of buckets. │ │ │ │ +1297 * @param __hf A hash functor. │ │ │ │ +1298 * @param __eql A key equality functor. │ │ │ │ +1299 * @param __a An allocator object. │ │ │ │ +1300 */ │ │ │ │ +1301 explicit │ │ │ │ +_1_3_0_2 _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, │ │ │ │ +1303 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ +1304 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ +1305 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()) │ │ │ │ +1306 : _M_h(__n, _____h_f, _____e_q_l, __a) │ │ │ │ +1307 { } │ │ │ │ +1308 │ │ │ │ +1309 /** │ │ │ │ +1310 * @brief Builds an %unordered_multimap from a range. │ │ │ │ +1311 * @param __first An input iterator. │ │ │ │ +1312 * @param __last An input iterator. │ │ │ │ +1313 * @param __n Minimal initial number of buckets. │ │ │ │ +1314 * @param __hf A hash functor. │ │ │ │ +1315 * @param __eql A key equality functor. │ │ │ │ +1316 * @param __a An allocator object. │ │ │ │ +1317 * │ │ │ │ +1318 * Create an %unordered_multimap consisting of copies of the elements │ │ │ │ +1319 * from [__first,__last). This is linear in N (where N is │ │ │ │ +1320 * distance(__first,__last)). │ │ │ │ +1321 */ │ │ │ │ +1322 template │ │ │ │ +_1_3_2_3 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ +1324 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ +1325 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ +1326 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ +1327 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()) │ │ │ │ +1328 : _M_h(__first, __last, __n, _____h_f, _____e_q_l, __a) │ │ │ │ +1329 { } │ │ │ │ +1330 │ │ │ │ +1331 /// Copy constructor. │ │ │ │ +_1_3_3_2 _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; │ │ │ │ +1333 │ │ │ │ +1334 /// Move constructor. │ │ │ │ +_1_3_3_5 _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; │ │ │ │ +1336 │ │ │ │ +1337 /** │ │ │ │ +1338 * @brief Creates an %unordered_multimap with no elements. │ │ │ │ +1339 * @param __a An allocator object. │ │ │ │ +1340 */ │ │ │ │ +1341 explicit │ │ │ │ +_1_3_4_2 _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) │ │ │ │ +1343 : _M_h(__a) │ │ │ │ +1344 { } │ │ │ │ +1345 │ │ │ │ +1346 /* │ │ │ │ +1347 * @brief Copy constructor with allocator argument. │ │ │ │ +1348 * @param __uset Input %unordered_multimap to copy. │ │ │ │ +1349 * @param __a An allocator object. │ │ │ │ +1350 */ │ │ │ │ +1351 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& _____u_m_m_a_p, │ │ │ │ +1352 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1353 : _M_h(_____u_m_m_a_p._M_h, __a) │ │ │ │ +1354 { } │ │ │ │ +1355 │ │ │ │ +1356 /* │ │ │ │ +1357 * @brief Move constructor with allocator argument. │ │ │ │ +1358 * @param __uset Input %unordered_multimap to move. │ │ │ │ +1359 * @param __a An allocator object. │ │ │ │ +1360 */ │ │ │ │ +1361 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p&& __ummap, │ │ │ │ +1362 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1363 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__ummap._M_h), __a)) ) │ │ │ │ +1364 : _M_h(_s_t_d_:_:_m_o_v_e(__ummap._M_h), __a) │ │ │ │ +1365 { } │ │ │ │ +1366 │ │ │ │ +1367 /** │ │ │ │ +1368 * @brief Builds an %unordered_multimap from an initializer_list. │ │ │ │ +1369 * @param __l An initializer_list. │ │ │ │ +1370 * @param __n Minimal initial number of buckets. │ │ │ │ +1371 * @param __hf A hash functor. │ │ │ │ +1372 * @param __eql A key equality functor. │ │ │ │ +1373 * @param __a An allocator object. │ │ │ │ +1374 * │ │ │ │ +1375 * Create an %unordered_multimap consisting of copies of the elements in │ │ │ │ +1376 * the list. This is linear in N (where N is @a __l.size()). │ │ │ │ +1377 */ │ │ │ │ +_1_3_7_8 _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, │ │ │ │ +1379 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ +1380 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ +1381 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ +1382 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()) │ │ │ │ +1383 : _M_h(_____l, __n, _____h_f, _____e_q_l, __a) │ │ │ │ +1384 { } │ │ │ │ 1385 │ │ │ │ -1386 /** │ │ │ │ -1387 * @brief Erases elements according to the provided key. │ │ │ │ -1388 * @param __x Key of element to be erased. │ │ │ │ -1389 * @return The number of elements erased. │ │ │ │ -1390 * │ │ │ │ -1391 * This function erases all the elements located by the given key from │ │ │ │ -1392 * an %unordered_multiset. │ │ │ │ -1393 * │ │ │ │ -1394 * Note that this function only erases the element, and that if the │ │ │ │ -1395 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -1396 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -1397 */ │ │ │ │ -1398 _s_i_z_e___t_y_p_e │ │ │ │ -_1_3_9_9 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1400 { return _M_h.erase(__x); } │ │ │ │ +1386 _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) │ │ │ │ +1387 : _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) │ │ │ │ +1388 { } │ │ │ │ +1389 │ │ │ │ +1390 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +1391 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1392 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(__n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ +1393 { } │ │ │ │ +1394 │ │ │ │ +1395 template │ │ │ │ +1396 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ +1397 _s_i_z_e___t_y_p_e __n, │ │ │ │ +1398 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1399 : _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) │ │ │ │ +1400 { } │ │ │ │ 1401 │ │ │ │ -1402 /** │ │ │ │ -1403 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ -1404 * %unordered_multiset. │ │ │ │ -1405 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -1406 * erased. │ │ │ │ -1407 * @param __last Iterator pointing to the end of the range to │ │ │ │ -1408 * be erased. │ │ │ │ -1409 * @return The iterator @a __last. │ │ │ │ -1410 * │ │ │ │ -1411 * This function erases a sequence of elements from an │ │ │ │ -1412 * %unordered_multiset. │ │ │ │ -1413 * │ │ │ │ -1414 * Note that this function only erases the element, and that if │ │ │ │ -1415 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -1416 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -1417 */ │ │ │ │ -1418 _i_t_e_r_a_t_o_r │ │ │ │ -_1_4_1_9 _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) │ │ │ │ -1420 { return _M_h.erase(__first, __last); } │ │ │ │ -1421 │ │ │ │ -1422 /** │ │ │ │ -1423 * Erases all elements in an %unordered_multiset. │ │ │ │ -1424 * │ │ │ │ -1425 * Note that this function only erases the elements, and that if the │ │ │ │ -1426 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ -1427 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -1428 */ │ │ │ │ -1429 void │ │ │ │ -_1_4_3_0 _c_l_e_a_r() noexcept │ │ │ │ -1431 { _M_h.clear(); } │ │ │ │ -1432 │ │ │ │ -1433 /** │ │ │ │ -1434 * @brief Swaps data with another %unordered_multiset. │ │ │ │ -1435 * @param __x An %unordered_multiset of the same element and allocator │ │ │ │ -1436 * types. │ │ │ │ -1437 * │ │ │ │ -1438 * This exchanges the elements between two sets in constant time. │ │ │ │ -1439 * Note that the global std::swap() function is specialized such that │ │ │ │ -1440 * std::swap(s1,s2) will feed to this function. │ │ │ │ -1441 */ │ │ │ │ -1442 void │ │ │ │ -_1_4_4_3 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t& __x) │ │ │ │ -1444 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ -1445 { _M_h.swap(__x._M_h); } │ │ │ │ +1402 template │ │ │ │ +1403 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ +1404 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +1405 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1406 : _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) │ │ │ │ +1407 { } │ │ │ │ +1408 │ │ │ │ +1409 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(initializer_list __l, │ │ │ │ +1410 _s_i_z_e___t_y_p_e __n, │ │ │ │ +1411 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1412 : _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) │ │ │ │ +1413 { } │ │ │ │ +1414 │ │ │ │ +1415 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(initializer_list __l, │ │ │ │ +1416 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ +1417 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ +1418 : _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) │ │ │ │ +1419 { } │ │ │ │ +1420 │ │ │ │ +1421 /// Copy assignment operator. │ │ │ │ +1422 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ +_1_4_2_3 _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; │ │ │ │ +1424 │ │ │ │ +1425 /// Move assignment operator. │ │ │ │ +1426 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ +_1_4_2_7 _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; │ │ │ │ +1428 │ │ │ │ +1429 /** │ │ │ │ +1430 * @brief %Unordered_multimap list assignment operator. │ │ │ │ +1431 * @param __l An initializer_list. │ │ │ │ +1432 * │ │ │ │ +1433 * This function fills an %unordered_multimap with copies of the │ │ │ │ +1434 * elements in the initializer list @a __l. │ │ │ │ +1435 * │ │ │ │ +1436 * Note that the assignment completely changes the %unordered_multimap │ │ │ │ +1437 * and that the resulting %unordered_multimap's size is the same as the │ │ │ │ +1438 * number of elements assigned. │ │ │ │ +1439 */ │ │ │ │ +1440 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ +_1_4_4_1 _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) │ │ │ │ +1442 { │ │ │ │ +1443 _M_h = _____l; │ │ │ │ +1444 return *this; │ │ │ │ +1445 } │ │ │ │ 1446 │ │ │ │ -1447#if __cplusplus > 201402L │ │ │ │ -1448 template │ │ │ │ -1449 friend class std::_Hash_merge_helper; │ │ │ │ -1450 │ │ │ │ -1451 template │ │ │ │ -1452 void │ │ │ │ -1453 merge(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_<___V_a_l_u_e_,_ ___H_2_,_ ___P_2_,_ ___A_l_l_o_c_>& _____s_o_u_r_c_e) │ │ │ │ -1454 { │ │ │ │ -1455 using ___M_e_r_g_e___h_e_l_p_e_r │ │ │ │ -1456 = ___H_a_s_h___m_e_r_g_e___h_e_l_p_e_r_<_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_,_ ___H_2_,_ ___P_2_>; │ │ │ │ -1457 _M_h._M_merge_multi(_Merge_helper::_S_get_table(_____s_o_u_r_c_e)); │ │ │ │ -1458 } │ │ │ │ -1459 │ │ │ │ -1460 template │ │ │ │ -1461 void │ │ │ │ -1462 merge(unordered_multiset<_Value, _H2, _P2, _Alloc>&& __source) │ │ │ │ -1463 { merge(__source); } │ │ │ │ -1464 │ │ │ │ -1465 template │ │ │ │ -1466 void │ │ │ │ -1467 merge(unordered_set<_Value, _H2, _P2, _Alloc>& __source) │ │ │ │ -1468 { │ │ │ │ -1469 using _Merge_helper │ │ │ │ -1470 = _Hash_merge_helper; │ │ │ │ -1471 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); │ │ │ │ -1472 } │ │ │ │ -1473 │ │ │ │ -1474 template │ │ │ │ -1475 void │ │ │ │ -1476 merge(unordered_set<_Value, _H2, _P2, _Alloc>&& __source) │ │ │ │ -1477 { merge(__source); } │ │ │ │ -1478#endif // C++17 │ │ │ │ -1479 │ │ │ │ -1480 // observers. │ │ │ │ -1481 │ │ │ │ -1482 /// Returns the hash functor object with which the %unordered_multiset │ │ │ │ -1483 /// was constructed. │ │ │ │ -1484 _h_a_s_h_e_r │ │ │ │ -_1_4_8_5 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ -1486 { return _M_h.hash_function(); } │ │ │ │ +1447 /// Returns the allocator object used by the %unordered_multimap. │ │ │ │ +1448 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ +_1_4_4_9 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ +1450 { return _M_h.get_allocator(); } │ │ │ │ +1451 │ │ │ │ +1452 // size and capacity: │ │ │ │ +1453 │ │ │ │ +1454 /// Returns true if the %unordered_multimap is empty. │ │ │ │ +1455 _GLIBCXX_NODISCARD bool │ │ │ │ +_1_4_5_6 _e_m_p_t_y() const noexcept │ │ │ │ +1457 { return _M_h.empty(); } │ │ │ │ +1458 │ │ │ │ +1459 /// Returns the size of the %unordered_multimap. │ │ │ │ +1460 _s_i_z_e___t_y_p_e │ │ │ │ +_1_4_6_1 _s_i_z_e() const noexcept │ │ │ │ +1462 { return _M_h.size(); } │ │ │ │ +1463 │ │ │ │ +1464 /// Returns the maximum size of the %unordered_multimap. │ │ │ │ +1465 _s_i_z_e___t_y_p_e │ │ │ │ +_1_4_6_6 _m_a_x___s_i_z_e() const noexcept │ │ │ │ +1467 { return _M_h.max_size(); } │ │ │ │ +1468 │ │ │ │ +1469 // iterators. │ │ │ │ +1470 │ │ │ │ +1471 /** │ │ │ │ +1472 * Returns a read/write iterator that points to the first element in the │ │ │ │ +1473 * %unordered_multimap. │ │ │ │ +1474 */ │ │ │ │ +1475 _i_t_e_r_a_t_o_r │ │ │ │ +_1_4_7_6 _b_e_g_i_n() noexcept │ │ │ │ +1477 { return _M_h.begin(); } │ │ │ │ +1478 │ │ │ │ +1479 ///@{ │ │ │ │ +1480 /** │ │ │ │ +1481 * Returns a read-only (constant) iterator that points to the first │ │ │ │ +1482 * element in the %unordered_multimap. │ │ │ │ +1483 */ │ │ │ │ +1484 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_1_4_8_5 _b_e_g_i_n() const noexcept │ │ │ │ +1486 { return _M_h.begin(); } │ │ │ │ 1487 │ │ │ │ -1488 /// Returns the key comparison object with which the %unordered_multiset │ │ │ │ -1489 /// was constructed. │ │ │ │ -1490 _k_e_y___e_q_u_a_l │ │ │ │ -_1_4_9_1 _k_e_y___e_q() const │ │ │ │ -1492 { return _M_h.key_eq(); } │ │ │ │ -1493 │ │ │ │ -1494 // lookup. │ │ │ │ -1495 │ │ │ │ -1496 ///@{ │ │ │ │ -1497 /** │ │ │ │ -1498 * @brief Tries to locate an element in an %unordered_multiset. │ │ │ │ -1499 * @param __x Element to be located. │ │ │ │ -1500 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ -1501 * found. │ │ │ │ -1502 * │ │ │ │ -1503 * This function takes a key and tries to locate the element with which │ │ │ │ -1504 * the key matches. If successful the function returns an iterator │ │ │ │ -1505 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ -1506 * past-the-end ( @c end() ) iterator. │ │ │ │ -1507 */ │ │ │ │ -1508 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_0_9 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1510 { return _M_h.find(__x); } │ │ │ │ -1511 │ │ │ │ -1512#if __cplusplus > 201703L │ │ │ │ -1513 template │ │ │ │ -1514 auto │ │ │ │ -_1_5_1_5 _f_i_n_d(const ___K_t& __x) │ │ │ │ -1516 -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -1517 { return _M_h._M_find_tr(__x); } │ │ │ │ -1518#endif │ │ │ │ -1519 │ │ │ │ -1520 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_5_2_1 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1522 { return _M_h.find(__x); } │ │ │ │ -1523 │ │ │ │ -1524#if __cplusplus > 201703L │ │ │ │ -1525 template │ │ │ │ -1526 auto │ │ │ │ -_1_5_2_7 _f_i_n_d(const ___K_t& __x) const │ │ │ │ -1528 -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -1529 { return _M_h._M_find_tr(__x); } │ │ │ │ -1530#endif │ │ │ │ -1531 ///@} │ │ │ │ -1532 │ │ │ │ -1533 ///@{ │ │ │ │ -1534 /** │ │ │ │ -1535 * @brief Finds the number of elements. │ │ │ │ -1536 * @param __x Element to located. │ │ │ │ -1537 * @return Number of elements with specified key. │ │ │ │ -1538 */ │ │ │ │ -1539 _s_i_z_e___t_y_p_e │ │ │ │ -_1_5_4_0 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1541 { return _M_h.count(__x); } │ │ │ │ -1542 │ │ │ │ -1543#if __cplusplus > 201703L │ │ │ │ -1544 template │ │ │ │ -1545 auto │ │ │ │ -_1_5_4_6 _c_o_u_n_t(const ___K_t& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -1547 { return _M_h._M_count_tr(__x); } │ │ │ │ -1548#endif │ │ │ │ -1549 ///@} │ │ │ │ -1550 │ │ │ │ -1551#if __cplusplus > 201703L │ │ │ │ -1552 ///@{ │ │ │ │ -1553 /** │ │ │ │ -1554 * @brief Finds whether an element with the given key exists. │ │ │ │ -1555 * @param __x Key of elements to be located. │ │ │ │ -1556 * @return True if there is any element with the specified key. │ │ │ │ -1557 */ │ │ │ │ -1558 bool │ │ │ │ -_1_5_5_9 _c_o_n_t_a_i_n_s(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1560 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ -1561 │ │ │ │ -1562 template │ │ │ │ -1563 auto │ │ │ │ -_1_5_6_4 _c_o_n_t_a_i_n_s(const ___K_t& __x) const │ │ │ │ -1565 -> decltype(_M_h._M_find_tr(__x), _v_o_i_d(), true) │ │ │ │ -1566 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ -1567 ///@} │ │ │ │ -1568#endif │ │ │ │ -1569 │ │ │ │ -1570 ///@{ │ │ │ │ -1571 /** │ │ │ │ -1572 * @brief Finds a subsequence matching given key. │ │ │ │ -1573 * @param __x Key to be located. │ │ │ │ -1574 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ -1575 * matching given key. │ │ │ │ -1576 */ │ │ │ │ -1577 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_> │ │ │ │ -_1_5_7_8 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1579 { return _M_h.equal_range(__x); } │ │ │ │ -1580 │ │ │ │ -1581#if __cplusplus > 201703L │ │ │ │ -1582 template │ │ │ │ -1583 auto │ │ │ │ -_1_5_8_4 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) │ │ │ │ -1585 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -1586 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -1587#endif │ │ │ │ -1588 │ │ │ │ -1589 _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_9_0 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1591 { return _M_h.equal_range(__x); } │ │ │ │ -1592 │ │ │ │ -1593#if __cplusplus > 201703L │ │ │ │ -1594 template │ │ │ │ -1595 auto │ │ │ │ -_1_5_9_6 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) const │ │ │ │ -1597 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -1598 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -1599#endif │ │ │ │ -1600 ///@} │ │ │ │ -1601 │ │ │ │ -1602 // bucket interface. │ │ │ │ -1603 │ │ │ │ -1604 /// Returns the number of buckets of the %unordered_multiset. │ │ │ │ -1605 _s_i_z_e___t_y_p_e │ │ │ │ -_1_6_0_6 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1607 { return _M_h.bucket_count(); } │ │ │ │ -1608 │ │ │ │ -1609 /// Returns the maximum number of buckets of the %unordered_multiset. │ │ │ │ -1610 _s_i_z_e___t_y_p_e │ │ │ │ -_1_6_1_1 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1612 { return _M_h.max_bucket_count(); } │ │ │ │ -1613 │ │ │ │ -1614 /* │ │ │ │ -1615 * @brief Returns the number of elements in a given bucket. │ │ │ │ -1616 * @param __n A bucket index. │ │ │ │ -1617 * @return The number of elements in the bucket. │ │ │ │ -1618 */ │ │ │ │ -1619 _s_i_z_e___t_y_p_e │ │ │ │ -1620 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1621 { return _M_h.bucket_size(__n); } │ │ │ │ -1622 │ │ │ │ -1623 /* │ │ │ │ -1624 * @brief Returns the bucket index of a given element. │ │ │ │ -1625 * @param __key A key instance. │ │ │ │ -1626 * @return The key bucket index. │ │ │ │ -1627 */ │ │ │ │ -1628 _s_i_z_e___t_y_p_e │ │ │ │ -1629 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ -1630 { return _M_h.bucket(__key); } │ │ │ │ -1631 │ │ │ │ -1632 ///@{ │ │ │ │ -1633 /** │ │ │ │ -1634 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ -1635 * bucket element. │ │ │ │ -1636 * @param __n The bucket index. │ │ │ │ -1637 * @return A read-only local iterator. │ │ │ │ -1638 */ │ │ │ │ -1639 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_6_4_0 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1641 { return _M_h.begin(__n); } │ │ │ │ -1642 │ │ │ │ -1643 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_6_4_4 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1645 { return _M_h.begin(__n); } │ │ │ │ -1646 │ │ │ │ -1647 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_6_4_8 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1649 { return _M_h.cbegin(__n); } │ │ │ │ -1650 ///@} │ │ │ │ -1651 │ │ │ │ -1652 ///@{ │ │ │ │ -1653 /** │ │ │ │ -1654 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ -1655 * the last bucket elements. │ │ │ │ -1656 * @param __n The bucket index. │ │ │ │ -1657 * @return A read-only local iterator. │ │ │ │ -1658 */ │ │ │ │ -1659 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_6_6_0 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1661 { return _M_h.end(__n); } │ │ │ │ -1662 │ │ │ │ -1663 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_6_6_4 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1665 { return _M_h.end(__n); } │ │ │ │ -1666 │ │ │ │ -1667 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_6_6_8 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1669 { return _M_h.cend(__n); } │ │ │ │ -1670 ///@} │ │ │ │ -1671 │ │ │ │ -1672 // hash policy. │ │ │ │ -1673 │ │ │ │ -1674 /// Returns the average number of elements per bucket. │ │ │ │ -1675 float │ │ │ │ -_1_6_7_6 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1677 { return _M_h.load_factor(); } │ │ │ │ -1678 │ │ │ │ -1679 /// Returns a positive number that the %unordered_multiset tries to keep │ │ │ │ -the │ │ │ │ -1680 /// load factor less than or equal to. │ │ │ │ -1681 float │ │ │ │ -_1_6_8_2 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1683 { return _M_h.max_load_factor(); } │ │ │ │ -1684 │ │ │ │ -1685 /** │ │ │ │ -1686 * @brief Change the %unordered_multiset maximum load factor. │ │ │ │ -1687 * @param __z The new maximum load factor. │ │ │ │ +1488 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_1_4_8_9 _c_b_e_g_i_n() const noexcept │ │ │ │ +1490 { return _M_h.begin(); } │ │ │ │ +1491 ///@} │ │ │ │ +1492 │ │ │ │ +1493 /** │ │ │ │ +1494 * Returns a read/write iterator that points one past the last element in │ │ │ │ +1495 * the %unordered_multimap. │ │ │ │ +1496 */ │ │ │ │ +1497 _i_t_e_r_a_t_o_r │ │ │ │ +_1_4_9_8 _e_n_d() noexcept │ │ │ │ +1499 { return _M_h.end(); } │ │ │ │ +1500 │ │ │ │ +1501 ///@{ │ │ │ │ +1502 /** │ │ │ │ +1503 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ +1504 * element in the %unordered_multimap. │ │ │ │ +1505 */ │ │ │ │ +1506 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_1_5_0_7 _e_n_d() const noexcept │ │ │ │ +1508 { return _M_h.end(); } │ │ │ │ +1509 │ │ │ │ +1510 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_1_5_1_1 _c_e_n_d() const noexcept │ │ │ │ +1512 { return _M_h.end(); } │ │ │ │ +1513 ///@} │ │ │ │ +1514 │ │ │ │ +1515 // modifiers. │ │ │ │ +1516 │ │ │ │ +1517 /** │ │ │ │ +1518 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +1519 * %unordered_multimap. │ │ │ │ +1520 * │ │ │ │ +1521 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ +1522 * std::piecewise_contruct for passing arguments to each │ │ │ │ +1523 * part of the pair constructor). │ │ │ │ +1524 * │ │ │ │ +1525 * @return An iterator that points to the inserted pair. │ │ │ │ +1526 * │ │ │ │ +1527 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ +1528 * the %unordered_multimap. │ │ │ │ +1529 * │ │ │ │ +1530 * Insertion requires amortized constant time. │ │ │ │ +1531 */ │ │ │ │ +1532 template │ │ │ │ +1533 _i_t_e_r_a_t_o_r │ │ │ │ +_1_5_3_4 _e_m_p_l_a_c_e(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +1535 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ +1536 │ │ │ │ +1537 /** │ │ │ │ +1538 * @brief Attempts to build and insert a std::pair into the │ │ │ │ +1539 * %unordered_multimap. │ │ │ │ +1540 * │ │ │ │ +1541 * @param __pos An iterator that serves as a hint as to where the pair │ │ │ │ +1542 * should be inserted. │ │ │ │ +1543 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ +1544 * std::piecewise_contruct for passing arguments to each │ │ │ │ +1545 * part of the pair constructor). │ │ │ │ +1546 * @return An iterator that points to the element with key of the │ │ │ │ +1547 * std::pair built from @a __args. │ │ │ │ +1548 * │ │ │ │ +1549 * Note that the first parameter is only a hint and can potentially │ │ │ │ +1550 * improve the performance of the insertion process. A bad hint would │ │ │ │ +1551 * cause no gains in efficiency. │ │ │ │ +1552 * │ │ │ │ +1553 * See │ │ │ │ +1554 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +1555 * for more on @a hinting. │ │ │ │ +1556 * │ │ │ │ +1557 * Insertion requires amortized constant time. │ │ │ │ +1558 */ │ │ │ │ +1559 template │ │ │ │ +1560 _i_t_e_r_a_t_o_r │ │ │ │ +_1_5_6_1 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +1562 { return _M_h.emplace_hint(_____p_o_s, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ +1563 │ │ │ │ +1564 ///@{ │ │ │ │ +1565 /** │ │ │ │ +1566 * @brief Inserts a std::pair into the %unordered_multimap. │ │ │ │ +1567 * @param __x Pair to be inserted (see std::make_pair for easy │ │ │ │ +1568 * creation of pairs). │ │ │ │ +1569 * │ │ │ │ +1570 * @return An iterator that points to the inserted pair. │ │ │ │ +1571 * │ │ │ │ +1572 * Insertion requires amortized constant time. │ │ │ │ +1573 */ │ │ │ │ +1574 _i_t_e_r_a_t_o_r │ │ │ │ +_1_5_7_5 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ +1576 { return _M_h.insert(__x); } │ │ │ │ +1577 │ │ │ │ +1578 _i_t_e_r_a_t_o_r │ │ │ │ +_1_5_7_9 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +1580 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +1581 │ │ │ │ +1582 template │ │ │ │ +1583 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, _i_t_e_r_a_t_o_r> │ │ │ │ +_1_5_8_4 _i_n_s_e_r_t(___P_a_i_r&& __x) │ │ │ │ +1585 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ +1586 ///@} │ │ │ │ +1587 │ │ │ │ +1588 ///@{ │ │ │ │ +1589 /** │ │ │ │ +1590 * @brief Inserts a std::pair into the %unordered_multimap. │ │ │ │ +1591 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ +1592 * pair should be inserted. │ │ │ │ +1593 * @param __x Pair to be inserted (see std::make_pair for easy creation │ │ │ │ +1594 * of pairs). │ │ │ │ +1595 * @return An iterator that points to the element with key of │ │ │ │ +1596 * @a __x (may or may not be the %pair passed in). │ │ │ │ +1597 * │ │ │ │ +1598 * Note that the first parameter is only a hint and can potentially │ │ │ │ +1599 * improve the performance of the insertion process. A bad hint would │ │ │ │ +1600 * cause no gains in efficiency. │ │ │ │ +1601 * │ │ │ │ +1602 * See │ │ │ │ +1603 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ +associative.html#containers.associative.insert_hints │ │ │ │ +1604 * for more on @a hinting. │ │ │ │ +1605 * │ │ │ │ +1606 * Insertion requires amortized constant time. │ │ │ │ +1607 */ │ │ │ │ +1608 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_0_9 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ +1610 { return _M_h.insert(_____h_i_n_t, __x); } │ │ │ │ +1611 │ │ │ │ +1612 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +1613 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ +1614 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_1_5 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ +1616 { return _M_h.insert(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ +1617 │ │ │ │ +1618 template │ │ │ │ +1619 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, _i_t_e_r_a_t_o_r> │ │ │ │ +_1_6_2_0 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, ___P_a_i_r&& __x) │ │ │ │ +1621 { return _M_h.emplace_hint(_____h_i_n_t, _s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ +1622 ///@} │ │ │ │ +1623 │ │ │ │ +1624 /** │ │ │ │ +1625 * @brief A template function that attempts to insert a range of │ │ │ │ +1626 * elements. │ │ │ │ +1627 * @param __first Iterator pointing to the start of the range to be │ │ │ │ +1628 * inserted. │ │ │ │ +1629 * @param __last Iterator pointing to the end of the range. │ │ │ │ +1630 * │ │ │ │ +1631 * Complexity similar to that of the range constructor. │ │ │ │ +1632 */ │ │ │ │ +1633 template │ │ │ │ +1634 void │ │ │ │ +_1_6_3_5 _i_n_s_e_r_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ +1636 { _M_h.insert(__first, __last); } │ │ │ │ +1637 │ │ │ │ +1638 /** │ │ │ │ +1639 * @brief Attempts to insert a list of elements into the │ │ │ │ +1640 * %unordered_multimap. │ │ │ │ +1641 * @param __l A std::initializer_list of elements │ │ │ │ +1642 * to be inserted. │ │ │ │ +1643 * │ │ │ │ +1644 * Complexity similar to that of the range constructor. │ │ │ │ +1645 */ │ │ │ │ +1646 void │ │ │ │ +_1_6_4_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) │ │ │ │ +1648 { _M_h.insert(_____l); } │ │ │ │ +1649 │ │ │ │ +1650#if __cplusplus > 201402L │ │ │ │ +1651 /// Extract a node. │ │ │ │ +1652 node_type │ │ │ │ +_1_6_5_3 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ +1654 { │ │ │ │ +1655 __glibcxx_assert(_____p_o_s != _e_n_d()); │ │ │ │ +1656 return _M_h.extract(_____p_o_s); │ │ │ │ +1657 } │ │ │ │ +1658 │ │ │ │ +1659 /// Extract a node. │ │ │ │ +1660 node_type │ │ │ │ +_1_6_6_1 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& _____k_e_y) │ │ │ │ +1662 { return _M_h.extract(_____k_e_y); } │ │ │ │ +1663 │ │ │ │ +1664 /// Re-insert an extracted node. │ │ │ │ +1665 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_6_6 _i_n_s_e_r_t(node_type&& _____n_h) │ │ │ │ +1667 { return _M_h._M_reinsert_node_multi(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ +1668 │ │ │ │ +1669 /// Re-insert an extracted node. │ │ │ │ +1670 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_7_1 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, node_type&& _____n_h) │ │ │ │ +1672 { return _M_h._M_reinsert_node_multi(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ +1673#endif // C++17 │ │ │ │ +1674 │ │ │ │ +1675 ///@{ │ │ │ │ +1676 /** │ │ │ │ +1677 * @brief Erases an element from an %unordered_multimap. │ │ │ │ +1678 * @param __position An iterator pointing to the element to be erased. │ │ │ │ +1679 * @return An iterator pointing to the element immediately following │ │ │ │ +1680 * @a __position prior to the element being erased. If no such │ │ │ │ +1681 * element exists, end() is returned. │ │ │ │ +1682 * │ │ │ │ +1683 * This function erases an element, pointed to by the given iterator, │ │ │ │ +1684 * from an %unordered_multimap. │ │ │ │ +1685 * Note that this function only erases the element, and that if the │ │ │ │ +1686 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +1687 * any way. Managing the pointer is the user's responsibility. │ │ │ │ 1688 */ │ │ │ │ -1689 void │ │ │ │ -_1_6_9_0 _m_a_x___l_o_a_d___f_a_c_t_o_r(float _____z) │ │ │ │ -1691 { _M_h.max_load_factor(_____z); } │ │ │ │ +1689 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_9_0 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ +1691 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ 1692 │ │ │ │ -1693 /** │ │ │ │ -1694 * @brief May rehash the %unordered_multiset. │ │ │ │ -1695 * @param __n The new number of buckets. │ │ │ │ -1696 * │ │ │ │ -1697 * Rehash will occur only if the new number of buckets respect the │ │ │ │ -1698 * %unordered_multiset maximum load factor. │ │ │ │ -1699 */ │ │ │ │ -1700 void │ │ │ │ -_1_7_0_1 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1702 { _M_h.rehash(__n); } │ │ │ │ -1703 │ │ │ │ -1704 /** │ │ │ │ -1705 * @brief Prepare the %unordered_multiset for a specified number of │ │ │ │ -1706 * elements. │ │ │ │ -1707 * @param __n Number of elements required. │ │ │ │ -1708 * │ │ │ │ -1709 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ -1710 */ │ │ │ │ -1711 void │ │ │ │ -_1_7_1_2 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1713 { _M_h.reserve(__n); } │ │ │ │ -1714 │ │ │ │ -1715 template │ │ │ │ -1717 friend bool │ │ │ │ -1718 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_>&, │ │ │ │ -1719 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_>&); │ │ │ │ -1720 }; │ │ │ │ -1721 │ │ │ │ -1722 │ │ │ │ -1723#if __cpp_deduction_guides >= 201606 │ │ │ │ -1724 │ │ │ │ -1725 template::value_type>, │ │ │ │ -1728 typename _Pred = │ │ │ │ -1729 equal_to::value_type>, │ │ │ │ -1730 typename _Allocator = │ │ │ │ -1731 allocator::value_type>, │ │ │ │ -1732 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -1733 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1734 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -1735 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1736 unordered_multiset(_InputIterator, _InputIterator, │ │ │ │ -1737 _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 = {}, │ │ │ │ -1738 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ -1739 _Allocator = _Allocator()) │ │ │ │ -1740 -> unordered_multiset:: │ │ │ │ -value_type, │ │ │ │ -1741 _Hash, _Pred, _Allocator>; │ │ │ │ +1693 // LWG 2059. │ │ │ │ +1694 _i_t_e_r_a_t_o_r │ │ │ │ +_1_6_9_5 _e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ +1696 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ +1697 ///@} │ │ │ │ +1698 │ │ │ │ +1699 /** │ │ │ │ +1700 * @brief Erases elements according to the provided key. │ │ │ │ +1701 * @param __x Key of elements to be erased. │ │ │ │ +1702 * @return The number of elements erased. │ │ │ │ +1703 * │ │ │ │ +1704 * This function erases all the elements located by the given key from │ │ │ │ +1705 * an %unordered_multimap. │ │ │ │ +1706 * Note that this function only erases the element, and that if the │ │ │ │ +1707 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +1708 * any way. Managing the pointer is the user's responsibility. │ │ │ │ +1709 */ │ │ │ │ +1710 _s_i_z_e___t_y_p_e │ │ │ │ +_1_7_1_1 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ +1712 { return _M_h.erase(__x); } │ │ │ │ +1713 │ │ │ │ +1714 /** │ │ │ │ +1715 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ +1716 * %unordered_multimap. │ │ │ │ +1717 * @param __first Iterator pointing to the start of the range to be │ │ │ │ +1718 * erased. │ │ │ │ +1719 * @param __last Iterator pointing to the end of the range to │ │ │ │ +1720 * be erased. │ │ │ │ +1721 * @return The iterator @a __last. │ │ │ │ +1722 * │ │ │ │ +1723 * This function erases a sequence of elements from an │ │ │ │ +1724 * %unordered_multimap. │ │ │ │ +1725 * Note that this function only erases the elements, and that if │ │ │ │ +1726 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ +1727 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ +1728 */ │ │ │ │ +1729 _i_t_e_r_a_t_o_r │ │ │ │ +_1_7_3_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) │ │ │ │ +1731 { return _M_h.erase(__first, __last); } │ │ │ │ +1732 │ │ │ │ +1733 /** │ │ │ │ +1734 * Erases all elements in an %unordered_multimap. │ │ │ │ +1735 * Note that this function only erases the elements, and that if the │ │ │ │ +1736 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ +1737 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ +1738 */ │ │ │ │ +1739 void │ │ │ │ +_1_7_4_0 _c_l_e_a_r() noexcept │ │ │ │ +1741 { _M_h.clear(); } │ │ │ │ 1742 │ │ │ │ -1743 template, │ │ │ │ -1744 typename _Pred = equal_to<_Tp>, │ │ │ │ -1745 typename _Allocator = allocator<_Tp>, │ │ │ │ -1746 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1747 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -1748 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1749 unordered_multiset(initializer_list<_Tp>, │ │ │ │ -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 = {}, │ │ │ │ -1751 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ -1752 _Allocator = _Allocator()) │ │ │ │ -1753 -> unordered_multiset<_Tp, _Hash, _Pred, _Allocator>; │ │ │ │ -1754 │ │ │ │ -1755 template, │ │ │ │ -1757 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1758 unordered_multiset(_InputIterator, _InputIterator, │ │ │ │ -1759 _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) │ │ │ │ -1760 -> unordered_multiset:: │ │ │ │ -value_type, │ │ │ │ -1761 hash::value_type>, │ │ │ │ -1763 equal_to::value_type>, │ │ │ │ -1765 _Allocator>; │ │ │ │ -1766 │ │ │ │ -1767 template, │ │ │ │ -1769 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1770 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1771 unordered_multiset(_InputIterator, _InputIterator, │ │ │ │ -1772 _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, │ │ │ │ -1773 _Hash, _Allocator) │ │ │ │ -1774 -> unordered_multiset::value_type, │ │ │ │ -1776 _Hash, │ │ │ │ -1777 equal_to< │ │ │ │ -1778 typename │ │ │ │ -1779 iterator_traits<_InputIterator>::value_type>, │ │ │ │ -1780 _Allocator>; │ │ │ │ -1781 │ │ │ │ -1782 template> │ │ │ │ -1784 unordered_multiset(initializer_list<_Tp>, │ │ │ │ -1785 _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) │ │ │ │ -1786 -> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>; │ │ │ │ -1787 │ │ │ │ -1788 template, │ │ │ │ -1790 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1791 unordered_multiset(initializer_list<_Tp>, │ │ │ │ -1792 _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) │ │ │ │ -1793 -> unordered_multiset<_Tp, _Hash, equal_to<_Tp>, _Allocator>; │ │ │ │ -1794 │ │ │ │ -1795#endif │ │ │ │ -1796 │ │ │ │ -1797 template │ │ │ │ -1798 inline void │ │ │ │ -1799 swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -1800 unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -1801 noexcept(noexcept(__x.swap(__y))) │ │ │ │ -1802 { __x.swap(__y); } │ │ │ │ -1803 │ │ │ │ -1804 template │ │ │ │ -1805 inline void │ │ │ │ -1806 swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -1807 unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -1808 noexcept(noexcept(__x.swap(__y))) │ │ │ │ -1809 { __x.swap(__y); } │ │ │ │ -1810 │ │ │ │ -1811 template │ │ │ │ -1812 inline bool │ │ │ │ -1813 operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -1814 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -1815 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ -1816 │ │ │ │ -1817#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -1818 template │ │ │ │ -1819 inline bool │ │ │ │ -1820 operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -1821 const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -1822 { return !(__x == __y); } │ │ │ │ -1823#endif │ │ │ │ -1824 │ │ │ │ -1825 template │ │ │ │ -1826 inline bool │ │ │ │ -1827 operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -1828 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -1829 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ -1830 │ │ │ │ -1831#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -1832 template │ │ │ │ -1833 inline bool │ │ │ │ -1834 operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -1835 const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -1836 { return !(__x == __y); } │ │ │ │ -1837#endif │ │ │ │ -1838 │ │ │ │ -1839_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ -1840 │ │ │ │ -1841#if __cplusplus > 201402L │ │ │ │ -1842 // Allow std::unordered_set access to internals of compatible sets. │ │ │ │ -1843 template │ │ │ │ -1845 struct _Hash_merge_helper< │ │ │ │ -1846 _GLIBCXX_STD_C::unordered_set<_Val, _Hash1, _Eq1, _Alloc>, _Hash2, _Eq2> │ │ │ │ -1847 { │ │ │ │ -1848 private: │ │ │ │ -1849 template │ │ │ │ -1850 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>; │ │ │ │ -1851 template │ │ │ │ -1852 using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>; │ │ │ │ -1853 │ │ │ │ -1854 friend unordered_set<_Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ -1855 │ │ │ │ -1856 static auto& │ │ │ │ -1857 _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set) │ │ │ │ -1858 { return __set._M_h; } │ │ │ │ +1743 /** │ │ │ │ +1744 * @brief Swaps data with another %unordered_multimap. │ │ │ │ +1745 * @param __x An %unordered_multimap of the same element and allocator │ │ │ │ +1746 * types. │ │ │ │ +1747 * │ │ │ │ +1748 * This exchanges the elements between two %unordered_multimap in │ │ │ │ +1749 * constant time. │ │ │ │ +1750 * Note that the global std::swap() function is specialized such that │ │ │ │ +1751 * std::swap(m1,m2) will feed to this function. │ │ │ │ +1752 */ │ │ │ │ +1753 void │ │ │ │ +_1_7_5_4 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& __x) │ │ │ │ +1755 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ +1756 { _M_h.swap(__x._M_h); } │ │ │ │ +1757 │ │ │ │ +1758#if __cplusplus > 201402L │ │ │ │ +1759 template │ │ │ │ +1760 friend class std::_Hash_merge_helper; │ │ │ │ +1761 │ │ │ │ +1762 template │ │ │ │ +1763 void │ │ │ │ +1764 merge(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<___K_e_y_,_ ___T_p_,_ ___H_2_,_ ___P_2_,_ ___A_l_l_o_c_>& _____s_o_u_r_c_e) │ │ │ │ +1765 { │ │ │ │ +1766 using ___M_e_r_g_e___h_e_l_p_e_r │ │ │ │ +1767 = ___H_a_s_h___m_e_r_g_e___h_e_l_p_e_r_<_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_,_ ___H_2_,_ ___P_2_>; │ │ │ │ +1768 _M_h._M_merge_multi(_Merge_helper::_S_get_table(_____s_o_u_r_c_e)); │ │ │ │ +1769 } │ │ │ │ +1770 │ │ │ │ +1771 template │ │ │ │ +1772 void │ │ │ │ +1773 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ +1774 { merge(__source); } │ │ │ │ +1775 │ │ │ │ +1776 template │ │ │ │ +1777 void │ │ │ │ +1778 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source) │ │ │ │ +1779 { │ │ │ │ +1780 using _Merge_helper │ │ │ │ +1781 = _Hash_merge_helper; │ │ │ │ +1782 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); │ │ │ │ +1783 } │ │ │ │ +1784 │ │ │ │ +1785 template │ │ │ │ +1786 void │ │ │ │ +1787 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ +1788 { merge(__source); } │ │ │ │ +1789#endif // C++17 │ │ │ │ +1790 │ │ │ │ +1791 // observers. │ │ │ │ +1792 │ │ │ │ +1793 /// Returns the hash functor object with which the %unordered_multimap │ │ │ │ +1794 /// was constructed. │ │ │ │ +1795 _h_a_s_h_e_r │ │ │ │ +_1_7_9_6 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ +1797 { return _M_h.hash_function(); } │ │ │ │ +1798 │ │ │ │ +1799 /// Returns the key comparison object with which the %unordered_multimap │ │ │ │ +1800 /// was constructed. │ │ │ │ +1801 _k_e_y___e_q_u_a_l │ │ │ │ +_1_8_0_2 _k_e_y___e_q() const │ │ │ │ +1803 { return _M_h.key_eq(); } │ │ │ │ +1804 │ │ │ │ +1805 // lookup. │ │ │ │ +1806 │ │ │ │ +1807 ///@{ │ │ │ │ +1808 /** │ │ │ │ +1809 * @brief Tries to locate an element in an %unordered_multimap. │ │ │ │ +1810 * @param __x Key to be located. │ │ │ │ +1811 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ +1812 * found. │ │ │ │ +1813 * │ │ │ │ +1814 * This function takes a key and tries to locate the element with which │ │ │ │ +1815 * the key matches. If successful the function returns an iterator │ │ │ │ +1816 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ +1817 * past-the-end ( @c end() ) iterator. │ │ │ │ +1818 */ │ │ │ │ +1819 _i_t_e_r_a_t_o_r │ │ │ │ +_1_8_2_0 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ +1821 { return _M_h.find(__x); } │ │ │ │ +1822 │ │ │ │ +1823#if __cplusplus > 201703L │ │ │ │ +1824 template │ │ │ │ +1825 auto │ │ │ │ +_1_8_2_6 _f_i_n_d(const ___K_t& __x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +1827 { return _M_h._M_find_tr(__x); } │ │ │ │ +1828#endif │ │ │ │ +1829 │ │ │ │ +1830 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_1_8_3_1 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +1832 { return _M_h.find(__x); } │ │ │ │ +1833 │ │ │ │ +1834#if __cplusplus > 201703L │ │ │ │ +1835 template │ │ │ │ +1836 auto │ │ │ │ +_1_8_3_7 _f_i_n_d(const ___K_t& __x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +1838 { return _M_h._M_find_tr(__x); } │ │ │ │ +1839#endif │ │ │ │ +1840 ///@} │ │ │ │ +1841 │ │ │ │ +1842 ///@{ │ │ │ │ +1843 /** │ │ │ │ +1844 * @brief Finds the number of elements. │ │ │ │ +1845 * @param __x Key to count. │ │ │ │ +1846 * @return Number of elements with specified key. │ │ │ │ +1847 */ │ │ │ │ +1848 _s_i_z_e___t_y_p_e │ │ │ │ +_1_8_4_9 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +1850 { return _M_h.count(__x); } │ │ │ │ +1851 │ │ │ │ +1852#if __cplusplus > 201703L │ │ │ │ +1853 template │ │ │ │ +1854 auto │ │ │ │ +_1_8_5_5 _c_o_u_n_t(const ___K_t& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ +1856 { return _M_h._M_count_tr(__x); } │ │ │ │ +1857#endif │ │ │ │ +1858 ///@} │ │ │ │ 1859 │ │ │ │ -1860 static auto& │ │ │ │ -1861 _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set) │ │ │ │ -1862 { return __set._M_h; } │ │ │ │ -1863 }; │ │ │ │ -1864 │ │ │ │ -1865 // Allow std::unordered_multiset access to internals of compatible sets. │ │ │ │ -1866 template │ │ │ │ -1868 struct _Hash_merge_helper< │ │ │ │ -1869 _GLIBCXX_STD_C::unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ -1870 _Hash2, _Eq2> │ │ │ │ -1871 { │ │ │ │ -1872 private: │ │ │ │ -1873 template │ │ │ │ -1874 using unordered_set = _GLIBCXX_STD_C::unordered_set<_Tp...>; │ │ │ │ -1875 template │ │ │ │ -1876 using unordered_multiset = _GLIBCXX_STD_C::unordered_multiset<_Tp...>; │ │ │ │ -1877 │ │ │ │ -1878 friend unordered_multiset<_Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ -1879 │ │ │ │ -1880 static auto& │ │ │ │ -1881 _S_get_table(unordered_set<_Val, _Hash2, _Eq2, _Alloc>& __set) │ │ │ │ -1882 { return __set._M_h; } │ │ │ │ -1883 │ │ │ │ -1884 static auto& │ │ │ │ -1885 _S_get_table(unordered_multiset<_Val, _Hash2, _Eq2, _Alloc>& __set) │ │ │ │ -1886 { return __set._M_h; } │ │ │ │ -1887 }; │ │ │ │ -1888#endif // C++17 │ │ │ │ +1860#if __cplusplus > 201703L │ │ │ │ +1861 ///@{ │ │ │ │ +1862 /** │ │ │ │ +1863 * @brief Finds whether an element with the given key exists. │ │ │ │ +1864 * @param __x Key of elements to be located. │ │ │ │ +1865 * @return True if there is any element with the specified key. │ │ │ │ +1866 */ │ │ │ │ +1867 bool │ │ │ │ +_1_8_6_8 _c_o_n_t_a_i_n_s(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +1869 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ +1870 │ │ │ │ +1871 template │ │ │ │ +1872 auto │ │ │ │ +_1_8_7_3 _c_o_n_t_a_i_n_s(const ___K_t& __x) const │ │ │ │ +1874 -> decltype(_M_h._M_find_tr(__x), _v_o_i_d(), true) │ │ │ │ +1875 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ +1876 ///@} │ │ │ │ +1877#endif │ │ │ │ +1878 │ │ │ │ +1879 ///@{ │ │ │ │ +1880 /** │ │ │ │ +1881 * @brief Finds a subsequence matching given key. │ │ │ │ +1882 * @param __x Key to be located. │ │ │ │ +1883 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ +1884 * matching given key. │ │ │ │ +1885 */ │ │ │ │ +1886 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_> │ │ │ │ +_1_8_8_7 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ +1888 { return _M_h.equal_range(__x); } │ │ │ │ 1889 │ │ │ │ -1890_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -1891} // namespace std │ │ │ │ -1892 │ │ │ │ -1893#endif /* _UNORDERED_SET_H */ │ │ │ │ -_s_t_l___f_u_n_c_t_i_o_n_._h │ │ │ │ +1890#if __cplusplus > 201703L │ │ │ │ +1891 template │ │ │ │ +1892 auto │ │ │ │ +_1_8_9_3 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) │ │ │ │ +1894 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +1895 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ +1896#endif │ │ │ │ +1897 │ │ │ │ +1898 _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_9 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ +1900 { return _M_h.equal_range(__x); } │ │ │ │ +1901 │ │ │ │ +1902#if __cplusplus > 201703L │ │ │ │ +1903 template │ │ │ │ +1904 auto │ │ │ │ +_1_9_0_5 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) const │ │ │ │ +1906 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +1907 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ +1908#endif │ │ │ │ +1909 ///@} │ │ │ │ +1910 │ │ │ │ +1911 // bucket interface. │ │ │ │ +1912 │ │ │ │ +1913 /// Returns the number of buckets of the %unordered_multimap. │ │ │ │ +1914 _s_i_z_e___t_y_p_e │ │ │ │ +_1_9_1_5 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ +1916 { return _M_h.bucket_count(); } │ │ │ │ +1917 │ │ │ │ +1918 /// Returns the maximum number of buckets of the %unordered_multimap. │ │ │ │ +1919 _s_i_z_e___t_y_p_e │ │ │ │ +_1_9_2_0 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ +1921 { return _M_h.max_bucket_count(); } │ │ │ │ +1922 │ │ │ │ +1923 /* │ │ │ │ +1924 * @brief Returns the number of elements in a given bucket. │ │ │ │ +1925 * @param __n A bucket index. │ │ │ │ +1926 * @return The number of elements in the bucket. │ │ │ │ +1927 */ │ │ │ │ +1928 _s_i_z_e___t_y_p_e │ │ │ │ +1929 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1930 { return _M_h.bucket_size(__n); } │ │ │ │ +1931 │ │ │ │ +1932 /* │ │ │ │ +1933 * @brief Returns the bucket index of a given element. │ │ │ │ +1934 * @param __key A key instance. │ │ │ │ +1935 * @return The key bucket index. │ │ │ │ +1936 */ │ │ │ │ +1937 _s_i_z_e___t_y_p_e │ │ │ │ +1938 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ +1939 { return _M_h.bucket(__key); } │ │ │ │ +1940 │ │ │ │ +1941 /** │ │ │ │ +1942 * @brief Returns a read/write iterator pointing to the first bucket │ │ │ │ +1943 * element. │ │ │ │ +1944 * @param __n The bucket index. │ │ │ │ +1945 * @return A read/write local iterator. │ │ │ │ +1946 */ │ │ │ │ +1947 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_4_8 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1949 { return _M_h.begin(__n); } │ │ │ │ +1950 │ │ │ │ +1951 ///@{ │ │ │ │ +1952 /** │ │ │ │ +1953 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ +1954 * bucket element. │ │ │ │ +1955 * @param __n The bucket index. │ │ │ │ +1956 * @return A read-only local iterator. │ │ │ │ +1957 */ │ │ │ │ +1958 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_5_9 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1960 { return _M_h.begin(__n); } │ │ │ │ +1961 │ │ │ │ +1962 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_6_3 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1964 { return _M_h.cbegin(__n); } │ │ │ │ +1965 ///@} │ │ │ │ +1966 │ │ │ │ +1967 /** │ │ │ │ +1968 * @brief Returns a read/write iterator pointing to one past the last │ │ │ │ +1969 * bucket elements. │ │ │ │ +1970 * @param __n The bucket index. │ │ │ │ +1971 * @return A read/write local iterator. │ │ │ │ +1972 */ │ │ │ │ +1973 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_7_4 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ +1975 { return _M_h.end(__n); } │ │ │ │ +1976 │ │ │ │ +1977 ///@{ │ │ │ │ +1978 /** │ │ │ │ +1979 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ +1980 * the last bucket elements. │ │ │ │ +1981 * @param __n The bucket index. │ │ │ │ +1982 * @return A read-only local iterator. │ │ │ │ +1983 */ │ │ │ │ +1984 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_8_5 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1986 { return _M_h.end(__n); } │ │ │ │ +1987 │ │ │ │ +1988 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_1_9_8_9 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ +1990 { return _M_h.cend(__n); } │ │ │ │ +1991 ///@} │ │ │ │ +1992 │ │ │ │ +1993 // hash policy. │ │ │ │ +1994 │ │ │ │ +1995 /// Returns the average number of elements per bucket. │ │ │ │ +1996 float │ │ │ │ +_1_9_9_7 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ +1998 { return _M_h.load_factor(); } │ │ │ │ +1999 │ │ │ │ +2000 /// Returns a positive number that the %unordered_multimap tries to keep │ │ │ │ +2001 /// the load factor less than or equal to. │ │ │ │ +2002 float │ │ │ │ +_2_0_0_3 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ +2004 { return _M_h.max_load_factor(); } │ │ │ │ +2005 │ │ │ │ +2006 /** │ │ │ │ +2007 * @brief Change the %unordered_multimap maximum load factor. │ │ │ │ +2008 * @param __z The new maximum load factor. │ │ │ │ +2009 */ │ │ │ │ +2010 void │ │ │ │ +_2_0_1_1 _m_a_x___l_o_a_d___f_a_c_t_o_r(float _____z) │ │ │ │ +2012 { _M_h.max_load_factor(_____z); } │ │ │ │ +2013 │ │ │ │ +2014 /** │ │ │ │ +2015 * @brief May rehash the %unordered_multimap. │ │ │ │ +2016 * @param __n The new number of buckets. │ │ │ │ +2017 * │ │ │ │ +2018 * Rehash will occur only if the new number of buckets respect the │ │ │ │ +2019 * %unordered_multimap maximum load factor. │ │ │ │ +2020 */ │ │ │ │ +2021 void │ │ │ │ +_2_0_2_2 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ +2023 { _M_h.rehash(__n); } │ │ │ │ +2024 │ │ │ │ +2025 /** │ │ │ │ +2026 * @brief Prepare the %unordered_multimap for a specified number of │ │ │ │ +2027 * elements. │ │ │ │ +2028 * @param __n Number of elements required. │ │ │ │ +2029 * │ │ │ │ +2030 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ +2031 */ │ │ │ │ +2032 void │ │ │ │ +_2_0_3_3 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ +2034 { _M_h.reserve(__n); } │ │ │ │ +2035 │ │ │ │ +2036 template │ │ │ │ +2038 friend bool │ │ │ │ +2039 operator==(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<___K_e_y_1, ___T_p_1, │ │ │ │ +2040 ___H_a_s_h_1, ___P_r_e_d_1, _Alloc1>&, │ │ │ │ +2041 const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<___K_e_y_1, ___T_p_1, │ │ │ │ +2042 ___H_a_s_h_1, ___P_r_e_d_1, _Alloc1>&); │ │ │ │ +2043 }; │ │ │ │ +2044 │ │ │ │ +2045#if __cpp_deduction_guides >= 201606 │ │ │ │ +2046 │ │ │ │ +2047 template>, │ │ │ │ +2049 typename _Pred = equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ +2050 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, │ │ │ │ +2051 typename = _RequireInputIter<_InputIterator>, │ │ │ │ +2052 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +2053 typename = _RequireNotAllocator<_Pred>, │ │ │ │ +2054 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2055 unordered_multimap(_InputIterator, _InputIterator, │ │ │ │ +2056 _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 = {}, │ │ │ │ +2057 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ +2058 _Allocator = _Allocator()) │ │ │ │ +2059 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ +2060 __iter_val_t<_InputIterator>, _Hash, _Pred, │ │ │ │ +2061 _Allocator>; │ │ │ │ +2062 │ │ │ │ +2063 template, │ │ │ │ +2064 typename _Pred = equal_to<_Key>, │ │ │ │ +2065 typename _Allocator = allocator>, │ │ │ │ +2066 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +2067 typename = _RequireNotAllocator<_Pred>, │ │ │ │ +2068 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2069 unordered_multimap(initializer_list>, │ │ │ │ +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 = {}, │ │ │ │ +2071 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ +2072 _Allocator = _Allocator()) │ │ │ │ +2073 -> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Allocator>; │ │ │ │ +2074 │ │ │ │ +2075 template, │ │ │ │ +2077 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2078 unordered_multimap(_InputIterator, _InputIterator, │ │ │ │ +2079 _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) │ │ │ │ +2080 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ +2081 __iter_val_t<_InputIterator>, │ │ │ │ +2082 hash<__iter_key_t<_InputIterator>>, │ │ │ │ +2083 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ +2084 │ │ │ │ +2085 template, │ │ │ │ +2087 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2088 unordered_multimap(_InputIterator, _InputIterator, _Allocator) │ │ │ │ +2089 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ +2090 __iter_val_t<_InputIterator>, │ │ │ │ +2091 hash<__iter_key_t<_InputIterator>>, │ │ │ │ +2092 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ +2093 │ │ │ │ +2094 template, │ │ │ │ +2096 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ +2097 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2098 unordered_multimap(_InputIterator, _InputIterator, │ │ │ │ +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, _Hash, │ │ │ │ +2100 _Allocator) │ │ │ │ +2101 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ +2102 __iter_val_t<_InputIterator>, _Hash, │ │ │ │ +2103 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ +2104 │ │ │ │ +2105 template> │ │ │ │ +2107 unordered_multimap(initializer_list>, │ │ │ │ +2108 _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, │ │ │ │ +2109 _Allocator) │ │ │ │ +2110 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ +2111 │ │ │ │ +2112 template> │ │ │ │ +2114 unordered_multimap(initializer_list>, _Allocator) │ │ │ │ +2115 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ +2116 │ │ │ │ +2117 template, │ │ │ │ +2119 typename = _RequireAllocator<_Allocator>> │ │ │ │ +2120 unordered_multimap(initializer_list>, │ │ │ │ +2121 _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, │ │ │ │ +2122 _Hash, _Allocator) │ │ │ │ +2123 -> unordered_multimap<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>; │ │ │ │ +2124 │ │ │ │ +2125#endif │ │ │ │ +2126 │ │ │ │ +2127 template │ │ │ │ +2128 inline void │ │ │ │ +2129 swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ +2130 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ +2131 noexcept(noexcept(__x.swap(__y))) │ │ │ │ +2132 { __x.swap(__y); } │ │ │ │ +2133 │ │ │ │ +2134 template │ │ │ │ +2135 inline void │ │ │ │ +2136 swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ +2137 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ +2138 noexcept(noexcept(__x.swap(__y))) │ │ │ │ +2139 { __x.swap(__y); } │ │ │ │ +2140 │ │ │ │ +2141 template │ │ │ │ +2142 inline bool │ │ │ │ +2143 operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ +2144 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ +2145 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ +2146 │ │ │ │ +2147#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ +2148 template │ │ │ │ +2149 inline bool │ │ │ │ +2150 operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ +2151 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ +2152 { return !(__x == __y); } │ │ │ │ +2153#endif │ │ │ │ +2154 │ │ │ │ +2155 template │ │ │ │ +2156 inline bool │ │ │ │ +2157 operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ +2158 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ +2159 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ +2160 │ │ │ │ +2161#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ +2162 template │ │ │ │ +2163 inline bool │ │ │ │ +2164 operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ +2165 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ +2166 { return !(__x == __y); } │ │ │ │ +2167#endif │ │ │ │ +2168 │ │ │ │ +2169_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ +2170 │ │ │ │ +2171#if __cplusplus > 201402L │ │ │ │ +2172 // Allow std::unordered_map access to internals of compatible maps. │ │ │ │ +2173 template │ │ │ │ +2175 struct _Hash_merge_helper< │ │ │ │ +2176 _GLIBCXX_STD_C::unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ +2177 _Hash2, _Eq2> │ │ │ │ +2178 { │ │ │ │ +2179 private: │ │ │ │ +2180 template │ │ │ │ +2181 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>; │ │ │ │ +2182 template │ │ │ │ +2183 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>; │ │ │ │ +2184 │ │ │ │ +2185 friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ +2186 │ │ │ │ +2187 static auto& │ │ │ │ +2188 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ +2189 { return __map._M_h; } │ │ │ │ +2190 │ │ │ │ +2191 static auto& │ │ │ │ +2192 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ +2193 { return __map._M_h; } │ │ │ │ +2194 }; │ │ │ │ +2195 │ │ │ │ +2196 // Allow std::unordered_multimap access to internals of compatible maps. │ │ │ │ +2197 template │ │ │ │ +2199 struct _Hash_merge_helper< │ │ │ │ +2200 _GLIBCXX_STD_C::unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ +2201 _Hash2, _Eq2> │ │ │ │ +2202 { │ │ │ │ +2203 private: │ │ │ │ +2204 template │ │ │ │ +2205 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>; │ │ │ │ +2206 template │ │ │ │ +2207 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>; │ │ │ │ +2208 │ │ │ │ +2209 friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ +2210 │ │ │ │ +2211 static auto& │ │ │ │ +2212 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ +2213 { return __map._M_h; } │ │ │ │ +2214 │ │ │ │ +2215 static auto& │ │ │ │ +2216 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ +2217 { return __map._M_h; } │ │ │ │ +2218 }; │ │ │ │ +2219#endif // C++17 │ │ │ │ +2220 │ │ │ │ +2221_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +2222} // namespace std │ │ │ │ +2223 │ │ │ │ +2224#endif /* _UNORDERED_MAP_H */ │ │ │ │ _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 │ │ │ │ _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_:_9_7 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_____u_s_e_t___t_r_a_i_t_s │ │ │ │ -__detail::_Hashtable_traits< _Cache, true, true > __uset_traits │ │ │ │ -Base types for unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_4_5 │ │ │ │ -_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_:_6_0 │ │ │ │ +_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_:_6_2 │ │ │ │ +_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_5 │ │ │ │ _s_t_d_:_:_i_t_e_r_a_t_o_r │ │ │ │ Common iterator class. │ │ │ │ DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_2_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ +_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) in ... │ │ │ │ -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_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -Tries to locate an element in an unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_2_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 │ │ │ │ -iterator begin() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_9_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -Tries to locate an element in an unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_1_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_3_0_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -_Hashtable::difference_type difference_type │ │ │ │ +of each key value) tha... │ │ │ │ +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_:_:_l_o_a_d___f_a_c_t_o_r │ │ │ │ +float load_factor() const noexcept │ │ │ │ +Returns the average number of elements per bucket. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_9_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ +_Hashtable::reference reference │ │ │ │ Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_9_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 │ │ │ │ -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_3_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_p_o_i_n_t_e_r │ │ │ │ -_Hashtable::pointer pointer │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_r_a_s_e │ │ │ │ +iterator erase(iterator __position) │ │ │ │ +Erases an element from an unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_9_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_n_d │ │ │ │ +const_iterator end() const noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_0_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 │ │ │ │ +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_1_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ +std::pair< iterator, iterator > equal_range(const key_type &__x) │ │ │ │ +Finds a subsequence matching given key. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_8_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_b_u_c_k_e_t___c_o_u_n_t │ │ │ │ +size_type bucket_count() const noexcept │ │ │ │ +Returns the number of buckets of the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_1_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::iterator iterator │ │ │ │ Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___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_:_:_c_o_n_t_a_i_n_s │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_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_2_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_b_e_g_i_n │ │ │ │ +iterator begin() noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_7_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_b_e_g_i_n │ │ │ │ +const_iterator begin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_8_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_h_a_s_h___f_u_n_c_t_i_o_n │ │ │ │ +hasher hash_function() const │ │ │ │ +Returns the hash functor object with which the unordered_multimap was │ │ │ │ +constructed. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_9_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const_iterator __hint, node_type &&__nh) │ │ │ │ +Re-insert an extracted node. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_7_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +__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_2_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +unordered_multimap & operator=(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_8_0_2 │ │ │ │ +_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_9 │ │ │ │ +_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_3_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_m_a_p_p_e_d___t_y_p_e │ │ │ │ +_Hashtable::mapped_type mapped_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_f_i_n_d │ │ │ │ +auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +Tries to locate an element in an unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_2_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_7_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +void insert(_InputIterator __first, _InputIterator __last) │ │ │ │ +A template function that attempts to insert a range of elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_3_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +unordered_multimap & operator=(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_4_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(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_3_0_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ +_Hashtable::value_type value_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_4 │ │ │ │ +_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_3_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 key_type &__key) │ │ │ │ +Extract a node. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_6_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ bool contains(const key_type &__x) const │ │ │ │ Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_5_9 │ │ │ │ -_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_7_0_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_b_e_g_i_n │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_6_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ +_Hashtable::const_reference const_reference │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(node_type &&__nh) │ │ │ │ +Re-insert an extracted node. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_6_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_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_9_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_n_d │ │ │ │ +iterator end() 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_:_:_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_4_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_b_u_c_k_e_t___c_o_u_n_t │ │ │ │ -size_type bucket_count() const noexcept │ │ │ │ -Returns the number of buckets of the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_0_6 │ │ │ │ -_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_3_0 │ │ │ │ -_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 │ │ │ │ +Returns a read/write iterator pointing to the first bucket element. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_4_8 │ │ │ │ +_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_multiset tries to keep the load │ │ │ │ +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___s_e_t_._h_:_1_6_8_2 │ │ │ │ -_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_7_3 │ │ │ │ -_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_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_2_0_0_3 │ │ │ │ +_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_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 │ │ │ │ +iterator insert(const value_type &__x) │ │ │ │ +Inserts a std::pair into the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_7_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +unordered_multimap & operator=(unordered_multimap &&)=default │ │ │ │ +Move assignment operator. │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_h_a_s_h_e_r │ │ │ │ +_Hashtable::hasher hasher │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ _Hashtable::local_iterator local_iterator │ │ │ │ Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_9_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_x_t_r_a_c_t │ │ │ │ -node_type extract(const key_type &__key) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_4_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_b_e_g_i_n │ │ │ │ -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_4_4 │ │ │ │ -_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_4_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -unordered_multiset(_InputIterator __first, _InputIterator __last, size_type │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_9 │ │ │ │ +_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_3_3 │ │ │ │ +_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_9 │ │ │ │ +_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_multiset from a range. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_0_4_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_iterator const_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_9_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -unordered_multiset(const allocator_type &__a) │ │ │ │ -Creates an unordered_multiset with no elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_0_8_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_Hashtable::allocator_type allocator_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_8_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_n_d │ │ │ │ +Builds an unordered_multimap from a range. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_2_3 │ │ │ │ +_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_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 │ │ │ │ +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_2_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(initializer_list< value_type > __l, size_type __n=0, const │ │ │ │ +hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type │ │ │ │ +&__a=allocator_type()) │ │ │ │ +Builds an unordered_multimap from an initializer_list. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_7_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_u_n_t │ │ │ │ +auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ +Finds the number of elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_5_5 │ │ │ │ +_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_3_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_n_d │ │ │ │ const_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_6_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_f_i_n_d │ │ │ │ -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_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ -_Hashtable::value_type value_type │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_8_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_p_o_i_n_t_e_r │ │ │ │ +_Hashtable::pointer pointer │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ +_Hashtable::allocator_type allocator_type │ │ │ │ Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___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_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_multiset & operator=(unordered_multiset &&)=default │ │ │ │ -Move assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_l_o_a_d___f_a_c_t_o_r │ │ │ │ -float load_factor() const noexcept │ │ │ │ -Returns the average number of elements per bucket. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_7_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()=default │ │ │ │ -Default constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __hint, node_type &&__nh) │ │ │ │ -Re-insert an extracted node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_5_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_s_i_z_e___t_y_p_e │ │ │ │ +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_:_:_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_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_f_i_n_d │ │ │ │ +auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +Tries to locate an element in an unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_3_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::const_local_iterator const_local_iterator │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_8_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(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_4_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ +_Hashtable::difference_type difference_type │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_8_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_s_i_z_e___t_y_p_e │ │ │ │ _Hashtable::size_type size_type │ │ │ │ Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_9_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_8_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_k_e_y___t_y_p_e │ │ │ │ -_Hashtable::key_type key_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_8_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_multiset & operator=(const unordered_multiset &)=default │ │ │ │ -Copy assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_h_a_s_h___f_u_n_c_t_i_o_n │ │ │ │ -hasher hash_function() const │ │ │ │ -Returns the hash functor object with which the unordered_multiset was │ │ │ │ -constructed. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_4_8_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -unordered_multiset(initializer_list< value_type > __l, size_type __n=0, const │ │ │ │ -hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type │ │ │ │ -&__a=allocator_type()) │ │ │ │ -Builds an unordered_multiset from an initializer_list. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_0_6_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_8_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ +_Hashtable::const_pointer const_pointer │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +__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_8_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), │ │ │ │ true) │ │ │ │ Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_6_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_o_u_n_t │ │ │ │ -auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -Finds the number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_4_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_4_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_r_a_s_e │ │ │ │ -iterator erase(const_iterator __position) │ │ │ │ -Erases an element from an unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_7_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(unordered_multiset &&)=default │ │ │ │ -Move constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::reference reference │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_7_3 │ │ │ │ +_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_5_4 │ │ │ │ +_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_2_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::const_iterator const_iterator │ │ │ │ Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_9_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_n_d │ │ │ │ -iterator end() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_0_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_m_p_l_a_c_e___h_i_n_t │ │ │ │ -iterator emplace_hint(const_iterator __pos, _Args &&... __args) │ │ │ │ -Inserts an element into the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_6_5 │ │ │ │ -_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_4_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_b_e_g_i_n │ │ │ │ -const_iterator begin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_9_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_r_a_s_e │ │ │ │ -iterator erase(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_9 │ │ │ │ -_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 │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +void insert(initializer_list< value_type > __l) │ │ │ │ +Attempts to insert a list of elements into the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_4_7 │ │ │ │ +_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_1_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_m_a_x___s_i_z_e │ │ │ │ +size_type max_size() const noexcept │ │ │ │ +Returns the maximum size of the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_6_6 │ │ │ │ +_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_6_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_m_p_t_y │ │ │ │ +bool empty() const noexcept │ │ │ │ +Returns true if the unordered_multimap is empty. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_5_6 │ │ │ │ +_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___s_e_t_._h_:_1_2_2_1 │ │ │ │ -_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_2_1 │ │ │ │ -_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_9_0 │ │ │ │ -_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_9_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ -_Hashtable::const_pointer const_pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_9_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -std::pair< iterator, iterator > equal_range(const key_type &__x) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_7_8 │ │ │ │ -_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_8_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const value_type &__x) │ │ │ │ -Inserts an element into the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_7_7 │ │ │ │ -_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_1_2 │ │ │ │ -_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_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 │ │ │ │ -iterator insert(const_iterator __hint, value_type &&__x) │ │ │ │ -Inserts an element into the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_0_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::const_reference const_reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_9_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_r_a_s_e │ │ │ │ -iterator erase(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_8_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_e_n_d │ │ │ │ +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_:_:_k_e_y___t_y_p_e │ │ │ │ +_Hashtable::key_type key_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_3 │ │ │ │ +_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_5_3 │ │ │ │ +_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___s_e_t_._h_:_1_6_6_8 │ │ │ │ -_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_1_1 │ │ │ │ -_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_5_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_h_a_s_h_e_r │ │ │ │ -_Hashtable::hasher hasher │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_8_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -unordered_multiset(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_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_multiset & operator=(initializer_list< value_type > __l) │ │ │ │ -Unordered_multiset list assignment operator. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_5_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_s_i_z_e │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_8_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 │ │ │ │ +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_9 │ │ │ │ +_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_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_7_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::iterator iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_9_4 │ │ │ │ -_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_6_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_5_9_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_e_x_t_r_a_c_t │ │ │ │ -node_type extract(const_iterator __pos) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_3_8 │ │ │ │ -_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_8_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_c_b_e_g_i_n │ │ │ │ -const_local_iterator cbegin(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to the first bucket element. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_6_4_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t │ │ │ │ -unordered_multiset(const unordered_multiset &)=default │ │ │ │ +Returns the size of the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_6_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_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_s_e_t_:_:_c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_local_iterator const_local_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_9_7 │ │ │ │ -_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_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_f_i_n_d │ │ │ │ -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_2_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_g_e_t___a_l_l_o_c_a_t_o_r │ │ │ │ -allocator_type get_allocator() const noexcept │ │ │ │ -Returns the allocator object used by the unordered_multiset. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_6_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_s_e_t_:_:_k_e_y___e_q_u_a_l │ │ │ │ +_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_6_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +iterator insert(const_iterator __hint, value_type &&__x) │ │ │ │ +Inserts a std::pair into the unordered_multimap. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_1_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ +auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +Finds a subsequence matching given key. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_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___e_q_u_a_l │ │ │ │ _Hashtable::key_equal key_equal │ │ │ │ Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_9_8_4 │ │ │ │ -_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 │ │ │ │ +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_:_:_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_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 │ │ │ │ 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_9_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t │ │ │ │ +Change the unordered_multimap maximum load factor. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_2_0_1_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ +auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +Finds a subsequence matching given key. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_0_5 │ │ │ │ +_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) in which the ... │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_0_5 │ │ │ │ -_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_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_i_t_e_r_a_t_o_r │ │ │ │ +key value) that associat... │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_0 │ │ │ │ +_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_:_6_0_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_t_e_r_a_t_o_r │ │ │ │ _Hashtable::iterator iterator │ │ │ │ Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_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(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_8 │ │ │ │ -_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 │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_m_a_x___l_o_a_d___f_a_c_t_o_r │ │ │ │ void max_load_factor(float __z) │ │ │ │ -Change the unordered_set maximum load factor. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_8_4_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::reference reference │ │ │ │ +Change the unordered_map maximum load factor. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_1_1 │ │ │ │ +_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_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ +bool contains(const key_type &__x) const │ │ │ │ +Finds whether an element with the given key exists. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_2_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_x_t_r_a_c_t │ │ │ │ +node_type extract(const key_type &__key) │ │ │ │ +Extract a node. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_4_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_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_2_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_g_e_t___a_l_l_o_c_a_t_o_r │ │ │ │ +allocator_type get_allocator() const noexcept │ │ │ │ +Returns the allocator object used by the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_0_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ +auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +Tries to locate an element in an unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_8_1 │ │ │ │ +_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_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ +_Hashtable::const_pointer const_pointer │ │ │ │ Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_4 │ │ │ │ -_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_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ -_Hashtable::value_type value_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_4 │ │ │ │ -_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_6_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__k) -> decltype(_M_h._M_find_tr(__k)) │ │ │ │ -Tries to locate an element in an unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_6_6_3 │ │ │ │ -_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_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_k_e_y___t_y_p_e │ │ │ │ -_Hashtable::key_type key_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_3 │ │ │ │ -_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_9_2 │ │ │ │ -_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_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__k) -> decltype(_M_h._M_equal_range_tr(__k)) │ │ │ │ +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 │ │ │ │ +auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ +Tries to locate an element in an unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_9_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_3_4 │ │ │ │ +_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_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ +std::pair< 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_3_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_b_e_g_i_n │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_4_8 │ │ │ │ +_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_:_1_0_0_3 │ │ │ │ +_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_7 │ │ │ │ +_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_2_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_x_t_r_a_c_t │ │ │ │ +node_type extract(const_iterator __pos) │ │ │ │ +Extract a node. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_3_2 │ │ │ │ +_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_8 │ │ │ │ +_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_3_3 │ │ │ │ +_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___s_e_t_._h_:_8_0_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_u_n_t │ │ │ │ -auto count(const _Kt &__k) const -> decltype(_M_h._M_count_tr(__k)) │ │ │ │ -Finds the number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_6_9_8 │ │ │ │ -_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_3_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_h_a_s_h_e_r │ │ │ │ -_Hashtable::hasher hasher │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::local_iterator local_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_8 │ │ │ │ -_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) │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_6_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ +std::pair< 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_6_0 │ │ │ │ +_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___s_e_t_._h_:_5_0_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_s_i_z_e___t_y_p_e │ │ │ │ -_Hashtable::size_type size_type │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_5_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ +_Hashtable::reference reference │ │ │ │ Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_0 │ │ │ │ -_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_5_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_m_p_t_y │ │ │ │ +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_:_:_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_7 │ │ │ │ +_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_5_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ +_Hashtable::allocator_type allocator_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_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 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_8 │ │ │ │ +_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_set is empty. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_3_0_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_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_9_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_r_a_s_e │ │ │ │ -iterator erase(iterator __position) │ │ │ │ -Erases an element from an unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_5_3_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(unordered_set &&)=default │ │ │ │ +Returns true if the unordered_map is empty. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_1_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_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_9 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ +const_iterator find(const key_type &__x) const │ │ │ │ +Tries to locate an element in an unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_8_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(unordered_map &&)=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_9_2 │ │ │ │ -_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 │ │ │ │ +_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___s_e_t_._h_:_8_2_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ -auto contains(const _Kt &__k) const -> decltype(_M_h._M_find_tr(__k), void(), │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_8_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ +auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ +Finds a subsequence matching given key. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_5_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ +auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), │ │ │ │ true) │ │ │ │ Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_1_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ -_Hashtable::const_pointer const_pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) │ │ │ │ -const │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_4_5 │ │ │ │ -_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_9_3 │ │ │ │ -_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_7 │ │ │ │ -_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_3_2 │ │ │ │ -_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_3_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_r_e_h_a_s_h │ │ │ │ -void rehash(size_type __n) │ │ │ │ -May rehash the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_8_5_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_n_d │ │ │ │ -local_iterator end(size_type __n) │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_3_2 │ │ │ │ +_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_2_2 │ │ │ │ +_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_6_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()=default │ │ │ │ +Default constructor. │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_m_a_p_p_e_d___t_y_p_e │ │ │ │ +_Hashtable::mapped_type mapped_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_0 │ │ │ │ +_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_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(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_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_m_p_l_a_c_e │ │ │ │ +std::pair< iterator, bool > emplace(_Args &&... __args) │ │ │ │ +Attempts to build and insert a std::pair into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_9_5 │ │ │ │ +_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___s_e_t_._h_:_8_1_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_k_e_y___e_q_u_a_l │ │ │ │ -_Hashtable::key_equal key_equal │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_s_i_z_e │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_8_9 │ │ │ │ +_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_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_3_1_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_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_1_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_iterator const_iterator │ │ │ │ +Returns the size of the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_1_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_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_7_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[](key_type &&__k) │ │ │ │ +Subscript ( [] ) access to unordered_map data. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_9_0 │ │ │ │ +_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_6_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_h_a_s_h_e_r │ │ │ │ +_Hashtable::hasher hasher │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_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 │ │ │ │ +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_6_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ +unordered_map(_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_9 │ │ │ │ +_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_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ +mapped_type & operator[](const key_type &__k) │ │ │ │ +Subscript ( [] ) access to unordered_map data. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_8_6 │ │ │ │ +_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_8 │ │ │ │ +_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_4_1 │ │ │ │ +_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_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ +_Hashtable::const_reference const_reference │ │ │ │ Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -_Hashtable::difference_type difference_type │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_1 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_k_e_y___e_q_u_a_l │ │ │ │ +_Hashtable::key_equal key_equal │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::local_iterator local_iterator │ │ │ │ Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_3_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::const_reference const_reference │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_4 │ │ │ │ +_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_5_2 │ │ │ │ +_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_7 │ │ │ │ +_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_7_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_p_o_i_n_t_e_r │ │ │ │ +_Hashtable::pointer pointer │ │ │ │ Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_5 │ │ │ │ -_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 │ │ │ │ +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_:_:_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_1_0 │ │ │ │ +_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_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_k_e_y___t_y_p_e │ │ │ │ +_Hashtable::key_type key_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_8 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_b_u_c_k_e_t___c_o_u_n_t │ │ │ │ +size_type bucket_count() const noexcept │ │ │ │ +Returns the number of buckets of the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_1_5 │ │ │ │ +_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_3_2 │ │ │ │ +_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_set was constructed. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_6_3_3 │ │ │ │ -_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) │ │ │ │ +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_5_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 │ │ │ │ +auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_3_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__k) const -> decltype(_M_h._M_find_tr(__k)) │ │ │ │ -Tries to locate an element in an unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_6_7_5 │ │ │ │ -_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_1_0 │ │ │ │ -_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_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_Hashtable::allocator_type allocator_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_1_7 │ │ │ │ -_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_6_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_n_d │ │ │ │ -const_iterator end() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_3_4_5 │ │ │ │ -_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_4_1 │ │ │ │ -_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_:_5_0_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_b_e_g_i_n │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_6_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(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_3_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::const_iterator const_iterator │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_3 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_s_i_z_e___t_y_p_e │ │ │ │ +_Hashtable::size_type size_type │ │ │ │ +Iterator-related typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ +iterator find(const key_type &__x) │ │ │ │ +Tries to locate an element in an unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_7_5 │ │ │ │ +_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_7 │ │ │ │ +_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_7 │ │ │ │ +_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_1_1 │ │ │ │ +_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-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_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()=default │ │ │ │ -Default constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_set & operator=(unordered_set &&)=default │ │ │ │ -Move assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -void insert(_InputIterator __first, _InputIterator __last) │ │ │ │ -A template function that attempts to insert a range of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_4_7_6 │ │ │ │ -_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 │ │ │ │ +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_8 │ │ │ │ +_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_set tries to keep the load factor │ │ │ │ +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___s_e_t_._h_:_8_3_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ -bool contains(const key_type &__x) const │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_1_2 │ │ │ │ -_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_8_4 │ │ │ │ -_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 │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_0_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=(const unordered_map &)=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_5_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_u_n_o_r_d_e_r_e_d___s_e_t │ │ │ │ -unordered_set(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_5_2 │ │ │ │ -_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_7_0 │ │ │ │ -_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_3_0 │ │ │ │ -_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_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__k) const -> decltype(_M_h._M_equal_range_tr(__k)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_5_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_local_iterator const_local_iterator │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ +_Hashtable::difference_type difference_type │ │ │ │ Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_9 │ │ │ │ -_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_8_0 │ │ │ │ -_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_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_u_n_o_r_d_e_r_e_d___s_e_t │ │ │ │ -unordered_set(_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_7_3 │ │ │ │ -_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_6_1 │ │ │ │ -_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_7 │ │ │ │ -_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_9_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_p_o_i_n_t_e_r │ │ │ │ -_Hashtable::pointer pointer │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_7 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_u_n_t │ │ │ │ +auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ +Finds the number of elements. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_1_4 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ +_Hashtable::const_local_iterator const_local_iterator │ │ │ │ Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_1_2_2 │ │ │ │ -_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_7 │ │ │ │ -_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_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___s_e_t_:_:_m_a_x___s_i_z_e │ │ │ │ -size_type max_size() const noexcept │ │ │ │ -Returns the maximum size of the unordered_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_3_1_6 │ │ │ │ -_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 │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_5 │ │ │ │ +_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_set. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___s_e_t_._h_:_7_6_6 │ │ │ │ +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_2_0 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_m_p_l_a_c_e___h_i_n_t │ │ │ │ +iterator emplace_hint(const_iterator __pos, _Args &&... __args) │ │ │ │ +Attempts to build and insert a std::pair into the unordered_map. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_2_6 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ +insert_return_type insert(node_type &&__nh) │ │ │ │ +Re-insert an extracted node. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_4_5 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ +_Hashtable::value_type value_type │ │ │ │ +Public typedefs. │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_9 │ │ │ │ +_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_2_2 │ │ │ │ +_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_b_e_g_i_n │ │ │ │ +const_iterator cbegin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_4_5 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ _h_a_s_h_t_a_b_l_e_._h │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_o_r_d_e_r_e_d___s_e_t_._h │ │ │ │ + * _u_n_o_r_d_e_r_e_d___m_a_p_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00365.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unordered_map.h File Reference │ │ │ +libstdc++: forward_list.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -49,158 +49,117 @@ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ Macros | │ │ │ -Typedefs | │ │ │ Functions
│ │ │ -
unordered_map.h File Reference
│ │ │ +
forward_list.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  std::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >
struct  std::_Fwd_list_base< _Tp, _Alloc >
 
class  std::unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >
struct  std::_Fwd_list_const_iterator< _Tp >
 
struct  std::_Fwd_list_iterator< _Tp >
 
struct  std::_Fwd_list_node< _Tp >
 
struct  std::_Fwd_list_node_base
 
class  std::forward_list< _Tp, _Alloc >
 
│ │ │ │ │ │ │ │ │ │ │ │

│ │ │ Namespaces

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

│ │ │ Macros

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

│ │ │ -Typedefs

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

│ │ │ Functions

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

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ +

Definition in file forward_list.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ __cpp_lib_unordered_map_try_emplace

│ │ │ + │ │ │ +

◆ __cpp_lib_list_remove_return_type

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

Definition at line 1184 of file forward_list.h.

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

◆ _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG

│ │ │ │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ - │ │ │ + │ │ │ │ │ │
#define __cpp_lib_unordered_map_try_emplace#define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
│ │ │
│ │ │ │ │ │ -

Definition at line 453 of file unordered_map.h.

│ │ │ +

Definition at line 1186 of file forward_list.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,203 +1,75 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -unordered_map.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ +forward_list.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_<_ ___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_ _> │ │ │ │ +struct   _s_t_d_:_:___F_w_d___l_i_s_t___b_a_s_e_<_ ___T_p_,_ ___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_ _> │ │ │ │ +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_ _> │ │ │ │   │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _s_t_d │ │ │ │ +struct   _s_t_d_:_:___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r_<_ ___T_p_ _> │ │ │ │   │ │ │ │ -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 │ │ │ │ +struct   _s_t_d_:_:___F_w_d___l_i_s_t___n_o_d_e_<_ ___T_p_ _> │ │ │ │   │ │ │ │ -TTyyppeeddeeffss │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ -___P_r_e_d = std::equal_to<_Key>, _t_y_p_e_n_a_m_e _Alloc = std::allocator >, _t_y_p_e_n_a_m_e ___T_r = __umap_traits<__cache_default<_Key, _Hash>:: │ │ │ │ -value>> │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_m_a_p___h_a_s_h_t_a_b_l_e = _Hashtable< ___K_e_y, _s_t_d_:_:_p_a_i_r< const ___K_e_y, _Tp >, │ │ │ │ - _Alloc, __detail::_Select1st, ___P_r_e_d, ___H_a_s_h, __detail:: │ │ │ │ - _Mod_range_hashing, __detail::_Default_ranged_hash, __detail:: │ │ │ │ - _Prime_rehash_policy, ___T_r > │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits< ___C_a_c_h_e, _f_a_l_s_e, _t_r_u_e > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ -___P_r_e_d = std::equal_to<_Key>, _t_y_p_e_n_a_m_e _Alloc = std::allocator >, _t_y_p_e_n_a_m_e ___T_r = __ummap_traits<__cache_default<_Key, _Hash>:: │ │ │ │ -value>> │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_m_m_a_p___h_a_s_h_t_a_b_l_e = _Hashtable< ___K_e_y, _s_t_d_:_:_p_a_i_r< const ___K_e_y, _Tp >, │ │ │ │ - _Alloc, __detail::_Select1st, ___P_r_e_d, ___H_a_s_h, __detail:: │ │ │ │ - _Mod_range_hashing, __detail::_Default_ranged_hash, __detail:: │ │ │ │ - _Prime_rehash_policy, ___T_r > │ │ │ │ -  │ │ │ │ -template │ │ │ │ -_u_s_i_n_g  _s_t_d_:_:_____u_m_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits< ___C_a_c_h_e, _f_a_l_s_e, _f_a_l_s_e │ │ │ │ - > │ │ │ │ +struct   _s_t_d_:_:___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > │ │ │ │ - &__x, const _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, │ │ │ │ - _Alloc > &__x, const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc │ │ │ │ - > &__y) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_s_w_a_p (_u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__x, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) noexcept(noexcept │ │ │ │ - (__x.swap(__y))) │ │ │ │ -  │ │ │ │ -template<_c_l_a_s_s ___K_e_y , _c_l_a_s_s _Tp , _c_l_a_s_s ___H_a_s_h , _c_l_a_s_s ___P_r_e_d , _c_l_a_s_s _Alloc > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_s_w_a_p (_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__x, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, _Alloc > &__y) noexcept │ │ │ │ - (noexcept(__x.swap(__y))) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< │ │ │ │ - _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _t_y_p_e_n_a_m_e │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_a_p< │ │ │ │ - _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< │ │ │ │ - _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r │ │ │ │ - > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _t_y_p_e_n_a_m_e │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, _e_q_u_a_l___t_o< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, │ │ │ │ - ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h = │ │ │ │ -hash<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -equal_to<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = │ │ │ │ -allocator<__iter_to_alloc_t<_InputIterator>>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Pred>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _t_y_p_e_n_a_m_e │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), │ │ │ │ - ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r │ │ │ │ - >, __iter_val_t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, _t_y_p_e_n_a_m_e │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, │ │ │ │ - _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ + class   _s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_<_ ___T_p_,_ ___A_l_l_o_c_ _> │ │ │ │   │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, _t_y_p_e_n_a_m_e │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ -___P_r_e_d = equal_to<_Key>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = allocator>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocator<_Pred>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, _t_y_p_e_n_a_m_e │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d(), │ │ │ │ - ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_a_p< ___K_e_y, _Tp, ___H_a_s_h, ___P_r_e_d, │ │ │ │ - ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< │ │ │ │ - _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >, _h_a_s_h< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, _e_q_u_a_l___t_o< │ │ │ │ - _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, _e_q_u_a_l___t_o< _____i_t_e_r___k_e_y___t< ___I_n_p_u_t_I_t_e_r_a_t_o_r > >, │ │ │ │ - ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___H_a_s_h = │ │ │ │ -hash<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___P_r_e_d = │ │ │ │ -equal_to<__iter_key_t<_InputIterator>>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = │ │ │ │ -allocator<__iter_to_alloc_t<_InputIterator>>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Pred>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d │ │ │ │ - (), ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< _____i_t_e_r___k_e_y___t< │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r >, __iter_val_t< ___I_n_p_u_t_I_t_e_r_a_t_o_r >, ___H_a_s_h, ___P_r_e_d, │ │ │ │ - ___A_l_l_o_c_a_t_o_r > │ │ │ │ +NNaammeessppaacceess │ │ │ │ +namespace   _s_t_d │ │ │ │   │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ - ___A_l_l_o_c_a_t_o_r) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< │ │ │ │ - ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _____c_p_p___l_i_b___l_i_s_t___r_e_m_o_v_e___r_e_t_u_r_n___t_y_p_e │ │ │ │   │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, _h_a_s_h< ___K_e_y >, _e_q_u_a_l___t_o< ___K_e_y >, │ │ │ │ - ___A_l_l_o_c_a_t_o_r > │ │ │ │ +#define  ___G_L_I_B_C_X_X___F_W_D_L_I_S_T___R_E_M_O_V_E___R_E_T_U_R_N___T_Y_P_E___T_A_G │ │ │ │   │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type, ___H_a_s_h, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, _e_q_u_a_l___t_o< ___K_e_y >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___H_a_s_h = hash<_Key>, _t_y_p_e_n_a_m_e │ │ │ │ -___P_r_e_d = equal_to<_Key>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = allocator>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireNotAllocatorOrIntegral<_Hash>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocator<_Pred>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::uunnoorrddeerreedd__mmuullttiimmaapp (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< _p_a_i_r< ___K_e_y, _Tp > >, │ │ │ │ - _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< int, int >::size_type={}, ___H_a_s_h=___H_a_s_h(), ___P_r_e_d=___P_r_e_d │ │ │ │ - (), ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p< ___K_e_y, _Tp, ___H_a_s_h, │ │ │ │ - ___P_r_e_d, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___V_a_l_T = typename │ │ │ │ +iterator_traits<_InputIterator>::value_type, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = │ │ │ │ +allocator<_ValT>, _t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ +_RequireAllocator<_Allocator>> │ │ │ │ +   ssttdd::::ffoorrwwaarrdd__lliisstt (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r │ │ │ │ + ()) -> _f_o_r_w_a_r_d___l_i_s_t< ___V_a_l_T, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_x, const │ │ │ │ + _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_x, const │ │ │ │ + _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_x, const │ │ │ │ + _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_x, const │ │ │ │ + _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_x, const │ │ │ │ + _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ +bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_x, const │ │ │ │ + _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_y) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_s_w_a_p (_f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > &_____l_x, _f_o_r_w_a_r_d___l_i_s_t< _Tp, _Alloc > │ │ │ │ + &_____l_y) noexcept(noexcept(__lx.swap(_____l_y))) │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _u_n_o_r_d_e_r_e_d___m_a_p_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _f_o_r_w_a_r_d___l_i_s_t_._h. │ │ │ │ ********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ -********** _?◆_? ____ccpppp__lliibb__uunnoorrddeerreedd__mmaapp__ttrryy__eemmppllaaccee ********** │ │ │ │ -#define __cpp_lib_unordered_map_try_emplace │ │ │ │ -Definition at line _4_5_3 of file _u_n_o_r_d_e_r_e_d___m_a_p_._h. │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__lliisstt__rreemmoovvee__rreettuurrnn__ttyyppee ********** │ │ │ │ +#define __cpp_lib_list_remove_return_type │ │ │ │ +Definition at line _1_1_8_4 of file _f_o_r_w_a_r_d___l_i_s_t_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__FFWWDDLLIISSTT__RREEMMOOVVEE__RREETTUURRNN__TTYYPPEE__TTAAGG ********** │ │ │ │ +#define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +Definition at line _1_1_8_6 of file _f_o_r_w_a_r_d___l_i_s_t_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_o_r_d_e_r_e_d___m_a_p_._h │ │ │ │ + * _f_o_r_w_a_r_d___l_i_s_t_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00365.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,4 +1,14 @@ │ │ │ │ var a00365 = [ │ │ │ │ - ["__umap_traits", "a00365.html#a84b02064179c0ef21d0189a7bf15803b", null], │ │ │ │ - ["__ummap_traits", "a00365.html#a1a55f2ace43a0a61a859367d227d245f", null] │ │ │ │ + ["std::_Fwd_list_base< _Tp, _Alloc >", "a05783.html", null], │ │ │ │ + ["std::_Fwd_list_const_iterator< _Tp >", "a05779.html", "a05779"], │ │ │ │ + ["std::_Fwd_list_iterator< _Tp >", "a05775.html", "a05775"], │ │ │ │ + ["std::_Fwd_list_node< _Tp >", "a05771.html", null], │ │ │ │ + ["std::_Fwd_list_node_base", "a05767.html", null], │ │ │ │ + ["operator!=", "a00365.html#ae4e62dff9be77e98ba29da34c0eee1b7", null], │ │ │ │ + ["operator<", "a00365.html#a5e86344cdca451bac42e9d9936e99353", null], │ │ │ │ + ["operator<=", "a00365.html#af19b07884ac9b3b0986b70d79bdc7ec1", null], │ │ │ │ + ["operator==", "a00365.html#ada41d3682184f0d0d8525907fdfcbea8", null], │ │ │ │ + ["operator>", "a00365.html#a1d46b9793f5a9a6d38267007fabb0e05", null], │ │ │ │ + ["operator>=", "a00365.html#a8bd7da47a9941d7e825411420feb6ac1", null], │ │ │ │ + ["swap", "a00365.html#aeb866eb47db586b6058b597e97d8b909", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00365_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unordered_map.h Source File │ │ │ +libstdc++: forward_list.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
unordered_map.h
│ │ │ +
forward_list.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// unordered_map implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// <forward_list.h> -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2010-2023 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2008-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,2672 +72,1743 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/unordered_map.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{unordered_map}
│ │ │ +
27 * Do not attempt to use it directly. @headername{forward_list}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _UNORDERED_MAP_H
│ │ │ -
31#define _UNORDERED_MAP_H
│ │ │ +
30#ifndef _FORWARD_LIST_H
│ │ │ +
31#define _FORWARD_LIST_H 1
│ │ │
32
│ │ │ -
33#include <bits/hashtable.h>
│ │ │ -
34#include <bits/allocator.h>
│ │ │ -
35#include <bits/functional_hash.h> // hash
│ │ │ -
36#include <bits/stl_function.h> // equal_to
│ │ │ -
37
│ │ │ -
38namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
39{
│ │ │ -
40_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
41_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
│ │ │ -
42
│ │ │ -
43 /// Base types for unordered_map.
│ │ │ -
44 template<bool _Cache>
│ │ │ -
45 using __umap_traits = __detail::_Hashtable_traits<_Cache, false, true>;
│ │ │ -
46
│ │ │ -
47 template<typename _Key,
│ │ │ -
48 typename _Tp,
│ │ │ -
49 typename _Hash = hash<_Key>,
│ │ │ -
50 typename _Pred = std::equal_to<_Key>,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
54 _Alloc, __detail::_Select1st,
│ │ │ -
55 _Pred, _Hash,
│ │ │ -
56 __detail::_Mod_range_hashing,
│ │ │ -
57 __detail::_Default_ranged_hash,
│ │ │ -
58 __detail::_Prime_rehash_policy, _Tr>;
│ │ │ -
59
│ │ │ -
60 /// Base types for unordered_multimap.
│ │ │ -
61 template<bool _Cache>
│ │ │ -
62 using __ummap_traits = __detail::_Hashtable_traits<_Cache, false, false>;
│ │ │ +
33#pragma GCC system_header
│ │ │ +
34
│ │ │ +
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 */
│ │ │ +
│ │ │ + │ │ │ +
55 {
│ │ │ +
56 _Fwd_list_node_base() = default;
│ │ │ + │ │ │ +
58 : _M_next(__x._M_next)
│ │ │ +
59 { __x._M_next = nullptr; }
│ │ │ +
60
│ │ │ + │ │ │ +
62 _Fwd_list_node_base& operator=(const _Fwd_list_node_base&) = delete;
│ │ │
63
│ │ │ -
64 template<typename _Key,
│ │ │ -
65 typename _Tp,
│ │ │ -
66 typename _Hash = hash<_Key>,
│ │ │ -
67 typename _Pred = std::equal_to<_Key>,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
71 _Alloc, __detail::_Select1st,
│ │ │ -
72 _Pred, _Hash,
│ │ │ -
73 __detail::_Mod_range_hashing,
│ │ │ -
74 __detail::_Default_ranged_hash,
│ │ │ -
75 __detail::_Prime_rehash_policy, _Tr>;
│ │ │ -
76
│ │ │ -
77 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ - │ │ │ -
79
│ │ │ -
80 /**
│ │ │ -
81 * @brief A standard container composed of unique keys (containing
│ │ │ -
82 * at most one of each key value) that associates values of another type
│ │ │ -
83 * with the keys.
│ │ │ -
84 *
│ │ │ -
85 * @ingroup unordered_associative_containers
│ │ │ -
86 * @headerfile unordered_map
│ │ │ -
87 * @since C++11
│ │ │ -
88 *
│ │ │ -
89 * @tparam _Key Type of key objects.
│ │ │ -
90 * @tparam _Tp Type of mapped objects.
│ │ │ -
91 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ -
92 * @tparam _Pred Predicate function object type, defaults
│ │ │ -
93 * to equal_to<_Value>.
│ │ │ -
94 * @tparam _Alloc Allocator type, defaults to
│ │ │ -
95 * std::allocator<std::pair<const _Key, _Tp>>.
│ │ │ -
96 *
│ │ │ -
97 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ -
98 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ -
99 *
│ │ │ -
100 * The resulting value type of the container is std::pair<const _Key, _Tp>.
│ │ │ -
101 *
│ │ │ -
102 * Base is _Hashtable, dispatched at compile time via template
│ │ │ -
103 * alias __umap_hashtable.
│ │ │ -
104 */
│ │ │ -
105 template<typename _Key, typename _Tp,
│ │ │ -
106 typename _Hash = hash<_Key>,
│ │ │ -
107 typename _Pred = equal_to<_Key>,
│ │ │ -
108 typename _Alloc = allocator<std::pair<const _Key, _Tp>>>
│ │ │ -
│ │ │ - │ │ │ -
110 {
│ │ │ - │ │ │ -
112 _Hashtable _M_h;
│ │ │ -
113
│ │ │ -
114 public:
│ │ │ -
115 // typedefs:
│ │ │ -
116 ///@{
│ │ │ -
117 /// Public typedefs.
│ │ │ -
118 typedef typename _Hashtable::key_type key_type;
│ │ │ -
119 typedef typename _Hashtable::value_type value_type;
│ │ │ -
120 typedef typename _Hashtable::mapped_type mapped_type;
│ │ │ -
121 typedef typename _Hashtable::hasher hasher;
│ │ │ -
122 typedef typename _Hashtable::key_equal key_equal;
│ │ │ -
123 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ -
124 ///@}
│ │ │ -
125
│ │ │ -
126 ///@{
│ │ │ -
127 /// Iterator-related typedefs.
│ │ │ -
128 typedef typename _Hashtable::pointer pointer;
│ │ │ -
129 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ -
130 typedef typename _Hashtable::reference reference;
│ │ │ -
131 typedef typename _Hashtable::const_reference const_reference;
│ │ │ -
132 typedef typename _Hashtable::iterator iterator;
│ │ │ -
133 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ -
134 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ -
135 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ -
136 typedef typename _Hashtable::size_type size_type;
│ │ │ -
137 typedef typename _Hashtable::difference_type difference_type;
│ │ │ -
138 ///@}
│ │ │ -
139
│ │ │ -
140#if __cplusplus > 201402L
│ │ │ -
141 using node_type = typename _Hashtable::node_type;
│ │ │ -
142 using insert_return_type = typename _Hashtable::insert_return_type;
│ │ │ -
143#endif
│ │ │ -
144
│ │ │ -
145 //construct/destroy/copy
│ │ │ -
146
│ │ │ -
147 /// Default constructor.
│ │ │ -
148 unordered_map() = default;
│ │ │ -
149
│ │ │ -
150 /**
│ │ │ -
151 * @brief Default constructor creates no elements.
│ │ │ -
152 * @param __n Minimal initial number of buckets.
│ │ │ -
153 * @param __hf A hash functor.
│ │ │ -
154 * @param __eql A key equality functor.
│ │ │ -
155 * @param __a An allocator object.
│ │ │ -
156 */
│ │ │ -
157 explicit
│ │ │ -
│ │ │ - │ │ │ -
159 const hasher& __hf = hasher(),
│ │ │ -
160 const key_equal& __eql = key_equal(),
│ │ │ -
161 const allocator_type& __a = allocator_type())
│ │ │ -
162 : _M_h(__n, __hf, __eql, __a)
│ │ │ -
163 { }
│ │ │ -
│ │ │ -
164
│ │ │ -
165 /**
│ │ │ -
166 * @brief Builds an %unordered_map from a range.
│ │ │ -
167 * @param __first An input iterator.
│ │ │ -
168 * @param __last An input iterator.
│ │ │ -
169 * @param __n Minimal initial number of buckets.
│ │ │ -
170 * @param __hf A hash functor.
│ │ │ -
171 * @param __eql A key equality functor.
│ │ │ -
172 * @param __a An allocator object.
│ │ │ -
173 *
│ │ │ -
174 * Create an %unordered_map consisting of copies of the elements from
│ │ │ -
175 * [__first,__last). This is linear in N (where N is
│ │ │ -
176 * distance(__first,__last)).
│ │ │ -
177 */
│ │ │ -
178 template<typename _InputIterator>
│ │ │ -
│ │ │ - │ │ │ -
180 size_type __n = 0,
│ │ │ -
181 const hasher& __hf = hasher(),
│ │ │ -
182 const key_equal& __eql = key_equal(),
│ │ │ -
183 const allocator_type& __a = allocator_type())
│ │ │ -
184 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ -
185 { }
│ │ │ -
│ │ │ -
186
│ │ │ -
187 /// Copy constructor.
│ │ │ -
188 unordered_map(const unordered_map&) = default;
│ │ │ -
189
│ │ │ -
190 /// Move constructor.
│ │ │ - │ │ │ -
192
│ │ │ -
193 /**
│ │ │ -
194 * @brief Creates an %unordered_map with no elements.
│ │ │ -
195 * @param __a An allocator object.
│ │ │ -
196 */
│ │ │ -
197 explicit
│ │ │ -
│ │ │ - │ │ │ -
199 : _M_h(__a)
│ │ │ -
200 { }
│ │ │ -
│ │ │ -
201
│ │ │ -
202 /*
│ │ │ -
203 * @brief Copy constructor with allocator argument.
│ │ │ -
204 * @param __uset Input %unordered_map to copy.
│ │ │ -
205 * @param __a An allocator object.
│ │ │ -
206 */
│ │ │ - │ │ │ -
208 const allocator_type& __a)
│ │ │ -
209 : _M_h(__umap._M_h, __a)
│ │ │ -
210 { }
│ │ │ -
211
│ │ │ -
212 /*
│ │ │ -
213 * @brief Move constructor with allocator argument.
│ │ │ -
214 * @param __uset Input %unordered_map to move.
│ │ │ -
215 * @param __a An allocator object.
│ │ │ -
216 */
│ │ │ - │ │ │ -
218 const allocator_type& __a)
│ │ │ -
219 noexcept( noexcept(_Hashtable(std::move(__umap._M_h), __a)) )
│ │ │ -
220 : _M_h(std::move(__umap._M_h), __a)
│ │ │ -
221 { }
│ │ │ -
222
│ │ │ -
223 /**
│ │ │ -
224 * @brief Builds an %unordered_map from an initializer_list.
│ │ │ -
225 * @param __l An initializer_list.
│ │ │ -
226 * @param __n Minimal initial number of buckets.
│ │ │ -
227 * @param __hf A hash functor.
│ │ │ -
228 * @param __eql A key equality functor.
│ │ │ -
229 * @param __a An allocator object.
│ │ │ -
230 *
│ │ │ -
231 * Create an %unordered_map consisting of copies of the elements in the
│ │ │ -
232 * list. This is linear in N (where N is @a __l.size()).
│ │ │ -
233 */
│ │ │ -
│ │ │ - │ │ │ -
235 size_type __n = 0,
│ │ │ -
236 const hasher& __hf = hasher(),
│ │ │ -
237 const key_equal& __eql = key_equal(),
│ │ │ -
238 const allocator_type& __a = allocator_type())
│ │ │ -
239 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ -
240 { }
│ │ │ -
│ │ │ -
241
│ │ │ -
242 unordered_map(size_type __n, const allocator_type& __a)
│ │ │ -
243 : unordered_map(__n, hasher(), key_equal(), __a)
│ │ │ -
244 { }
│ │ │ + │ │ │ +
65 operator=(_Fwd_list_node_base&& __x) noexcept
│ │ │ +
66 {
│ │ │ +
67 _M_next = __x._M_next;
│ │ │ +
68 __x._M_next = nullptr;
│ │ │ +
69 return *this;
│ │ │ +
70 }
│ │ │ +
71
│ │ │ +
72 _Fwd_list_node_base* _M_next = nullptr;
│ │ │ +
73
│ │ │ + │ │ │ +
75 _M_transfer_after(_Fwd_list_node_base* __begin,
│ │ │ +
76 _Fwd_list_node_base* __end) noexcept
│ │ │ +
77 {
│ │ │ +
78 _Fwd_list_node_base* __keep = __begin->_M_next;
│ │ │ +
79 if (__end)
│ │ │ +
80 {
│ │ │ +
81 __begin->_M_next = __end->_M_next;
│ │ │ +
82 __end->_M_next = _M_next;
│ │ │ +
83 }
│ │ │ +
84 else
│ │ │ +
85 __begin->_M_next = nullptr;
│ │ │ +
86 _M_next = __keep;
│ │ │ +
87 return __end;
│ │ │ +
88 }
│ │ │ +
89
│ │ │ +
90 void
│ │ │ +
91 _M_reverse_after() noexcept
│ │ │ +
92 {
│ │ │ +
93 _Fwd_list_node_base* __tail = _M_next;
│ │ │ +
94 if (!__tail)
│ │ │ +
95 return;
│ │ │ +
96 while (_Fwd_list_node_base* __temp = __tail->_M_next)
│ │ │ +
97 {
│ │ │ +
98 _Fwd_list_node_base* __keep = _M_next;
│ │ │ +
99 _M_next = __temp;
│ │ │ +
100 __tail->_M_next = __temp->_M_next;
│ │ │ +
101 _M_next->_M_next = __keep;
│ │ │ +
102 }
│ │ │ +
103 }
│ │ │ +
104 };
│ │ │ +
│ │ │ +
105
│ │ │ +
106 /**
│ │ │ +
107 * @brief A helper node class for %forward_list.
│ │ │ +
108 * This is just a linked list with uninitialized storage for a
│ │ │ +
109 * data value in each node.
│ │ │ +
110 * There is a sorting utility method.
│ │ │ +
111 */
│ │ │ +
112 template<typename _Tp>
│ │ │ +
│ │ │ + │ │ │ +
114 : public _Fwd_list_node_base
│ │ │ +
115 {
│ │ │ +
116 _Fwd_list_node() = default;
│ │ │ +
117
│ │ │ +
118 __gnu_cxx::__aligned_buffer<_Tp> _M_storage;
│ │ │ +
119
│ │ │ +
120 _Tp*
│ │ │ +
121 _M_valptr() noexcept
│ │ │ +
122 { return _M_storage._M_ptr(); }
│ │ │ +
123
│ │ │ +
124 const _Tp*
│ │ │ +
125 _M_valptr() const noexcept
│ │ │ +
126 { return _M_storage._M_ptr(); }
│ │ │ +
127 };
│ │ │ +
│ │ │ +
128
│ │ │ +
129 /**
│ │ │ +
130 * @brief A forward_list::iterator.
│ │ │ +
131 *
│ │ │ +
132 * All the functions are op overloads.
│ │ │ +
133 */
│ │ │ +
134 template<typename _Tp>
│ │ │ +
│ │ │ + │ │ │ +
136 {
│ │ │ + │ │ │ + │ │ │ +
139
│ │ │ +
140 typedef _Tp value_type;
│ │ │ +
141 typedef _Tp* pointer;
│ │ │ +
142 typedef _Tp& reference;
│ │ │ +
143 typedef ptrdiff_t difference_type;
│ │ │ + │ │ │ +
145
│ │ │ +
146 _Fwd_list_iterator() noexcept
│ │ │ +
147 : _M_node() { }
│ │ │ +
148
│ │ │ +
149 explicit
│ │ │ + │ │ │ +
151 : _M_node(__n) { }
│ │ │ +
152
│ │ │ +
153 [[__nodiscard__]]
│ │ │ +
154 reference
│ │ │ +
155 operator*() const noexcept
│ │ │ +
156 { return *static_cast<_Node*>(this->_M_node)->_M_valptr(); }
│ │ │ +
157
│ │ │ +
158 [[__nodiscard__]]
│ │ │ +
159 pointer
│ │ │ +
160 operator->() const noexcept
│ │ │ +
161 { return static_cast<_Node*>(this->_M_node)->_M_valptr(); }
│ │ │ +
162
│ │ │ +
163 _Self&
│ │ │ +
164 operator++() noexcept
│ │ │ +
165 {
│ │ │ +
166 _M_node = _M_node->_M_next;
│ │ │ +
167 return *this;
│ │ │ +
168 }
│ │ │ +
169
│ │ │ +
170 _Self
│ │ │ +
171 operator++(int) noexcept
│ │ │ +
172 {
│ │ │ +
173 _Self __tmp(*this);
│ │ │ +
174 _M_node = _M_node->_M_next;
│ │ │ +
175 return __tmp;
│ │ │ +
176 }
│ │ │ +
177
│ │ │ +
178 /**
│ │ │ +
179 * @brief Forward list iterator equality comparison.
│ │ │ +
180 */
│ │ │ +
181 [[__nodiscard__]]
│ │ │ +
182 friend bool
│ │ │ +
│ │ │ +
183 operator==(const _Self& __x, const _Self& __y) noexcept
│ │ │ +
184 { return __x._M_node == __y._M_node; }
│ │ │ +
│ │ │ +
185
│ │ │ +
186#if __cpp_impl_three_way_comparison < 201907L
│ │ │ +
187 /**
│ │ │ +
188 * @brief Forward list iterator inequality comparison.
│ │ │ +
189 */
│ │ │ +
190 [[__nodiscard__]]
│ │ │ +
191 friend bool
│ │ │ +
192 operator!=(const _Self& __x, const _Self& __y) noexcept
│ │ │ +
193 { return __x._M_node != __y._M_node; }
│ │ │ +
194#endif
│ │ │ +
195
│ │ │ +
196 _Self
│ │ │ +
197 _M_next() const noexcept
│ │ │ +
198 {
│ │ │ +
199 if (_M_node)
│ │ │ +
200 return _Fwd_list_iterator(_M_node->_M_next);
│ │ │ +
201 else
│ │ │ +
202 return _Fwd_list_iterator(nullptr);
│ │ │ +
203 }
│ │ │ +
204
│ │ │ +
205 _Fwd_list_node_base* _M_node;
│ │ │ +
206 };
│ │ │ +
│ │ │ +
207
│ │ │ +
208 /**
│ │ │ +
209 * @brief A forward_list::const_iterator.
│ │ │ +
210 *
│ │ │ +
211 * All the functions are op overloads.
│ │ │ +
212 */
│ │ │ +
213 template<typename _Tp>
│ │ │ +
│ │ │ + │ │ │ +
215 {
│ │ │ + │ │ │ +
217 typedef const _Fwd_list_node<_Tp> _Node;
│ │ │ + │ │ │ +
219
│ │ │ +
220 typedef _Tp value_type;
│ │ │ +
221 typedef const _Tp* pointer;
│ │ │ +
222 typedef const _Tp& reference;
│ │ │ +
223 typedef ptrdiff_t difference_type;
│ │ │ + │ │ │ +
225
│ │ │ +
226 _Fwd_list_const_iterator() noexcept
│ │ │ +
227 : _M_node() { }
│ │ │ +
228
│ │ │ +
229 explicit
│ │ │ + │ │ │ +
231 : _M_node(__n) { }
│ │ │ +
232
│ │ │ +
233 _Fwd_list_const_iterator(const iterator& __iter) noexcept
│ │ │ +
234 : _M_node(__iter._M_node) { }
│ │ │ +
235
│ │ │ +
236 [[__nodiscard__]]
│ │ │ +
237 reference
│ │ │ +
238 operator*() const noexcept
│ │ │ +
239 { return *static_cast<_Node*>(this->_M_node)->_M_valptr(); }
│ │ │ +
240
│ │ │ +
241 [[__nodiscard__]]
│ │ │ +
242 pointer
│ │ │ +
243 operator->() const noexcept
│ │ │ +
244 { return static_cast<_Node*>(this->_M_node)->_M_valptr(); }
│ │ │
245
│ │ │ -
246 unordered_map(size_type __n, const hasher& __hf,
│ │ │ -
247 const allocator_type& __a)
│ │ │ -
248 : unordered_map(__n, __hf, key_equal(), __a)
│ │ │ -
249 { }
│ │ │ -
250
│ │ │ -
251 template<typename _InputIterator>
│ │ │ -
252 unordered_map(_InputIterator __first, _InputIterator __last,
│ │ │ -
253 size_type __n,
│ │ │ -
254 const allocator_type& __a)
│ │ │ -
255 : unordered_map(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ -
256 { }
│ │ │ -
257
│ │ │ -
258 template<typename _InputIterator>
│ │ │ -
259 unordered_map(_InputIterator __first, _InputIterator __last,
│ │ │ -
260 size_type __n, const hasher& __hf,
│ │ │ -
261 const allocator_type& __a)
│ │ │ -
262 : unordered_map(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ -
263 { }
│ │ │ -
264
│ │ │ -
265 unordered_map(initializer_list<value_type> __l,
│ │ │ -
266 size_type __n,
│ │ │ -
267 const allocator_type& __a)
│ │ │ -
268 : unordered_map(__l, __n, hasher(), key_equal(), __a)
│ │ │ -
269 { }
│ │ │ -
270
│ │ │ -
271 unordered_map(initializer_list<value_type> __l,
│ │ │ -
272 size_type __n, const hasher& __hf,
│ │ │ -
273 const allocator_type& __a)
│ │ │ -
274 : unordered_map(__l, __n, __hf, key_equal(), __a)
│ │ │ -
275 { }
│ │ │ -
276
│ │ │ -
277 /// Copy assignment operator.
│ │ │ - │ │ │ -
279 operator=(const unordered_map&) = default;
│ │ │ -
280
│ │ │ -
281 /// Move assignment operator.
│ │ │ - │ │ │ - │ │ │ -
284
│ │ │ -
285 /**
│ │ │ -
286 * @brief %Unordered_map list assignment operator.
│ │ │ -
287 * @param __l An initializer_list.
│ │ │ -
288 *
│ │ │ -
289 * This function fills an %unordered_map with copies of the elements in
│ │ │ -
290 * the initializer list @a __l.
│ │ │ -
291 *
│ │ │ -
292 * Note that the assignment completely changes the %unordered_map and
│ │ │ -
293 * that the resulting %unordered_map's size is the same as the number
│ │ │ -
294 * of elements assigned.
│ │ │ -
295 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
298 {
│ │ │ -
299 _M_h = __l;
│ │ │ -
300 return *this;
│ │ │ -
301 }
│ │ │ -
│ │ │ -
302
│ │ │ -
303 /// Returns the allocator object used by the %unordered_map.
│ │ │ - │ │ │ -
│ │ │ -
305 get_allocator() const noexcept
│ │ │ -
306 { return _M_h.get_allocator(); }
│ │ │ -
│ │ │ -
307
│ │ │ -
308 // size and capacity:
│ │ │ -
309
│ │ │ -
310 /// Returns true if the %unordered_map is empty.
│ │ │ -
311 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
312 empty() const noexcept
│ │ │ -
313 { return _M_h.empty(); }
│ │ │ -
│ │ │ -
314
│ │ │ -
315 /// Returns the size of the %unordered_map.
│ │ │ - │ │ │ -
│ │ │ -
317 size() const noexcept
│ │ │ -
318 { return _M_h.size(); }
│ │ │ -
│ │ │ -
319
│ │ │ -
320 /// Returns the maximum size of the %unordered_map.
│ │ │ - │ │ │ -
│ │ │ -
322 max_size() const noexcept
│ │ │ -
323 { return _M_h.max_size(); }
│ │ │ -
│ │ │ -
324
│ │ │ -
325 // iterators.
│ │ │ -
326
│ │ │ -
327 /**
│ │ │ -
328 * Returns a read/write iterator that points to the first element in the
│ │ │ -
329 * %unordered_map.
│ │ │ -
330 */
│ │ │ - │ │ │ -
│ │ │ -
332 begin() noexcept
│ │ │ -
333 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
334
│ │ │ -
335 ///@{
│ │ │ -
336 /**
│ │ │ -
337 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
338 * element in the %unordered_map.
│ │ │ -
339 */
│ │ │ - │ │ │ -
│ │ │ -
341 begin() const noexcept
│ │ │ -
342 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
343
│ │ │ - │ │ │ -
│ │ │ -
345 cbegin() const noexcept
│ │ │ -
346 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
347 ///@}
│ │ │ -
348
│ │ │ -
349 /**
│ │ │ -
350 * Returns a read/write iterator that points one past the last element in
│ │ │ -
351 * the %unordered_map.
│ │ │ -
352 */
│ │ │ - │ │ │ -
│ │ │ -
354 end() noexcept
│ │ │ -
355 { return _M_h.end(); }
│ │ │ -
│ │ │ -
356
│ │ │ -
357 ///@{
│ │ │ -
358 /**
│ │ │ -
359 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
360 * element in the %unordered_map.
│ │ │ -
361 */
│ │ │ - │ │ │ -
│ │ │ -
363 end() const noexcept
│ │ │ -
364 { return _M_h.end(); }
│ │ │ -
│ │ │ -
365
│ │ │ - │ │ │ -
│ │ │ -
367 cend() const noexcept
│ │ │ -
368 { return _M_h.end(); }
│ │ │ -
│ │ │ -
369 ///@}
│ │ │ -
370
│ │ │ -
371 // modifiers.
│ │ │ -
372
│ │ │ -
373 /**
│ │ │ -
374 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
375 * %unordered_map.
│ │ │ -
376 *
│ │ │ -
377 * @param __args Arguments used to generate a new pair instance (see
│ │ │ -
378 * std::piecewise_contruct for passing arguments to each
│ │ │ -
379 * part of the pair constructor).
│ │ │ -
380 *
│ │ │ -
381 * @return A pair, of which the first element is an iterator that points
│ │ │ -
382 * to the possibly inserted pair, and the second is a bool that
│ │ │ -
383 * is true if the pair was actually inserted.
│ │ │ -
384 *
│ │ │ -
385 * This function attempts to build and insert a (key, value) %pair into
│ │ │ -
386 * the %unordered_map.
│ │ │ -
387 * An %unordered_map relies on unique keys and thus a %pair is only
│ │ │ -
388 * inserted if its first element (the key) is not already present in the
│ │ │ -
389 * %unordered_map.
│ │ │ -
390 *
│ │ │ -
391 * Insertion requires amortized constant time.
│ │ │ -
392 */
│ │ │ -
393 template<typename... _Args>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
396 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
397
│ │ │ -
398 /**
│ │ │ -
399 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
400 * %unordered_map.
│ │ │ -
401 *
│ │ │ -
402 * @param __pos An iterator that serves as a hint as to where the pair
│ │ │ -
403 * should be inserted.
│ │ │ -
404 * @param __args Arguments used to generate a new pair instance (see
│ │ │ -
405 * std::piecewise_contruct for passing arguments to each
│ │ │ -
406 * part of the pair constructor).
│ │ │ -
407 * @return An iterator that points to the element with key of the
│ │ │ -
408 * std::pair built from @a __args (may or may not be that
│ │ │ -
409 * std::pair).
│ │ │ -
410 *
│ │ │ -
411 * This function is not concerned about whether the insertion took place,
│ │ │ -
412 * and thus does not return a boolean like the single-argument emplace()
│ │ │ -
413 * does.
│ │ │ -
414 * Note that the first parameter is only a hint and can potentially
│ │ │ -
415 * improve the performance of the insertion process. A bad hint would
│ │ │ -
416 * cause no gains in efficiency.
│ │ │ -
417 *
│ │ │ -
418 * See
│ │ │ -
419 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
420 * for more on @a hinting.
│ │ │ -
421 *
│ │ │ -
422 * Insertion requires amortized constant time.
│ │ │ -
423 */
│ │ │ -
424 template<typename... _Args>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
427 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
428
│ │ │ -
429#if __cplusplus > 201402L
│ │ │ -
430 /// Extract a node.
│ │ │ -
431 node_type
│ │ │ -
│ │ │ - │ │ │ -
433 {
│ │ │ -
434 __glibcxx_assert(__pos != end());
│ │ │ -
435 return _M_h.extract(__pos);
│ │ │ -
436 }
│ │ │ -
│ │ │ -
437
│ │ │ -
438 /// Extract a node.
│ │ │ -
439 node_type
│ │ │ -
│ │ │ - │ │ │ -
441 { return _M_h.extract(__key); }
│ │ │ -
│ │ │ -
442
│ │ │ -
443 /// Re-insert an extracted node.
│ │ │ -
444 insert_return_type
│ │ │ -
│ │ │ -
445 insert(node_type&& __nh)
│ │ │ -
446 { return _M_h._M_reinsert_node(std::move(__nh)); }
│ │ │ -
│ │ │ -
447
│ │ │ -
448 /// Re-insert an extracted node.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
451 { return _M_h._M_reinsert_node(std::move(__nh)).position; }
│ │ │ -
│ │ │ -
452
│ │ │ -
453#define __cpp_lib_unordered_map_try_emplace 201411L
│ │ │ -
454 /**
│ │ │ -
455 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
456 * %unordered_map.
│ │ │ -
457 *
│ │ │ -
458 * @param __k Key to use for finding a possibly existing pair in
│ │ │ -
459 * the unordered_map.
│ │ │ -
460 * @param __args Arguments used to generate the .second for a
│ │ │ -
461 * new pair instance.
│ │ │ -
462 *
│ │ │ -
463 * @return A pair, of which the first element is an iterator that points
│ │ │ -
464 * to the possibly inserted pair, and the second is a bool that
│ │ │ -
465 * is true if the pair was actually inserted.
│ │ │ -
466 *
│ │ │ -
467 * This function attempts to build and insert a (key, value) %pair into
│ │ │ -
468 * the %unordered_map.
│ │ │ -
469 * An %unordered_map relies on unique keys and thus a %pair is only
│ │ │ -
470 * inserted if its first element (the key) is not already present in the
│ │ │ -
471 * %unordered_map.
│ │ │ -
472 * If a %pair is not inserted, this function has no effect.
│ │ │ -
473 *
│ │ │ -
474 * Insertion requires amortized constant time.
│ │ │ -
475 */
│ │ │ -
476 template <typename... _Args>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
479 {
│ │ │ -
480 return _M_h.try_emplace(cend(), __k, std::forward<_Args>(__args)...);
│ │ │ -
481 }
│ │ │ -
│ │ │ -
482
│ │ │ -
483 // move-capable overload
│ │ │ -
484 template <typename... _Args>
│ │ │ - │ │ │ - │ │ │ -
487 {
│ │ │ -
488 return _M_h.try_emplace(cend(), std::move(__k),
│ │ │ - │ │ │ -
490 }
│ │ │ -
491
│ │ │ -
492 /**
│ │ │ -
493 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
494 * %unordered_map.
│ │ │ -
495 *
│ │ │ -
496 * @param __hint An iterator that serves as a hint as to where the pair
│ │ │ -
497 * should be inserted.
│ │ │ -
498 * @param __k Key to use for finding a possibly existing pair in
│ │ │ -
499 * the unordered_map.
│ │ │ -
500 * @param __args Arguments used to generate the .second for a
│ │ │ -
501 * new pair instance.
│ │ │ -
502 * @return An iterator that points to the element with key of the
│ │ │ -
503 * std::pair built from @a __args (may or may not be that
│ │ │ -
504 * std::pair).
│ │ │ -
505 *
│ │ │ -
506 * This function is not concerned about whether the insertion took place,
│ │ │ -
507 * and thus does not return a boolean like the single-argument emplace()
│ │ │ -
508 * does. However, if insertion did not take place,
│ │ │ -
509 * this function has no effect.
│ │ │ -
510 * Note that the first parameter is only a hint and can potentially
│ │ │ -
511 * improve the performance of the insertion process. A bad hint would
│ │ │ -
512 * cause no gains in efficiency.
│ │ │ -
513 *
│ │ │ -
514 * See
│ │ │ -
515 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
516 * for more on @a hinting.
│ │ │ -
517 *
│ │ │ -
518 * Insertion requires amortized constant time.
│ │ │ -
519 */
│ │ │ -
520 template <typename... _Args>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
523 _Args&&... __args)
│ │ │ -
524 {
│ │ │ -
525 return _M_h.try_emplace(__hint, __k,
│ │ │ -
526 std::forward<_Args>(__args)...).first;
│ │ │ -
527 }
│ │ │ -
│ │ │ -
528
│ │ │ -
529 // move-capable overload
│ │ │ -
530 template <typename... _Args>
│ │ │ - │ │ │ - │ │ │ -
533 {
│ │ │ -
534 return _M_h.try_emplace(__hint, std::move(__k),
│ │ │ -
535 std::forward<_Args>(__args)...).first;
│ │ │ -
536 }
│ │ │ -
537#endif // C++17
│ │ │ -
538
│ │ │ -
539 ///@{
│ │ │ -
540 /**
│ │ │ -
541 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ -
542
│ │ │ -
543 * @param __x Pair to be inserted (see std::make_pair for easy
│ │ │ -
544 * creation of pairs).
│ │ │ -
545 *
│ │ │ -
546 * @return A pair, of which the first element is an iterator that
│ │ │ -
547 * points to the possibly inserted pair, and the second is
│ │ │ -
548 * a bool that is true if the pair was actually inserted.
│ │ │ -
549 *
│ │ │ -
550 * This function attempts to insert a (key, value) %pair into the
│ │ │ -
551 * %unordered_map. An %unordered_map relies on unique keys and thus a
│ │ │ -
552 * %pair is only inserted if its first element (the key) is not already
│ │ │ -
553 * present in the %unordered_map.
│ │ │ -
554 *
│ │ │ -
555 * Insertion requires amortized constant time.
│ │ │ -
556 */
│ │ │ - │ │ │ -
│ │ │ -
558 insert(const value_type& __x)
│ │ │ -
559 { return _M_h.insert(__x); }
│ │ │ -
│ │ │ -
560
│ │ │ -
561 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
562 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
565 { return _M_h.insert(std::move(__x)); }
│ │ │ -
│ │ │ -
566
│ │ │ -
567 template<typename _Pair>
│ │ │ - │ │ │ - │ │ │ +
246 _Self&
│ │ │ +
247 operator++() noexcept
│ │ │ +
248 {
│ │ │ +
249 _M_node = _M_node->_M_next;
│ │ │ +
250 return *this;
│ │ │ +
251 }
│ │ │ +
252
│ │ │ +
253 _Self
│ │ │ +
254 operator++(int) noexcept
│ │ │ +
255 {
│ │ │ +
256 _Self __tmp(*this);
│ │ │ +
257 _M_node = _M_node->_M_next;
│ │ │ +
258 return __tmp;
│ │ │ +
259 }
│ │ │ +
260
│ │ │ +
261 /**
│ │ │ +
262 * @brief Forward list const_iterator equality comparison.
│ │ │ +
263 */
│ │ │ +
264 [[__nodiscard__]]
│ │ │ +
265 friend bool
│ │ │ +
│ │ │ +
266 operator==(const _Self& __x, const _Self& __y) noexcept
│ │ │ +
267 { return __x._M_node == __y._M_node; }
│ │ │ +
│ │ │ +
268
│ │ │ +
269#if __cpp_impl_three_way_comparison < 201907L
│ │ │ +
270 /**
│ │ │ +
271 * @brief Forward list const_iterator inequality comparison.
│ │ │ +
272 */
│ │ │ +
273 [[__nodiscard__]]
│ │ │ +
274 friend bool
│ │ │ +
275 operator!=(const _Self& __x, const _Self& __y) noexcept
│ │ │ +
276 { return __x._M_node != __y._M_node; }
│ │ │ +
277#endif
│ │ │ +
278
│ │ │ +
279 _Self
│ │ │ +
280 _M_next() const noexcept
│ │ │ +
281 {
│ │ │ +
282 if (this->_M_node)
│ │ │ +
283 return _Fwd_list_const_iterator(_M_node->_M_next);
│ │ │ +
284 else
│ │ │ +
285 return _Fwd_list_const_iterator(nullptr);
│ │ │ +
286 }
│ │ │ +
287
│ │ │ +
288 const _Fwd_list_node_base* _M_node;
│ │ │ +
289 };
│ │ │ +
│ │ │ +
290
│ │ │ +
291 /**
│ │ │ +
292 * @brief Base class for %forward_list.
│ │ │ +
293 */
│ │ │ +
294 template<typename _Tp, typename _Alloc>
│ │ │ +
│ │ │ + │ │ │ +
296 {
│ │ │ +
297 protected:
│ │ │ +
298 typedef __alloc_rebind<_Alloc, _Fwd_list_node<_Tp>> _Node_alloc_type;
│ │ │ + │ │ │ +
300
│ │ │ +
301 struct _Fwd_list_impl
│ │ │ +
302 : public _Node_alloc_type
│ │ │ +
303 {
│ │ │ +
304 _Fwd_list_node_base _M_head;
│ │ │ +
305
│ │ │ +
306 _Fwd_list_impl()
│ │ │ + │ │ │ +
308 : _Node_alloc_type(), _M_head()
│ │ │ +
309 { }
│ │ │ +
310
│ │ │ +
311 _Fwd_list_impl(_Fwd_list_impl&&) = default;
│ │ │ +
312
│ │ │ +
313 _Fwd_list_impl(_Fwd_list_impl&& __fl, _Node_alloc_type&& __a)
│ │ │ +
314 : _Node_alloc_type(std::move(__a)), _M_head(std::move(__fl._M_head))
│ │ │ +
315 { }
│ │ │ +
316
│ │ │ +
317 _Fwd_list_impl(_Node_alloc_type&& __a)
│ │ │ +
318 : _Node_alloc_type(std::move(__a)), _M_head()
│ │ │ +
319 { }
│ │ │ +
320 };
│ │ │ +
321
│ │ │ +
322 _Fwd_list_impl _M_impl;
│ │ │ +
323
│ │ │ +
324 public:
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
328
│ │ │ +
329 _Node_alloc_type&
│ │ │ +
330 _M_get_Node_allocator() noexcept
│ │ │ +
331 { return this->_M_impl; }
│ │ │ +
332
│ │ │ +
333 const _Node_alloc_type&
│ │ │ +
334 _M_get_Node_allocator() const noexcept
│ │ │ +
335 { return this->_M_impl; }
│ │ │ +
336
│ │ │ +
337 _Fwd_list_base() = default;
│ │ │ +
338
│ │ │ +
339 _Fwd_list_base(_Node_alloc_type&& __a)
│ │ │ +
340 : _M_impl(std::move(__a)) { }
│ │ │ +
341
│ │ │ +
342 // When allocators are always equal.
│ │ │ +
343 _Fwd_list_base(_Fwd_list_base&& __lst, _Node_alloc_type&& __a,
│ │ │ + │ │ │ +
345 : _M_impl(std::move(__lst._M_impl), std::move(__a))
│ │ │ +
346 { }
│ │ │ +
347
│ │ │ +
348 // When allocators are not always equal.
│ │ │ +
349 _Fwd_list_base(_Fwd_list_base&& __lst, _Node_alloc_type&& __a);
│ │ │ +
350
│ │ │ +
351 _Fwd_list_base(_Fwd_list_base&&) = default;
│ │ │ +
352
│ │ │ + │ │ │ +
354 { _M_erase_after(&_M_impl._M_head, nullptr); }
│ │ │ +
355
│ │ │ +
356 protected:
│ │ │ +
357 _Node*
│ │ │ +
358 _M_get_node()
│ │ │ +
359 {
│ │ │ +
360 auto __ptr = _Node_alloc_traits::allocate(_M_get_Node_allocator(), 1);
│ │ │ +
361 return std::__to_address(__ptr);
│ │ │ +
362 }
│ │ │ +
363
│ │ │ +
364 template<typename... _Args>
│ │ │ +
365 _Node*
│ │ │ +
366 _M_create_node(_Args&&... __args)
│ │ │ +
367 {
│ │ │ +
368 _Node* __node = this->_M_get_node();
│ │ │ +
369 __try
│ │ │ +
370 {
│ │ │ +
371 ::new ((void*)__node) _Node;
│ │ │ +
372 _Node_alloc_traits::construct(_M_get_Node_allocator(),
│ │ │ +
373 __node->_M_valptr(),
│ │ │ + │ │ │ +
375 }
│ │ │ +
376 __catch(...)
│ │ │ +
377 {
│ │ │ +
378 this->_M_put_node(__node);
│ │ │ +
379 __throw_exception_again;
│ │ │ +
380 }
│ │ │ +
381 return __node;
│ │ │ +
382 }
│ │ │ +
383
│ │ │ +
384 template<typename... _Args>
│ │ │ + │ │ │ +
386 _M_insert_after(const_iterator __pos, _Args&&... __args);
│ │ │ +
387
│ │ │ +
388 void
│ │ │ +
389 _M_put_node(_Node* __p)
│ │ │ +
390 {
│ │ │ +
391 typedef typename _Node_alloc_traits::pointer _Ptr;
│ │ │ + │ │ │ +
393 _Node_alloc_traits::deallocate(_M_get_Node_allocator(), __ptr, 1);
│ │ │ +
394 }
│ │ │ +
395
│ │ │ + │ │ │ +
397 _M_erase_after(_Fwd_list_node_base* __pos);
│ │ │ +
398
│ │ │ + │ │ │ +
400 _M_erase_after(_Fwd_list_node_base* __pos,
│ │ │ +
401 _Fwd_list_node_base* __last);
│ │ │ +
402 };
│ │ │ +
│ │ │ +
403
│ │ │ +
404 /**
│ │ │ +
405 * @brief A standard container with linear time access to elements,
│ │ │ +
406 * and fixed time insertion/deletion at any point in the sequence.
│ │ │ +
407 *
│ │ │ +
408 * @ingroup sequences
│ │ │ +
409 * @headerfile forward_list
│ │ │ +
410 * @since C++11
│ │ │ +
411 *
│ │ │ +
412 * @tparam _Tp Type of element.
│ │ │ +
413 * @tparam _Alloc Allocator type, defaults to allocator<_Tp>.
│ │ │ +
414 *
│ │ │ +
415 * Meets the requirements of a <a href="tables.html#65">container</a>, a
│ │ │ +
416 * <a href="tables.html#67">sequence</a>, including the
│ │ │ +
417 * <a href="tables.html#68">optional sequence requirements</a> with the
│ │ │ +
418 * %exception of @c at and @c operator[].
│ │ │ +
419 *
│ │ │ +
420 * This is a @e singly @e linked %list. Traversal up the
│ │ │ +
421 * %list requires linear time, but adding and removing elements (or
│ │ │ +
422 * @e nodes) is done in constant time, regardless of where the
│ │ │ +
423 * change takes place. Unlike std::vector and std::deque,
│ │ │ +
424 * random-access iterators are not provided, so subscripting ( @c
│ │ │ +
425 * [] ) access is not allowed. For algorithms which only need
│ │ │ +
426 * sequential access, this lack makes no difference.
│ │ │ +
427 *
│ │ │ +
428 * Also unlike the other standard containers, std::forward_list provides
│ │ │ +
429 * specialized algorithms %unique to linked lists, such as
│ │ │ +
430 * splicing, sorting, and in-place reversal.
│ │ │ +
431 */
│ │ │ +
432 template<typename _Tp, typename _Alloc = allocator<_Tp>>
│ │ │ +
│ │ │ +
433 class forward_list : private _Fwd_list_base<_Tp, _Alloc>
│ │ │ +
434 {
│ │ │ +
435 static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value,
│ │ │ +
436 "std::forward_list must have a non-const, non-volatile value_type");
│ │ │ +
437#if __cplusplus > 201703L || defined __STRICT_ANSI__
│ │ │ + │ │ │ +
439 "std::forward_list must have the same value_type as its allocator");
│ │ │ +
440#endif
│ │ │ +
441
│ │ │ +
442 private:
│ │ │ + │ │ │ + │ │ │ +
445 typedef typename _Base::_Node _Node;
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
449
│ │ │ +
450 public:
│ │ │ +
451 // types:
│ │ │ +
452 typedef _Tp value_type;
│ │ │ +
453 typedef typename _Alloc_traits::pointer pointer;
│ │ │ +
454 typedef typename _Alloc_traits::const_pointer const_pointer;
│ │ │ +
455 typedef value_type& reference;
│ │ │ +
456 typedef const value_type& const_reference;
│ │ │ +
457
│ │ │ +
458 typedef typename _Base::iterator iterator;
│ │ │ +
459 typedef typename _Base::const_iterator const_iterator;
│ │ │ +
460 typedef std::size_t size_type;
│ │ │ +
461 typedef std::ptrdiff_t difference_type;
│ │ │ +
462 typedef _Alloc allocator_type;
│ │ │ +
463
│ │ │ +
464 // 23.3.4.2 construct/copy/destroy:
│ │ │ +
465
│ │ │ +
466 /**
│ │ │ +
467 * @brief Creates a %forward_list with no elements.
│ │ │ +
468 */
│ │ │ +
469 forward_list() = default;
│ │ │ +
470
│ │ │ +
471 /**
│ │ │ +
472 * @brief Creates a %forward_list with no elements.
│ │ │ +
473 * @param __al An allocator object.
│ │ │ +
474 */
│ │ │ +
475 explicit
│ │ │ +
│ │ │ +
476 forward_list(const _Alloc& __al) noexcept
│ │ │ + │ │ │ +
478 { }
│ │ │ +
│ │ │ +
479
│ │ │ +
480 /**
│ │ │ +
481 * @brief Copy constructor with allocator argument.
│ │ │ +
482 * @param __list Input list to copy.
│ │ │ +
483 * @param __al An allocator object.
│ │ │ +
484 */
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
488 { _M_range_initialize(__list.begin(), __list.end()); }
│ │ │ +
│ │ │ +
489
│ │ │ +
490 private:
│ │ │ +
491 forward_list(forward_list&& __list, _Node_alloc_type&& __al,
│ │ │ + │ │ │ +
493 : _Base(std::move(__list), std::move(__al))
│ │ │ +
494 {
│ │ │ +
495 // If __list is not empty it means its allocator is not equal to __a,
│ │ │ +
496 // so we need to move from each element individually.
│ │ │ + │ │ │ +
498 std::__make_move_if_noexcept_iterator(__list.begin()),
│ │ │ +
499 std::__make_move_if_noexcept_iterator(__list.end()));
│ │ │ +
500 }
│ │ │ +
501
│ │ │ +
502 forward_list(forward_list&& __list, _Node_alloc_type&& __al,
│ │ │ +
503 true_type)
│ │ │ +
504 noexcept
│ │ │ +
505 : _Base(std::move(__list), _Node_alloc_type(__al), true_type{})
│ │ │ +
506 { }
│ │ │ +
507
│ │ │ +
508 public:
│ │ │ +
509 /**
│ │ │ +
510 * @brief Move constructor with allocator argument.
│ │ │ +
511 * @param __list Input list to move.
│ │ │ +
512 * @param __al An allocator object.
│ │ │ +
513 */
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
516 noexcept(_Node_alloc_traits::_S_always_equal())
│ │ │ + │ │ │ +
518 typename _Node_alloc_traits::is_always_equal{})
│ │ │ +
519 { }
│ │ │ +
│ │ │ +
520
│ │ │ +
521 /**
│ │ │ +
522 * @brief Creates a %forward_list with default constructed elements.
│ │ │ +
523 * @param __n The number of elements to initially create.
│ │ │ +
524 * @param __al An allocator object.
│ │ │ +
525 *
│ │ │ +
526 * This constructor creates the %forward_list with @a __n default
│ │ │ +
527 * constructed elements.
│ │ │ +
528 */
│ │ │ +
529 explicit
│ │ │ +
│ │ │ +
530 forward_list(size_type __n, const _Alloc& __al = _Alloc())
│ │ │ + │ │ │ +
532 { _M_default_initialize(__n); }
│ │ │ +
│ │ │ +
533
│ │ │ +
534 /**
│ │ │ +
535 * @brief Creates a %forward_list with copies of an exemplar element.
│ │ │ +
536 * @param __n The number of elements to initially create.
│ │ │ +
537 * @param __value An element to copy.
│ │ │ +
538 * @param __al An allocator object.
│ │ │ +
539 *
│ │ │ +
540 * This constructor fills the %forward_list with @a __n copies of
│ │ │ +
541 * @a __value.
│ │ │ +
542 */
│ │ │ +
│ │ │ +
543 forward_list(size_type __n, const _Tp& __value,
│ │ │ +
544 const _Alloc& __al = _Alloc())
│ │ │ + │ │ │ +
546 { _M_fill_initialize(__n, __value); }
│ │ │ +
│ │ │ +
547
│ │ │ +
548 /**
│ │ │ +
549 * @brief Builds a %forward_list from a range.
│ │ │ +
550 * @param __first An input iterator.
│ │ │ +
551 * @param __last An input iterator.
│ │ │ +
552 * @param __al An allocator object.
│ │ │ +
553 *
│ │ │ +
554 * Create a %forward_list consisting of copies of the elements from
│ │ │ +
555 * [@a __first,@a __last). This is linear in N (where N is
│ │ │ +
556 * distance(@a __first,@a __last)).
│ │ │ +
557 */
│ │ │ +
558 template<typename _InputIterator,
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
561 const _Alloc& __al = _Alloc())
│ │ │ + │ │ │ +
563 { _M_range_initialize(__first, __last); }
│ │ │ +
│ │ │ +
564
│ │ │ +
565 /**
│ │ │ +
566 * @brief The %forward_list copy constructor.
│ │ │ +
567 * @param __list A %forward_list of identical element and allocator
│ │ │ +
568 * types.
│ │ │ +
569 */
│ │ │
│ │ │ - │ │ │ -
571 { return _M_h.emplace(std::forward<_Pair>(__x)); }
│ │ │ -
│ │ │ -
572 ///@}
│ │ │ -
573
│ │ │ -
574 ///@{
│ │ │ -
575 /**
│ │ │ -
576 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ -
577 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
578 * pair should be inserted.
│ │ │ -
579 * @param __x Pair to be inserted (see std::make_pair for easy creation
│ │ │ -
580 * of pairs).
│ │ │ -
581 * @return An iterator that points to the element with key of
│ │ │ -
582 * @a __x (may or may not be the %pair passed in).
│ │ │ -
583 *
│ │ │ -
584 * This function is not concerned about whether the insertion took place,
│ │ │ -
585 * and thus does not return a boolean like the single-argument insert()
│ │ │ -
586 * does. Note that the first parameter is only a hint and can
│ │ │ -
587 * potentially improve the performance of the insertion process. A bad
│ │ │ -
588 * hint would cause no gains in efficiency.
│ │ │ -
589 *
│ │ │ -
590 * See
│ │ │ -
591 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
592 * for more on @a hinting.
│ │ │ -
593 *
│ │ │ -
594 * Insertion requires amortized constant time.
│ │ │ -
595 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
598 { return _M_h.insert(__hint, __x); }
│ │ │ -
│ │ │ -
599
│ │ │ -
600 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
601 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
604 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ -
│ │ │ -
605
│ │ │ -
606 template<typename _Pair>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
609 { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); }
│ │ │ -
│ │ │ -
610 ///@}
│ │ │ -
611
│ │ │ -
612 /**
│ │ │ -
613 * @brief A template function that attempts to insert a range of
│ │ │ -
614 * elements.
│ │ │ -
615 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
616 * inserted.
│ │ │ -
617 * @param __last Iterator pointing to the end of the range.
│ │ │ -
618 *
│ │ │ -
619 * Complexity similar to that of the range constructor.
│ │ │ -
620 */
│ │ │ -
621 template<typename _InputIterator>
│ │ │ -
622 void
│ │ │ -
│ │ │ - │ │ │ -
624 { _M_h.insert(__first, __last); }
│ │ │ -
│ │ │ -
625
│ │ │ -
626 /**
│ │ │ -
627 * @brief Attempts to insert a list of elements into the %unordered_map.
│ │ │ -
628 * @param __l A std::initializer_list<value_type> of elements
│ │ │ -
629 * to be inserted.
│ │ │ -
630 *
│ │ │ -
631 * Complexity similar to that of the range constructor.
│ │ │ -
632 */
│ │ │ -
633 void
│ │ │ -
│ │ │ - │ │ │ -
635 { _M_h.insert(__l); }
│ │ │ -
│ │ │ -
636
│ │ │ -
637
│ │ │ -
638#if __cplusplus > 201402L
│ │ │ -
639 /**
│ │ │ -
640 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ -
641 * @param __k Key to use for finding a possibly existing pair in
│ │ │ -
642 * the map.
│ │ │ -
643 * @param __obj Argument used to generate the .second for a pair
│ │ │ -
644 * instance.
│ │ │ -
645 *
│ │ │ -
646 * @return A pair, of which the first element is an iterator that
│ │ │ -
647 * points to the possibly inserted pair, and the second is
│ │ │ -
648 * a bool that is true if the pair was actually inserted.
│ │ │ -
649 *
│ │ │ -
650 * This function attempts to insert a (key, value) %pair into the
│ │ │ -
651 * %unordered_map. An %unordered_map relies on unique keys and thus a
│ │ │ -
652 * %pair is only inserted if its first element (the key) is not already
│ │ │ -
653 * present in the %unordered_map.
│ │ │ -
654 * If the %pair was already in the %unordered_map, the .second of
│ │ │ -
655 * the %pair is assigned from __obj.
│ │ │ -
656 *
│ │ │ -
657 * Insertion requires amortized constant time.
│ │ │ -
658 */
│ │ │ -
659 template <typename _Obj>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
662 {
│ │ │ -
663 auto __ret = _M_h.try_emplace(cend(), __k,
│ │ │ - │ │ │ -
665 if (!__ret.second)
│ │ │ -
666 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ -
667 return __ret;
│ │ │ -
668 }
│ │ │ -
│ │ │ -
669
│ │ │ -
670 // move-capable overload
│ │ │ -
671 template <typename _Obj>
│ │ │ - │ │ │ - │ │ │ -
674 {
│ │ │ -
675 auto __ret = _M_h.try_emplace(cend(), std::move(__k),
│ │ │ - │ │ │ -
677 if (!__ret.second)
│ │ │ -
678 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ -
679 return __ret;
│ │ │ -
680 }
│ │ │ -
681
│ │ │ -
682 /**
│ │ │ -
683 * @brief Attempts to insert a std::pair into the %unordered_map.
│ │ │ -
684 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
685 * pair should be inserted.
│ │ │ -
686 * @param __k Key to use for finding a possibly existing pair in
│ │ │ -
687 * the unordered_map.
│ │ │ -
688 * @param __obj Argument used to generate the .second for a pair
│ │ │ -
689 * instance.
│ │ │ -
690 * @return An iterator that points to the element with key of
│ │ │ -
691 * @a __x (may or may not be the %pair passed in).
│ │ │ -
692 *
│ │ │ -
693 * This function is not concerned about whether the insertion took place,
│ │ │ -
694 * and thus does not return a boolean like the single-argument insert()
│ │ │ -
695 * does.
│ │ │ -
696 * If the %pair was already in the %unordered map, the .second of
│ │ │ -
697 * the %pair is assigned from __obj.
│ │ │ -
698 * Note that the first parameter is only a hint and can
│ │ │ -
699 * potentially improve the performance of the insertion process. A bad
│ │ │ -
700 * hint would cause no gains in efficiency.
│ │ │ -
701 *
│ │ │ -
702 * See
│ │ │ -
703 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
704 * for more on @a hinting.
│ │ │ -
705 *
│ │ │ -
706 * Insertion requires amortized constant time.
│ │ │ -
707 */
│ │ │ -
708 template <typename _Obj>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
711 _Obj&& __obj)
│ │ │ -
712 {
│ │ │ -
713 auto __ret = _M_h.try_emplace(__hint, __k, std::forward<_Obj>(__obj));
│ │ │ -
714 if (!__ret.second)
│ │ │ -
715 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ -
716 return __ret.first;
│ │ │ -
717 }
│ │ │ -
│ │ │ -
718
│ │ │ -
719 // move-capable overload
│ │ │ -
720 template <typename _Obj>
│ │ │ - │ │ │ - │ │ │ -
723 {
│ │ │ -
724 auto __ret = _M_h.try_emplace(__hint, std::move(__k),
│ │ │ - │ │ │ -
726 if (!__ret.second)
│ │ │ -
727 __ret.first->second = std::forward<_Obj>(__obj);
│ │ │ -
728 return __ret.first;
│ │ │ -
729 }
│ │ │ -
730#endif
│ │ │ -
731
│ │ │ -
732 ///@{
│ │ │ -
733 /**
│ │ │ -
734 * @brief Erases an element from an %unordered_map.
│ │ │ -
735 * @param __position An iterator pointing to the element to be erased.
│ │ │ -
736 * @return An iterator pointing to the element immediately following
│ │ │ -
737 * @a __position prior to the element being erased. If no such
│ │ │ -
738 * element exists, end() is returned.
│ │ │ -
739 *
│ │ │ -
740 * This function erases an element, pointed to by the given iterator,
│ │ │ -
741 * from an %unordered_map.
│ │ │ -
742 * Note that this function only erases the element, and that if the
│ │ │ -
743 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
744 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
745 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
748 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
749
│ │ │ -
750 // LWG 2059.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
753 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
754 ///@}
│ │ │ -
755
│ │ │ -
756 /**
│ │ │ -
757 * @brief Erases elements according to the provided key.
│ │ │ -
758 * @param __x Key of element to be erased.
│ │ │ -
759 * @return The number of elements erased.
│ │ │ -
760 *
│ │ │ -
761 * This function erases all the elements located by the given key from
│ │ │ -
762 * an %unordered_map. For an %unordered_map the result of this function
│ │ │ -
763 * can only be 0 (not present) or 1 (present).
│ │ │ -
764 * Note that this function only erases the element, and that if the
│ │ │ -
765 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
766 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
767 */
│ │ │ - │ │ │ -
│ │ │ -
769 erase(const key_type& __x)
│ │ │ -
770 { return _M_h.erase(__x); }
│ │ │ -
│ │ │ -
771
│ │ │ -
772 /**
│ │ │ -
773 * @brief Erases a [__first,__last) range of elements from an
│ │ │ -
774 * %unordered_map.
│ │ │ -
775 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
776 * erased.
│ │ │ -
777 * @param __last Iterator pointing to the end of the range to
│ │ │ -
778 * be erased.
│ │ │ -
779 * @return The iterator @a __last.
│ │ │ -
780 *
│ │ │ -
781 * This function erases a sequence of elements from an %unordered_map.
│ │ │ -
782 * Note that this function only erases the elements, and that if
│ │ │ -
783 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
784 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
785 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
788 { return _M_h.erase(__first, __last); }
│ │ │ -
│ │ │ -
789
│ │ │ -
790 /**
│ │ │ -
791 * Erases all elements in an %unordered_map.
│ │ │ -
792 * Note that this function only erases the elements, and that if the
│ │ │ -
793 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ -
794 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
795 */
│ │ │ -
796 void
│ │ │ -
│ │ │ -
797 clear() noexcept
│ │ │ -
798 { _M_h.clear(); }
│ │ │ -
│ │ │ -
799
│ │ │ -
800 /**
│ │ │ -
801 * @brief Swaps data with another %unordered_map.
│ │ │ -
802 * @param __x An %unordered_map of the same element and allocator
│ │ │ -
803 * types.
│ │ │ -
804 *
│ │ │ -
805 * This exchanges the elements between two %unordered_map in constant
│ │ │ -
806 * time.
│ │ │ -
807 * Note that the global std::swap() function is specialized such that
│ │ │ -
808 * std::swap(m1,m2) will feed to this function.
│ │ │ -
809 */
│ │ │ -
810 void
│ │ │ + │ │ │ +
571 : _Base(_Node_alloc_traits::_S_select_on_copy(
│ │ │ +
572 __list._M_get_Node_allocator()))
│ │ │ +
573 { _M_range_initialize(__list.begin(), __list.end()); }
│ │ │ +
│ │ │ +
574
│ │ │ +
575 /**
│ │ │ +
576 * @brief The %forward_list move constructor.
│ │ │ +
577 * @param __list A %forward_list of identical element and allocator
│ │ │ +
578 * types.
│ │ │ +
579 *
│ │ │ +
580 * The newly-created %forward_list contains the exact contents of the
│ │ │ +
581 * moved instance. The contents of the moved instance are a valid, but
│ │ │ +
582 * unspecified %forward_list.
│ │ │ +
583 */
│ │ │ + │ │ │ +
585
│ │ │ +
586 /**
│ │ │ +
587 * @brief Builds a %forward_list from an initializer_list
│ │ │ +
588 * @param __il An initializer_list of value_type.
│ │ │ +
589 * @param __al An allocator object.
│ │ │ +
590 *
│ │ │ +
591 * Create a %forward_list consisting of copies of the elements
│ │ │ +
592 * in the initializer_list @a __il. This is linear in __il.size().
│ │ │ +
593 */
│ │ │ +
│ │ │ + │ │ │ +
595 const _Alloc& __al = _Alloc())
│ │ │ + │ │ │ +
597 { _M_range_initialize(__il.begin(), __il.end()); }
│ │ │ +
│ │ │ +
598
│ │ │ +
599 /**
│ │ │ +
600 * @brief The forward_list dtor.
│ │ │ +
601 */
│ │ │ +
│ │ │ +
602 ~forward_list() noexcept
│ │ │ +
603 { }
│ │ │ +
│ │ │ +
604
│ │ │ +
605 /**
│ │ │ +
606 * @brief The %forward_list assignment operator.
│ │ │ +
607 * @param __list A %forward_list of identical element and allocator
│ │ │ +
608 * types.
│ │ │ +
609 *
│ │ │ +
610 * All the elements of @a __list are copied.
│ │ │ +
611 *
│ │ │ +
612 * Whether the allocator is copied depends on the allocator traits.
│ │ │ +
613 */
│ │ │ + │ │ │ + │ │ │ +
616
│ │ │ +
617 /**
│ │ │ +
618 * @brief The %forward_list move assignment operator.
│ │ │ +
619 * @param __list A %forward_list of identical element and allocator
│ │ │ +
620 * types.
│ │ │ +
621 *
│ │ │ +
622 * The contents of @a __list are moved into this %forward_list
│ │ │ +
623 * (without copying, if the allocators permit it).
│ │ │ +
624 *
│ │ │ +
625 * Afterwards @a __list is a valid, but unspecified %forward_list
│ │ │ +
626 *
│ │ │ +
627 * Whether the allocator is moved depends on the allocator traits.
│ │ │ +
628 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
631 noexcept(_Node_alloc_traits::_S_nothrow_move())
│ │ │ +
632 {
│ │ │ +
633 constexpr bool __move_storage =
│ │ │ +
634 _Node_alloc_traits::_S_propagate_on_move_assign()
│ │ │ +
635 || _Node_alloc_traits::_S_always_equal();
│ │ │ + │ │ │ +
637 return *this;
│ │ │ +
638 }
│ │ │ +
│ │ │ +
639
│ │ │ +
640 /**
│ │ │ +
641 * @brief The %forward_list initializer list assignment operator.
│ │ │ +
642 * @param __il An initializer_list of value_type.
│ │ │ +
643 *
│ │ │ +
644 * Replace the contents of the %forward_list with copies of the
│ │ │ +
645 * elements in the initializer_list @a __il. This is linear in
│ │ │ +
646 * __il.size().
│ │ │ +
647 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
650 {
│ │ │ +
651 assign(__il);
│ │ │ +
652 return *this;
│ │ │ +
653 }
│ │ │ +
│ │ │ +
654
│ │ │ +
655 /**
│ │ │ +
656 * @brief Assigns a range to a %forward_list.
│ │ │ +
657 * @param __first An input iterator.
│ │ │ +
658 * @param __last An input iterator.
│ │ │ +
659 *
│ │ │ +
660 * This function fills a %forward_list with copies of the elements
│ │ │ +
661 * in the range [@a __first,@a __last).
│ │ │ +
662 *
│ │ │ +
663 * Note that the assignment completely changes the %forward_list and
│ │ │ +
664 * that the number of elements of the resulting %forward_list is the
│ │ │ +
665 * same as the number of elements assigned.
│ │ │ +
666 */
│ │ │ +
667 template<typename _InputIterator,
│ │ │ + │ │ │ +
669 void
│ │ │ +
│ │ │ + │ │ │ +
671 {
│ │ │ +
672 typedef is_assignable<_Tp, decltype(*__first)> __assignable;
│ │ │ +
673 _M_assign(__first, __last, __assignable());
│ │ │ +
674 }
│ │ │ +
│ │ │ +
675
│ │ │ +
676 /**
│ │ │ +
677 * @brief Assigns a given value to a %forward_list.
│ │ │ +
678 * @param __n Number of elements to be assigned.
│ │ │ +
679 * @param __val Value to be assigned.
│ │ │ +
680 *
│ │ │ +
681 * This function fills a %forward_list with @a __n copies of the
│ │ │ +
682 * given value. Note that the assignment completely changes the
│ │ │ +
683 * %forward_list, and that the resulting %forward_list has __n
│ │ │ +
684 * elements.
│ │ │ +
685 */
│ │ │ +
686 void
│ │ │ +
│ │ │ +
687 assign(size_type __n, const _Tp& __val)
│ │ │ +
688 { _M_assign_n(__n, __val, is_copy_assignable<_Tp>()); }
│ │ │ +
│ │ │ +
689
│ │ │ +
690 /**
│ │ │ +
691 * @brief Assigns an initializer_list to a %forward_list.
│ │ │ +
692 * @param __il An initializer_list of value_type.
│ │ │ +
693 *
│ │ │ +
694 * Replace the contents of the %forward_list with copies of the
│ │ │ +
695 * elements in the initializer_list @a __il. This is linear in
│ │ │ +
696 * il.size().
│ │ │ +
697 */
│ │ │ +
698 void
│ │ │ +
│ │ │ + │ │ │ +
700 { assign(__il.begin(), __il.end()); }
│ │ │ +
│ │ │ +
701
│ │ │ +
702 /// Get a copy of the memory allocation object.
│ │ │ +
703 allocator_type
│ │ │ +
│ │ │ +
704 get_allocator() const noexcept
│ │ │ +
705 { return allocator_type(this->_M_get_Node_allocator()); }
│ │ │ +
│ │ │ +
706
│ │ │ +
707 // 23.3.4.3 iterators:
│ │ │ +
708
│ │ │ +
709 /**
│ │ │ +
710 * Returns a read/write iterator that points before the first element
│ │ │ +
711 * in the %forward_list. Iteration is done in ordinary element order.
│ │ │ +
712 */
│ │ │ +
713 [[__nodiscard__]]
│ │ │ + │ │ │ +
│ │ │ +
715 before_begin() noexcept
│ │ │ +
716 { return iterator(&this->_M_impl._M_head); }
│ │ │ +
│ │ │ +
717
│ │ │ +
718 /**
│ │ │ +
719 * Returns a read-only (constant) iterator that points before the
│ │ │ +
720 * first element in the %forward_list. Iteration is done in ordinary
│ │ │ +
721 * element order.
│ │ │ +
722 */
│ │ │ +
723 [[__nodiscard__]]
│ │ │ +
724 const_iterator
│ │ │ +
│ │ │ +
725 before_begin() const noexcept
│ │ │ +
726 { return const_iterator(&this->_M_impl._M_head); }
│ │ │ +
│ │ │ +
727
│ │ │ +
728 /**
│ │ │ +
729 * Returns a read/write iterator that points to the first element
│ │ │ +
730 * in the %forward_list. Iteration is done in ordinary element order.
│ │ │ +
731 */
│ │ │ +
732 [[__nodiscard__]]
│ │ │ + │ │ │ +
│ │ │ +
734 begin() noexcept
│ │ │ +
735 { return iterator(this->_M_impl._M_head._M_next); }
│ │ │ +
│ │ │ +
736
│ │ │ +
737 /**
│ │ │ +
738 * Returns a read-only (constant) iterator that points to the first
│ │ │ +
739 * element in the %forward_list. Iteration is done in ordinary
│ │ │ +
740 * element order.
│ │ │ +
741 */
│ │ │ +
742 [[__nodiscard__]]
│ │ │ +
743 const_iterator
│ │ │ +
│ │ │ +
744 begin() const noexcept
│ │ │ +
745 { return const_iterator(this->_M_impl._M_head._M_next); }
│ │ │ +
│ │ │ +
746
│ │ │ +
747 /**
│ │ │ +
748 * Returns a read/write iterator that points one past the last
│ │ │ +
749 * element in the %forward_list. Iteration is done in ordinary
│ │ │ +
750 * element order.
│ │ │ +
751 */
│ │ │ +
752 [[__nodiscard__]]
│ │ │ + │ │ │ +
│ │ │ +
754 end() noexcept
│ │ │ +
755 { return iterator(nullptr); }
│ │ │ +
│ │ │ +
756
│ │ │ +
757 /**
│ │ │ +
758 * Returns a read-only iterator that points one past the last
│ │ │ +
759 * element in the %forward_list. Iteration is done in ordinary
│ │ │ +
760 * element order.
│ │ │ +
761 */
│ │ │ +
762 [[__nodiscard__]]
│ │ │ +
763 const_iterator
│ │ │ +
│ │ │ +
764 end() const noexcept
│ │ │ +
765 { return const_iterator(nullptr); }
│ │ │ +
│ │ │ +
766
│ │ │ +
767 /**
│ │ │ +
768 * Returns a read-only (constant) iterator that points to the
│ │ │ +
769 * first element in the %forward_list. Iteration is done in ordinary
│ │ │ +
770 * element order.
│ │ │ +
771 */
│ │ │ +
772 [[__nodiscard__]]
│ │ │ +
773 const_iterator
│ │ │ +
│ │ │ +
774 cbegin() const noexcept
│ │ │ +
775 { return const_iterator(this->_M_impl._M_head._M_next); }
│ │ │ +
│ │ │ +
776
│ │ │ +
777 /**
│ │ │ +
778 * Returns a read-only (constant) iterator that points before the
│ │ │ +
779 * first element in the %forward_list. Iteration is done in ordinary
│ │ │ +
780 * element order.
│ │ │ +
781 */
│ │ │ +
782 [[__nodiscard__]]
│ │ │ +
783 const_iterator
│ │ │ +
│ │ │ +
784 cbefore_begin() const noexcept
│ │ │ +
785 { return const_iterator(&this->_M_impl._M_head); }
│ │ │ +
│ │ │ +
786
│ │ │ +
787 /**
│ │ │ +
788 * Returns a read-only (constant) iterator that points one past
│ │ │ +
789 * the last element in the %forward_list. Iteration is done in
│ │ │ +
790 * ordinary element order.
│ │ │ +
791 */
│ │ │ +
792 [[__nodiscard__]]
│ │ │ +
793 const_iterator
│ │ │ +
│ │ │ +
794 cend() const noexcept
│ │ │ +
795 { return const_iterator(nullptr); }
│ │ │ +
│ │ │ +
796
│ │ │ +
797 /**
│ │ │ +
798 * Returns true if the %forward_list is empty. (Thus begin() would
│ │ │ +
799 * equal end().)
│ │ │ +
800 */
│ │ │ +
801 [[__nodiscard__]]
│ │ │ +
802 bool
│ │ │ +
│ │ │ +
803 empty() const noexcept
│ │ │ +
804 { return this->_M_impl._M_head._M_next == nullptr; }
│ │ │ +
│ │ │ +
805
│ │ │ +
806 /**
│ │ │ +
807 * Returns the largest possible number of elements of %forward_list.
│ │ │ +
808 */
│ │ │ +
809 [[__nodiscard__]]
│ │ │ +
810 size_type
│ │ │
│ │ │ - │ │ │ -
812 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ -
813 { _M_h.swap(__x._M_h); }
│ │ │ -
│ │ │ -
814
│ │ │ -
815#if __cplusplus > 201402L
│ │ │ -
816 template<typename, typename, typename>
│ │ │ -
817 friend class std::_Hash_merge_helper;
│ │ │ -
818
│ │ │ -
819 template<typename _H2, typename _P2>
│ │ │ -
820 void
│ │ │ - │ │ │ -
822 {
│ │ │ - │ │ │ -
824 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ -
825 }
│ │ │ -
826
│ │ │ -
827 template<typename _H2, typename _P2>
│ │ │ -
828 void
│ │ │ -
829 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ -
830 { merge(__source); }
│ │ │ -
831
│ │ │ -
832 template<typename _H2, typename _P2>
│ │ │ -
833 void
│ │ │ -
834 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source)
│ │ │ -
835 {
│ │ │ -
836 using _Merge_helper = _Hash_merge_helper<unordered_map, _H2, _P2>;
│ │ │ -
837 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source));
│ │ │ -
838 }
│ │ │ +
811 max_size() const noexcept
│ │ │ +
812 { return _Node_alloc_traits::max_size(this->_M_get_Node_allocator()); }
│ │ │ +
│ │ │ +
813
│ │ │ +
814 // 23.3.4.4 element access:
│ │ │ +
815
│ │ │ +
816 /**
│ │ │ +
817 * Returns a read/write reference to the data at the first
│ │ │ +
818 * element of the %forward_list.
│ │ │ +
819 */
│ │ │ +
820 [[__nodiscard__]]
│ │ │ +
821 reference
│ │ │ +
│ │ │ + │ │ │ +
823 {
│ │ │ +
824 _Node* __front = static_cast<_Node*>(this->_M_impl._M_head._M_next);
│ │ │ +
825 return *__front->_M_valptr();
│ │ │ +
826 }
│ │ │ +
│ │ │ +
827
│ │ │ +
828 /**
│ │ │ +
829 * Returns a read-only (constant) reference to the data at the first
│ │ │ +
830 * element of the %forward_list.
│ │ │ +
831 */
│ │ │ +
832 [[__nodiscard__]]
│ │ │ +
833 const_reference
│ │ │ +
│ │ │ +
834 front() const
│ │ │ +
835 {
│ │ │ +
836 _Node* __front = static_cast<_Node*>(this->_M_impl._M_head._M_next);
│ │ │ +
837 return *__front->_M_valptr();
│ │ │ +
838 }
│ │ │ +
│ │ │
839
│ │ │ -
840 template<typename _H2, typename _P2>
│ │ │ -
841 void
│ │ │ -
842 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ -
843 { merge(__source); }
│ │ │ -
844#endif // C++17
│ │ │ -
845
│ │ │ -
846 // observers.
│ │ │ -
847
│ │ │ -
848 /// Returns the hash functor object with which the %unordered_map was
│ │ │ -
849 /// constructed.
│ │ │ -
850 hasher
│ │ │ -
│ │ │ - │ │ │ -
852 { return _M_h.hash_function(); }
│ │ │ -
│ │ │ -
853
│ │ │ -
854 /// Returns the key comparison object with which the %unordered_map was
│ │ │ -
855 /// constructed.
│ │ │ - │ │ │ -
│ │ │ -
857 key_eq() const
│ │ │ -
858 { return _M_h.key_eq(); }
│ │ │ -
│ │ │ -
859
│ │ │ -
860 // lookup.
│ │ │ -
861
│ │ │ -
862 ///@{
│ │ │ -
863 /**
│ │ │ -
864 * @brief Tries to locate an element in an %unordered_map.
│ │ │ -
865 * @param __x Key to be located.
│ │ │ -
866 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ -
867 * found.
│ │ │ -
868 *
│ │ │ -
869 * This function takes a key and tries to locate the element with which
│ │ │ -
870 * the key matches. If successful the function returns an iterator
│ │ │ -
871 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ -
872 * past-the-end ( @c end() ) iterator.
│ │ │ -
873 */
│ │ │ - │ │ │ -
│ │ │ -
875 find(const key_type& __x)
│ │ │ -
876 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
877
│ │ │ -
878#if __cplusplus > 201703L
│ │ │ -
879 template<typename _Kt>
│ │ │ -
880 auto
│ │ │ -
│ │ │ -
881 find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
882 { return _M_h._M_find_tr(__x); }
│ │ │ -
│ │ │ -
883#endif
│ │ │ -
884
│ │ │ - │ │ │ -
│ │ │ -
886 find(const key_type& __x) const
│ │ │ -
887 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
888
│ │ │ -
889#if __cplusplus > 201703L
│ │ │ -
890 template<typename _Kt>
│ │ │ -
891 auto
│ │ │ -
│ │ │ -
892 find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
893 { return _M_h._M_find_tr(__x); }
│ │ │ -
│ │ │ -
894#endif
│ │ │ -
895 ///@}
│ │ │ -
896
│ │ │ -
897 ///@{
│ │ │ -
898 /**
│ │ │ -
899 * @brief Finds the number of elements.
│ │ │ -
900 * @param __x Key to count.
│ │ │ -
901 * @return Number of elements with specified key.
│ │ │ -
902 *
│ │ │ -
903 * This function only makes sense for %unordered_multimap; for
│ │ │ -
904 * %unordered_map the result will either be 0 (not present) or 1
│ │ │ -
905 * (present).
│ │ │ -
906 */
│ │ │ - │ │ │ -
│ │ │ -
908 count(const key_type& __x) const
│ │ │ -
909 { return _M_h.count(__x); }
│ │ │ -
│ │ │ -
910
│ │ │ -
911#if __cplusplus > 201703L
│ │ │ -
912 template<typename _Kt>
│ │ │ -
913 auto
│ │ │ -
│ │ │ -
914 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ -
915 { return _M_h._M_count_tr(__x); }
│ │ │ -
│ │ │ -
916#endif
│ │ │ -
917 ///@}
│ │ │ -
918
│ │ │ -
919#if __cplusplus > 201703L
│ │ │ -
920 ///@{
│ │ │ -
921 /**
│ │ │ -
922 * @brief Finds whether an element with the given key exists.
│ │ │ -
923 * @param __x Key of elements to be located.
│ │ │ -
924 * @return True if there is any element with the specified key.
│ │ │ -
925 */
│ │ │ -
926 bool
│ │ │ -
│ │ │ -
927 contains(const key_type& __x) const
│ │ │ -
928 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ -
│ │ │ -
929
│ │ │ -
930 template<typename _Kt>
│ │ │ -
931 auto
│ │ │ -
│ │ │ -
932 contains(const _Kt& __x) const
│ │ │ -
933 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ -
934 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ -
│ │ │ -
935 ///@}
│ │ │ -
936#endif
│ │ │ -
937
│ │ │ -
938 ///@{
│ │ │ -
939 /**
│ │ │ -
940 * @brief Finds a subsequence matching given key.
│ │ │ -
941 * @param __x Key to be located.
│ │ │ -
942 * @return Pair of iterators that possibly points to the subsequence
│ │ │ -
943 * matching given key.
│ │ │ -
944 *
│ │ │ -
945 * This function probably only makes sense for %unordered_multimap.
│ │ │ -
946 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
949 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
950
│ │ │ -
951#if __cplusplus > 201703L
│ │ │ -
952 template<typename _Kt>
│ │ │ -
953 auto
│ │ │ -
│ │ │ -
954 equal_range(const _Kt& __x)
│ │ │ -
955 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
956 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
│ │ │ -
957#endif
│ │ │ -
958
│ │ │ - │ │ │ -
│ │ │ -
960 equal_range(const key_type& __x) const
│ │ │ -
961 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
962
│ │ │ -
963#if __cplusplus > 201703L
│ │ │ -
964 template<typename _Kt>
│ │ │ -
965 auto
│ │ │ -
│ │ │ -
966 equal_range(const _Kt& __x) const
│ │ │ -
967 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
968 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
│ │ │ -
969#endif
│ │ │ -
970 ///@}
│ │ │ -
971
│ │ │ -
972 ///@{
│ │ │ -
973 /**
│ │ │ -
974 * @brief Subscript ( @c [] ) access to %unordered_map data.
│ │ │ -
975 * @param __k The key for which data should be retrieved.
│ │ │ -
976 * @return A reference to the data of the (key,data) %pair.
│ │ │ -
977 *
│ │ │ -
978 * Allows for easy lookup with the subscript ( @c [] )operator. Returns
│ │ │ -
979 * data associated with the key specified in subscript. If the key does
│ │ │ -
980 * not exist, a pair with that key is created using default values, which
│ │ │ -
981 * is then returned.
│ │ │ -
982 *
│ │ │ -
983 * Lookup requires constant time.
│ │ │ -
984 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
987 { return _M_h[__k]; }
│ │ │ -
│ │ │ -
988
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
991 { return _M_h[std::move(__k)]; }
│ │ │ -
│ │ │ -
992 ///@}
│ │ │ -
993
│ │ │ -
994 ///@{
│ │ │ -
995 /**
│ │ │ -
996 * @brief Access to %unordered_map data.
│ │ │ -
997 * @param __k The key for which data should be retrieved.
│ │ │ -
998 * @return A reference to the data whose key is equal to @a __k, if
│ │ │ -
999 * such a data is present in the %unordered_map.
│ │ │ -
1000 * @throw std::out_of_range If no such data is present.
│ │ │ -
1001 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1004 { return _M_h.at(__k); }
│ │ │ -
│ │ │ -
1005
│ │ │ -
1006 const mapped_type&
│ │ │ -
│ │ │ -
1007 at(const key_type& __k) const
│ │ │ -
1008 { return _M_h.at(__k); }
│ │ │ -
│ │ │ -
1009 ///@}
│ │ │ -
1010
│ │ │ -
1011 // bucket interface.
│ │ │ -
1012
│ │ │ -
1013 /// Returns the number of buckets of the %unordered_map.
│ │ │ -
1014 size_type
│ │ │ -
│ │ │ -
1015 bucket_count() const noexcept
│ │ │ -
1016 { return _M_h.bucket_count(); }
│ │ │ -
│ │ │ -
1017
│ │ │ -
1018 /// Returns the maximum number of buckets of the %unordered_map.
│ │ │ -
1019 size_type
│ │ │ -
│ │ │ -
1020 max_bucket_count() const noexcept
│ │ │ -
1021 { return _M_h.max_bucket_count(); }
│ │ │ -
│ │ │ -
1022
│ │ │ -
1023 /*
│ │ │ -
1024 * @brief Returns the number of elements in a given bucket.
│ │ │ -
1025 * @param __n A bucket index.
│ │ │ -
1026 * @return The number of elements in the bucket.
│ │ │ -
1027 */
│ │ │ -
1028 size_type
│ │ │ -
1029 bucket_size(size_type __n) const
│ │ │ -
1030 { return _M_h.bucket_size(__n); }
│ │ │ -
1031
│ │ │ -
1032 /*
│ │ │ -
1033 * @brief Returns the bucket index of a given element.
│ │ │ -
1034 * @param __key A key instance.
│ │ │ -
1035 * @return The key bucket index.
│ │ │ -
1036 */
│ │ │ -
1037 size_type
│ │ │ -
1038 bucket(const key_type& __key) const
│ │ │ -
1039 { return _M_h.bucket(__key); }
│ │ │ -
1040
│ │ │ -
1041 /**
│ │ │ -
1042 * @brief Returns a read/write iterator pointing to the first bucket
│ │ │ -
1043 * element.
│ │ │ -
1044 * @param __n The bucket index.
│ │ │ -
1045 * @return A read/write local iterator.
│ │ │ -
1046 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1049 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1050
│ │ │ -
1051 ///@{
│ │ │ -
1052 /**
│ │ │ -
1053 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ -
1054 * bucket element.
│ │ │ -
1055 * @param __n The bucket index.
│ │ │ -
1056 * @return A read-only local iterator.
│ │ │ -
1057 */
│ │ │ - │ │ │ -
│ │ │ -
1059 begin(size_type __n) const
│ │ │ -
1060 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1061
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1064 { return _M_h.cbegin(__n); }
│ │ │ -
│ │ │ -
1065 ///@}
│ │ │ -
1066
│ │ │ -
1067 /**
│ │ │ -
1068 * @brief Returns a read/write iterator pointing to one past the last
│ │ │ -
1069 * bucket elements.
│ │ │ -
1070 * @param __n The bucket index.
│ │ │ -
1071 * @return A read/write local iterator.
│ │ │ -
1072 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1075 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1076
│ │ │ -
1077 ///@{
│ │ │ -
1078 /**
│ │ │ -
1079 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ -
1080 * the last bucket elements.
│ │ │ -
1081 * @param __n The bucket index.
│ │ │ -
1082 * @return A read-only local iterator.
│ │ │ +
840 // 23.3.4.5 modifiers:
│ │ │ +
841
│ │ │ +
842 /**
│ │ │ +
843 * @brief Constructs object in %forward_list at the front of the
│ │ │ +
844 * list.
│ │ │ +
845 * @param __args Arguments.
│ │ │ +
846 *
│ │ │ +
847 * This function will insert an object of type Tp constructed
│ │ │ +
848 * with Tp(std::forward<Args>(args)...) at the front of the list
│ │ │ +
849 * Due to the nature of a %forward_list this operation can
│ │ │ +
850 * be done in constant time, and does not invalidate iterators
│ │ │ +
851 * and references.
│ │ │ +
852 */
│ │ │ +
853 template<typename... _Args>
│ │ │ +
854#if __cplusplus > 201402L
│ │ │ +
855 reference
│ │ │ +
856#else
│ │ │ +
857 void
│ │ │ +
858#endif
│ │ │ +
│ │ │ + │ │ │ +
860 {
│ │ │ +
861 this->_M_insert_after(cbefore_begin(),
│ │ │ + │ │ │ +
863#if __cplusplus > 201402L
│ │ │ +
864 return front();
│ │ │ +
865#endif
│ │ │ +
866 }
│ │ │ +
│ │ │ +
867
│ │ │ +
868 /**
│ │ │ +
869 * @brief Add data to the front of the %forward_list.
│ │ │ +
870 * @param __val Data to be added.
│ │ │ +
871 *
│ │ │ +
872 * This is a typical stack operation. The function creates an
│ │ │ +
873 * element at the front of the %forward_list and assigns the given
│ │ │ +
874 * data to it. Due to the nature of a %forward_list this operation
│ │ │ +
875 * can be done in constant time, and does not invalidate iterators
│ │ │ +
876 * and references.
│ │ │ +
877 */
│ │ │ +
878 void
│ │ │ +
│ │ │ +
879 push_front(const _Tp& __val)
│ │ │ +
880 { this->_M_insert_after(cbefore_begin(), __val); }
│ │ │ +
│ │ │ +
881
│ │ │ +
882 /**
│ │ │ +
883 *
│ │ │ +
884 */
│ │ │ +
885 void
│ │ │ +
886 push_front(_Tp&& __val)
│ │ │ +
887 { this->_M_insert_after(cbefore_begin(), std::move(__val)); }
│ │ │ +
888
│ │ │ +
889 /**
│ │ │ +
890 * @brief Removes first element.
│ │ │ +
891 *
│ │ │ +
892 * This is a typical stack operation. It shrinks the %forward_list
│ │ │ +
893 * by one. Due to the nature of a %forward_list this operation can
│ │ │ +
894 * be done in constant time, and only invalidates iterators/references
│ │ │ +
895 * to the element being removed.
│ │ │ +
896 *
│ │ │ +
897 * Note that no data is returned, and if the first element's data
│ │ │ +
898 * is needed, it should be retrieved before pop_front() is
│ │ │ +
899 * called.
│ │ │ +
900 */
│ │ │ +
901 void
│ │ │ +
│ │ │ + │ │ │ +
903 { this->_M_erase_after(&this->_M_impl._M_head); }
│ │ │ +
│ │ │ +
904
│ │ │ +
905 /**
│ │ │ +
906 * @brief Constructs object in %forward_list after the specified
│ │ │ +
907 * iterator.
│ │ │ +
908 * @param __pos A const_iterator into the %forward_list.
│ │ │ +
909 * @param __args Arguments.
│ │ │ +
910 * @return An iterator that points to the inserted data.
│ │ │ +
911 *
│ │ │ +
912 * This function will insert an object of type T constructed
│ │ │ +
913 * with T(std::forward<Args>(args)...) after the specified
│ │ │ +
914 * location. Due to the nature of a %forward_list this operation can
│ │ │ +
915 * be done in constant time, and does not invalidate iterators
│ │ │ +
916 * and references.
│ │ │ +
917 */
│ │ │ +
918 template<typename... _Args>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
921 { return iterator(this->_M_insert_after(__pos,
│ │ │ + │ │ │ +
│ │ │ +
923
│ │ │ +
924 /**
│ │ │ +
925 * @brief Inserts given value into %forward_list after specified
│ │ │ +
926 * iterator.
│ │ │ +
927 * @param __pos An iterator into the %forward_list.
│ │ │ +
928 * @param __val Data to be inserted.
│ │ │ +
929 * @return An iterator that points to the inserted data.
│ │ │ +
930 *
│ │ │ +
931 * This function will insert a copy of the given value after
│ │ │ +
932 * the specified location. Due to the nature of a %forward_list this
│ │ │ +
933 * operation can be done in constant time, and does not
│ │ │ +
934 * invalidate iterators and references.
│ │ │ +
935 */
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
938 { return iterator(this->_M_insert_after(__pos, __val)); }
│ │ │ +
│ │ │ +
939
│ │ │ +
940 /**
│ │ │ +
941 *
│ │ │ +
942 */
│ │ │ + │ │ │ +
944 insert_after(const_iterator __pos, _Tp&& __val)
│ │ │ +
945 { return iterator(this->_M_insert_after(__pos, std::move(__val))); }
│ │ │ +
946
│ │ │ +
947 /**
│ │ │ +
948 * @brief Inserts a number of copies of given data into the
│ │ │ +
949 * %forward_list.
│ │ │ +
950 * @param __pos An iterator into the %forward_list.
│ │ │ +
951 * @param __n Number of elements to be inserted.
│ │ │ +
952 * @param __val Data to be inserted.
│ │ │ +
953 * @return An iterator pointing to the last inserted copy of
│ │ │ +
954 * @a val or @a pos if @a n == 0.
│ │ │ +
955 *
│ │ │ +
956 * This function will insert a specified number of copies of the
│ │ │ +
957 * given data after the location specified by @a pos.
│ │ │ +
958 *
│ │ │ +
959 * This operation is linear in the number of elements inserted and
│ │ │ +
960 * does not invalidate iterators and references.
│ │ │ +
961 */
│ │ │ +
962 iterator
│ │ │ +
963 insert_after(const_iterator __pos, size_type __n, const _Tp& __val);
│ │ │ +
964
│ │ │ +
965 /**
│ │ │ +
966 * @brief Inserts a range into the %forward_list.
│ │ │ +
967 * @param __pos An iterator into the %forward_list.
│ │ │ +
968 * @param __first An input iterator.
│ │ │ +
969 * @param __last An input iterator.
│ │ │ +
970 * @return An iterator pointing to the last inserted element or
│ │ │ +
971 * @a __pos if @a __first == @a __last.
│ │ │ +
972 *
│ │ │ +
973 * This function will insert copies of the data in the range
│ │ │ +
974 * [@a __first,@a __last) into the %forward_list after the
│ │ │ +
975 * location specified by @a __pos.
│ │ │ +
976 *
│ │ │ +
977 * This operation is linear in the number of elements inserted and
│ │ │ +
978 * does not invalidate iterators and references.
│ │ │ +
979 */
│ │ │ +
980 template<typename _InputIterator,
│ │ │ + │ │ │ +
982 iterator
│ │ │ +
983 insert_after(const_iterator __pos,
│ │ │ +
984 _InputIterator __first, _InputIterator __last);
│ │ │ +
985
│ │ │ +
986 /**
│ │ │ +
987 * @brief Inserts the contents of an initializer_list into
│ │ │ +
988 * %forward_list after the specified iterator.
│ │ │ +
989 * @param __pos An iterator into the %forward_list.
│ │ │ +
990 * @param __il An initializer_list of value_type.
│ │ │ +
991 * @return An iterator pointing to the last inserted element
│ │ │ +
992 * or @a __pos if @a __il is empty.
│ │ │ +
993 *
│ │ │ +
994 * This function will insert copies of the data in the
│ │ │ +
995 * initializer_list @a __il into the %forward_list before the location
│ │ │ +
996 * specified by @a __pos.
│ │ │ +
997 *
│ │ │ +
998 * This operation is linear in the number of elements inserted and
│ │ │ +
999 * does not invalidate iterators and references.
│ │ │ +
1000 */
│ │ │ +
1001 iterator
│ │ │ +
│ │ │ + │ │ │ +
1003 { return insert_after(__pos, __il.begin(), __il.end()); }
│ │ │ +
│ │ │ +
1004
│ │ │ +
1005 /**
│ │ │ +
1006 * @brief Removes the element pointed to by the iterator following
│ │ │ +
1007 * @c pos.
│ │ │ +
1008 * @param __pos Iterator pointing before element to be erased.
│ │ │ +
1009 * @return An iterator pointing to the element following the one
│ │ │ +
1010 * that was erased, or end() if no such element exists.
│ │ │ +
1011 *
│ │ │ +
1012 * This function will erase the element at the given position and
│ │ │ +
1013 * thus shorten the %forward_list by one.
│ │ │ +
1014 *
│ │ │ +
1015 * Due to the nature of a %forward_list this operation can be done
│ │ │ +
1016 * in constant time, and only invalidates iterators/references to
│ │ │ +
1017 * the element being removed. The user is also cautioned that
│ │ │ +
1018 * this function only erases the element, and that if the element
│ │ │ +
1019 * is itself a pointer, the pointed-to memory is not touched in
│ │ │ +
1020 * any way. Managing the pointer is the user's responsibility.
│ │ │ +
1021 */
│ │ │ +
1022 iterator
│ │ │ +
│ │ │ + │ │ │ +
1024 { return iterator(this->_M_erase_after(const_cast<_Node_base*>
│ │ │ +
1025 (__pos._M_node))); }
│ │ │ +
│ │ │ +
1026
│ │ │ +
1027 /**
│ │ │ +
1028 * @brief Remove a range of elements.
│ │ │ +
1029 * @param __pos Iterator pointing before the first element to be
│ │ │ +
1030 * erased.
│ │ │ +
1031 * @param __last Iterator pointing to one past the last element to be
│ │ │ +
1032 * erased.
│ │ │ +
1033 * @return @ __last.
│ │ │ +
1034 *
│ │ │ +
1035 * This function will erase the elements in the range
│ │ │ +
1036 * @a (__pos,__last) and shorten the %forward_list accordingly.
│ │ │ +
1037 *
│ │ │ +
1038 * This operation is linear time in the size of the range and only
│ │ │ +
1039 * invalidates iterators/references to the element being removed.
│ │ │ +
1040 * The user is also cautioned that this function only erases the
│ │ │ +
1041 * elements, and that if the elements themselves are pointers, the
│ │ │ +
1042 * pointed-to memory is not touched in any way. Managing the pointer
│ │ │ +
1043 * is the user's responsibility.
│ │ │ +
1044 */
│ │ │ +
1045 iterator
│ │ │ +
│ │ │ + │ │ │ +
1047 { return iterator(this->_M_erase_after(const_cast<_Node_base*>
│ │ │ +
1048 (__pos._M_node),
│ │ │ +
1049 const_cast<_Node_base*>
│ │ │ +
1050 (__last._M_node))); }
│ │ │ +
│ │ │ +
1051
│ │ │ +
1052 /**
│ │ │ +
1053 * @brief Swaps data with another %forward_list.
│ │ │ +
1054 * @param __list A %forward_list of the same element and allocator
│ │ │ +
1055 * types.
│ │ │ +
1056 *
│ │ │ +
1057 * This exchanges the elements between two lists in constant
│ │ │ +
1058 * time. Note that the global std::swap() function is
│ │ │ +
1059 * specialized such that std::swap(l1,l2) will feed to this
│ │ │ +
1060 * function.
│ │ │ +
1061 *
│ │ │ +
1062 * Whether the allocators are swapped depends on the allocator traits.
│ │ │ +
1063 */
│ │ │ +
1064 void
│ │ │ +
│ │ │ + │ │ │ +
1066 {
│ │ │ +
1067 std::swap(this->_M_impl._M_head._M_next,
│ │ │ +
1068 __list._M_impl._M_head._M_next);
│ │ │ +
1069 _Node_alloc_traits::_S_on_swap(this->_M_get_Node_allocator(),
│ │ │ +
1070 __list._M_get_Node_allocator());
│ │ │ +
1071 }
│ │ │ +
│ │ │ +
1072
│ │ │ +
1073 /**
│ │ │ +
1074 * @brief Resizes the %forward_list to the specified number of
│ │ │ +
1075 * elements.
│ │ │ +
1076 * @param __sz Number of elements the %forward_list should contain.
│ │ │ +
1077 *
│ │ │ +
1078 * This function will %resize the %forward_list to the specified
│ │ │ +
1079 * number of elements. If the number is smaller than the
│ │ │ +
1080 * %forward_list's current number of elements the %forward_list
│ │ │ +
1081 * is truncated, otherwise the %forward_list is extended and the
│ │ │ +
1082 * new elements are default constructed.
│ │ │
1083 */
│ │ │ - │ │ │ -
│ │ │ -
1085 end(size_type __n) const
│ │ │ -
1086 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1087
│ │ │ - │ │ │ -
│ │ │ -
1089 cend(size_type __n) const
│ │ │ -
1090 { return _M_h.cend(__n); }
│ │ │ -
│ │ │ -
1091 ///@}
│ │ │ -
1092
│ │ │ -
1093 // hash policy.
│ │ │ -
1094
│ │ │ -
1095 /// Returns the average number of elements per bucket.
│ │ │ -
1096 float
│ │ │ -
│ │ │ -
1097 load_factor() const noexcept
│ │ │ -
1098 { return _M_h.load_factor(); }
│ │ │ -
│ │ │ -
1099
│ │ │ -
1100 /// Returns a positive number that the %unordered_map tries to keep the
│ │ │ -
1101 /// load factor less than or equal to.
│ │ │ -
1102 float
│ │ │ -
│ │ │ -
1103 max_load_factor() const noexcept
│ │ │ -
1104 { return _M_h.max_load_factor(); }
│ │ │ -
│ │ │ -
1105
│ │ │ -
1106 /**
│ │ │ -
1107 * @brief Change the %unordered_map maximum load factor.
│ │ │ -
1108 * @param __z The new maximum load factor.
│ │ │ +
1084 void
│ │ │ +
1085 resize(size_type __sz);
│ │ │ +
1086
│ │ │ +
1087 /**
│ │ │ +
1088 * @brief Resizes the %forward_list to the specified number of
│ │ │ +
1089 * elements.
│ │ │ +
1090 * @param __sz Number of elements the %forward_list should contain.
│ │ │ +
1091 * @param __val Data with which new elements should be populated.
│ │ │ +
1092 *
│ │ │ +
1093 * This function will %resize the %forward_list to the specified
│ │ │ +
1094 * number of elements. If the number is smaller than the
│ │ │ +
1095 * %forward_list's current number of elements the %forward_list
│ │ │ +
1096 * is truncated, otherwise the %forward_list is extended and new
│ │ │ +
1097 * elements are populated with given data.
│ │ │ +
1098 */
│ │ │ +
1099 void
│ │ │ +
1100 resize(size_type __sz, const value_type& __val);
│ │ │ +
1101
│ │ │ +
1102 /**
│ │ │ +
1103 * @brief Erases all the elements.
│ │ │ +
1104 *
│ │ │ +
1105 * Note that this function only erases
│ │ │ +
1106 * the elements, and that if the elements themselves are
│ │ │ +
1107 * pointers, the pointed-to memory is not touched in any way.
│ │ │ +
1108 * Managing the pointer is the user's responsibility.
│ │ │
1109 */
│ │ │
1110 void
│ │ │
│ │ │ - │ │ │ -
1112 { _M_h.max_load_factor(__z); }
│ │ │ +
1111 clear() noexcept
│ │ │ +
1112 { this->_M_erase_after(&this->_M_impl._M_head, nullptr); }
│ │ │
│ │ │ -
1113
│ │ │ -
1114 /**
│ │ │ -
1115 * @brief May rehash the %unordered_map.
│ │ │ -
1116 * @param __n The new number of buckets.
│ │ │ -
1117 *
│ │ │ -
1118 * Rehash will occur only if the new number of buckets respect the
│ │ │ -
1119 * %unordered_map maximum load factor.
│ │ │ -
1120 */
│ │ │ -
1121 void
│ │ │ -
│ │ │ - │ │ │ -
1123 { _M_h.rehash(__n); }
│ │ │ -
│ │ │ -
1124
│ │ │ -
1125 /**
│ │ │ -
1126 * @brief Prepare the %unordered_map for a specified number of
│ │ │ -
1127 * elements.
│ │ │ -
1128 * @param __n Number of elements required.
│ │ │ -
1129 *
│ │ │ -
1130 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ -
1131 */
│ │ │ -
1132 void
│ │ │ -
│ │ │ - │ │ │ -
1134 { _M_h.reserve(__n); }
│ │ │ -
│ │ │ -
1135
│ │ │ -
1136 template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1,
│ │ │ -
1137 typename _Alloc1>
│ │ │ -
1138 friend bool
│ │ │ - │ │ │ - │ │ │ -
1141 };
│ │ │ -
│ │ │ -
1142
│ │ │ -
1143#if __cpp_deduction_guides >= 201606
│ │ │ -
1144
│ │ │ -
1145 template<typename _InputIterator,
│ │ │ -
1146 typename _Hash = hash<__iter_key_t<_InputIterator>>,
│ │ │ -
1147 typename _Pred = equal_to<__iter_key_t<_InputIterator>>,
│ │ │ -
1148 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
│ │ │ -
1149 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1150 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1151 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
1152 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1153 unordered_map(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
1155 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ -
1156 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ -
1157 __iter_val_t<_InputIterator>,
│ │ │ -
1158 _Hash, _Pred, _Allocator>;
│ │ │ -
1159
│ │ │ -
1160 template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
│ │ │ -
1161 typename _Pred = equal_to<_Key>,
│ │ │ -
1162 typename _Allocator = allocator<pair<const _Key, _Tp>>,
│ │ │ -
1163 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1164 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
1165 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1166 unordered_map(initializer_list<pair<_Key, _Tp>>,
│ │ │ - │ │ │ -
1168 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator())
│ │ │ -
1169 -> unordered_map<_Key, _Tp, _Hash, _Pred, _Allocator>;
│ │ │ -
1170
│ │ │ -
1171 template<typename _InputIterator, typename _Allocator,
│ │ │ -
1172 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1173 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1174 unordered_map(_InputIterator, _InputIterator,
│ │ │ -
1175 typename unordered_map<int, int>::size_type, _Allocator)
│ │ │ -
1176 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ -
1177 __iter_val_t<_InputIterator>,
│ │ │ -
1178 hash<__iter_key_t<_InputIterator>>,
│ │ │ -
1179 equal_to<__iter_key_t<_InputIterator>>,
│ │ │ -
1180 _Allocator>;
│ │ │ -
1181
│ │ │ -
1182 template<typename _InputIterator, typename _Allocator,
│ │ │ -
1183 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1184 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1185 unordered_map(_InputIterator, _InputIterator, _Allocator)
│ │ │ -
1186 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ -
1187 __iter_val_t<_InputIterator>,
│ │ │ -
1188 hash<__iter_key_t<_InputIterator>>,
│ │ │ -
1189 equal_to<__iter_key_t<_InputIterator>>,
│ │ │ -
1190 _Allocator>;
│ │ │ -
1191
│ │ │ -
1192 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ -
1193 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
1194 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1195 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1196 unordered_map(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
1198 _Hash, _Allocator)
│ │ │ -
1199 -> unordered_map<__iter_key_t<_InputIterator>,
│ │ │ -
1200 __iter_val_t<_InputIterator>, _Hash,
│ │ │ -
1201 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ -
1202
│ │ │ -
1203 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ -
1204 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1205 unordered_map(initializer_list<pair<_Key, _Tp>>,
│ │ │ - │ │ │ -
1207 _Allocator)
│ │ │ -
1208 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ -
1209
│ │ │ -
1210 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ -
1211 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1212 unordered_map(initializer_list<pair<_Key, _Tp>>, _Allocator)
│ │ │ -
1213 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ -
1214
│ │ │ -
1215 template<typename _Key, typename _Tp, typename _Hash, typename _Allocator,
│ │ │ -
1216 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
1217 typename = _RequireAllocator<_Allocator>>
│ │ │ -
1218 unordered_map(initializer_list<pair<_Key, _Tp>>,
│ │ │ - │ │ │ -
1220 _Hash, _Allocator)
│ │ │ -
1221 -> unordered_map<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>;
│ │ │ -
1222
│ │ │ -
1223#endif
│ │ │ -
1224
│ │ │ -
1225 /**
│ │ │ -
1226 * @brief A standard container composed of equivalent keys
│ │ │ -
1227 * (possibly containing multiple of each key value) that associates
│ │ │ -
1228 * values of another type with the keys.
│ │ │ -
1229 *
│ │ │ -
1230 * @ingroup unordered_associative_containers
│ │ │ -
1231 * @headerfile unordered_map
│ │ │ -
1232 * @since C++11
│ │ │ -
1233 *
│ │ │ -
1234 * @tparam _Key Type of key objects.
│ │ │ -
1235 * @tparam _Tp Type of mapped objects.
│ │ │ -
1236 * @tparam _Hash Hashing function object type, defaults to hash<_Value>.
│ │ │ -
1237 * @tparam _Pred Predicate function object type, defaults
│ │ │ -
1238 * to equal_to<_Value>.
│ │ │ -
1239 * @tparam _Alloc Allocator type, defaults to
│ │ │ -
1240 * std::allocator<std::pair<const _Key, _Tp>>.
│ │ │ -
1241 *
│ │ │ -
1242 * Meets the requirements of a <a href="tables.html#65">container</a>, and
│ │ │ -
1243 * <a href="tables.html#xx">unordered associative container</a>
│ │ │ -
1244 *
│ │ │ -
1245 * The resulting value type of the container is std::pair<const _Key, _Tp>.
│ │ │ -
1246 *
│ │ │ -
1247 * Base is _Hashtable, dispatched at compile time via template
│ │ │ -
1248 * alias __ummap_hashtable.
│ │ │ -
1249 */
│ │ │ -
1250 template<typename _Key, typename _Tp,
│ │ │ -
1251 typename _Hash = hash<_Key>,
│ │ │ -
1252 typename _Pred = equal_to<_Key>,
│ │ │ -
1253 typename _Alloc = allocator<std::pair<const _Key, _Tp>>>
│ │ │ -
│ │ │ - │ │ │ -
1255 {
│ │ │ - │ │ │ -
1257 _Hashtable _M_h;
│ │ │ -
1258
│ │ │ -
1259 public:
│ │ │ -
1260 // typedefs:
│ │ │ -
1261 ///@{
│ │ │ -
1262 /// Public typedefs.
│ │ │ -
1263 typedef typename _Hashtable::key_type key_type;
│ │ │ -
1264 typedef typename _Hashtable::value_type value_type;
│ │ │ -
1265 typedef typename _Hashtable::mapped_type mapped_type;
│ │ │ -
1266 typedef typename _Hashtable::hasher hasher;
│ │ │ -
1267 typedef typename _Hashtable::key_equal key_equal;
│ │ │ -
1268 typedef typename _Hashtable::allocator_type allocator_type;
│ │ │ -
1269 ///@}
│ │ │ -
1270
│ │ │ -
1271 ///@{
│ │ │ -
1272 /// Iterator-related typedefs.
│ │ │ -
1273 typedef typename _Hashtable::pointer pointer;
│ │ │ -
1274 typedef typename _Hashtable::const_pointer const_pointer;
│ │ │ -
1275 typedef typename _Hashtable::reference reference;
│ │ │ -
1276 typedef typename _Hashtable::const_reference const_reference;
│ │ │ -
1277 typedef typename _Hashtable::iterator iterator;
│ │ │ -
1278 typedef typename _Hashtable::const_iterator const_iterator;
│ │ │ -
1279 typedef typename _Hashtable::local_iterator local_iterator;
│ │ │ -
1280 typedef typename _Hashtable::const_local_iterator const_local_iterator;
│ │ │ -
1281 typedef typename _Hashtable::size_type size_type;
│ │ │ -
1282 typedef typename _Hashtable::difference_type difference_type;
│ │ │ -
1283 ///@}
│ │ │ -
1284
│ │ │ -
1285#if __cplusplus > 201402L
│ │ │ -
1286 using node_type = typename _Hashtable::node_type;
│ │ │ -
1287#endif
│ │ │ +
1113
│ │ │ +
1114 // 23.3.4.6 forward_list operations:
│ │ │ +
1115
│ │ │ +
1116 /**
│ │ │ +
1117 * @brief Insert contents of another %forward_list.
│ │ │ +
1118 * @param __pos Iterator referencing the element to insert after.
│ │ │ +
1119 * @param __list Source list.
│ │ │ +
1120 *
│ │ │ +
1121 * The elements of @a list are inserted in constant time after
│ │ │ +
1122 * the element referenced by @a pos. @a list becomes an empty
│ │ │ +
1123 * list.
│ │ │ +
1124 *
│ │ │ +
1125 * Requires this != @a x.
│ │ │ +
1126 */
│ │ │ +
1127 void
│ │ │ +
│ │ │ + │ │ │ +
1129 {
│ │ │ +
1130 if (!__list.empty())
│ │ │ +
1131 _M_splice_after(__pos, __list.before_begin(), __list.end());
│ │ │ +
1132 }
│ │ │ +
│ │ │ +
1133
│ │ │ +
1134 void
│ │ │ +
1135 splice_after(const_iterator __pos, forward_list& __list) noexcept
│ │ │ + │ │ │ +
1137
│ │ │ +
1138 /**
│ │ │ +
1139 * @brief Insert element from another %forward_list.
│ │ │ +
1140 * @param __pos Iterator referencing the element to insert after.
│ │ │ +
1141 * @param __list Source list.
│ │ │ +
1142 * @param __i Iterator referencing the element before the element
│ │ │ +
1143 * to move.
│ │ │ +
1144 *
│ │ │ +
1145 * Removes the element in list @a list referenced by @a i and
│ │ │ +
1146 * inserts it into the current list after @a pos.
│ │ │ +
1147 */
│ │ │ +
1148 void
│ │ │ +
1149 splice_after(const_iterator __pos, forward_list&& __list,
│ │ │ +
1150 const_iterator __i) noexcept;
│ │ │ +
1151
│ │ │ +
1152 void
│ │ │ +
1153 splice_after(const_iterator __pos, forward_list& __list,
│ │ │ +
1154 const_iterator __i) noexcept
│ │ │ +
1155 { splice_after(__pos, std::move(__list), __i); }
│ │ │ +
1156
│ │ │ +
1157 /**
│ │ │ +
1158 * @brief Insert range from another %forward_list.
│ │ │ +
1159 * @param __pos Iterator referencing the element to insert after.
│ │ │ +
1160 * @param __list Source list.
│ │ │ +
1161 * @param __before Iterator referencing before the start of range
│ │ │ +
1162 * in list.
│ │ │ +
1163 * @param __last Iterator referencing the end of range in list.
│ │ │ +
1164 *
│ │ │ +
1165 * Removes elements in the range (__before,__last) and inserts them
│ │ │ +
1166 * after @a __pos in constant time.
│ │ │ +
1167 *
│ │ │ +
1168 * Undefined if @a __pos is in (__before,__last).
│ │ │ +
1169 * @{
│ │ │ +
1170 */
│ │ │ +
1171 void
│ │ │ +
│ │ │ + │ │ │ +
1173 const_iterator __before, const_iterator __last) noexcept
│ │ │ +
1174 { _M_splice_after(__pos, __before, __last); }
│ │ │ +
│ │ │ +
1175
│ │ │ +
1176 void
│ │ │ +
│ │ │ + │ │ │ +
1178 const_iterator __before, const_iterator __last) noexcept
│ │ │ +
1179 { _M_splice_after(__pos, __before, __last); }
│ │ │ +
│ │ │ +
1180 /// @}
│ │ │ +
1181
│ │ │ +
1182 private:
│ │ │ +
1183#if __cplusplus > 201703L
│ │ │ +
1184# define __cpp_lib_list_remove_return_type 201806L
│ │ │ +
1185 using __remove_return_type = size_type;
│ │ │ +
1186# define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG \
│ │ │ +
1187 __attribute__((__abi_tag__("__cxx20")))
│ │ │ +
1188#else
│ │ │ +
1189 using __remove_return_type = void;
│ │ │ +
1190# define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
│ │ │ +
1191#endif
│ │ │ +
1192 public:
│ │ │ +
1193
│ │ │ +
1194 /**
│ │ │ +
1195 * @brief Remove all elements equal to value.
│ │ │ +
1196 * @param __val The value to remove.
│ │ │ +
1197 *
│ │ │ +
1198 * Removes every element in the list equal to @a __val.
│ │ │ +
1199 * Remaining elements stay in list order. Note that this
│ │ │ +
1200 * function only erases the elements, and that if the elements
│ │ │ +
1201 * themselves are pointers, the pointed-to memory is not
│ │ │ +
1202 * touched in any way. Managing the pointer is the user's
│ │ │ +
1203 * responsibility.
│ │ │ +
1204 */
│ │ │ +
1205 _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
│ │ │ +
1206 __remove_return_type
│ │ │ +
1207 remove(const _Tp& __val);
│ │ │ +
1208
│ │ │ +
1209 /**
│ │ │ +
1210 * @brief Remove all elements satisfying a predicate.
│ │ │ +
1211 * @param __pred Unary predicate function or object.
│ │ │ +
1212 *
│ │ │ +
1213 * Removes every element in the list for which the predicate
│ │ │ +
1214 * returns true. Remaining elements stay in list order. Note
│ │ │ +
1215 * that this function only erases the elements, and that if the
│ │ │ +
1216 * elements themselves are pointers, the pointed-to memory is
│ │ │ +
1217 * not touched in any way. Managing the pointer is the user's
│ │ │ +
1218 * responsibility.
│ │ │ +
1219 */
│ │ │ +
1220 template<typename _Pred>
│ │ │ +
1221 __remove_return_type
│ │ │ + │ │ │ +
1223
│ │ │ +
1224 /**
│ │ │ +
1225 * @brief Remove consecutive duplicate elements.
│ │ │ +
1226 *
│ │ │ +
1227 * For each consecutive set of elements with the same value,
│ │ │ +
1228 * remove all but the first one. Remaining elements stay in
│ │ │ +
1229 * list order. Note that this function only erases the
│ │ │ +
1230 * elements, and that if the elements themselves are pointers,
│ │ │ +
1231 * the pointed-to memory is not touched in any way. Managing
│ │ │ +
1232 * the pointer is the user's responsibility.
│ │ │ +
1233 */
│ │ │ +
1234 _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
│ │ │ +
1235 __remove_return_type
│ │ │ +
│ │ │ + │ │ │ +
1237 { return unique(std::equal_to<_Tp>()); }
│ │ │ +
│ │ │ +
1238
│ │ │ +
1239#undef _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG
│ │ │ +
1240
│ │ │ +
1241 /**
│ │ │ +
1242 * @brief Remove consecutive elements satisfying a predicate.
│ │ │ +
1243 * @param __binary_pred Binary predicate function or object.
│ │ │ +
1244 *
│ │ │ +
1245 * For each consecutive set of elements [first,last) that
│ │ │ +
1246 * satisfy predicate(first,i) where i is an iterator in
│ │ │ +
1247 * [first,last), remove all but the first one. Remaining
│ │ │ +
1248 * elements stay in list order. Note that this function only
│ │ │ +
1249 * erases the elements, and that if the elements themselves are
│ │ │ +
1250 * pointers, the pointed-to memory is not touched in any way.
│ │ │ +
1251 * Managing the pointer is the user's responsibility.
│ │ │ +
1252 */
│ │ │ +
1253 template<typename _BinPred>
│ │ │ +
1254 __remove_return_type
│ │ │ + │ │ │ +
1256
│ │ │ +
1257 /**
│ │ │ +
1258 * @brief Merge sorted lists.
│ │ │ +
1259 * @param __list Sorted list to merge.
│ │ │ +
1260 *
│ │ │ +
1261 * Assumes that both @a list and this list are sorted according to
│ │ │ +
1262 * operator<(). Merges elements of @a __list into this list in
│ │ │ +
1263 * sorted order, leaving @a __list empty when complete. Elements in
│ │ │ +
1264 * this list precede elements in @a __list that are equal.
│ │ │ +
1265 */
│ │ │ +
1266 void
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
│ │ │ +
1269
│ │ │ +
1270 void
│ │ │ + │ │ │ +
1272 { merge(std::move(__list)); }
│ │ │ +
1273
│ │ │ +
1274 /**
│ │ │ +
1275 * @brief Merge sorted lists according to comparison function.
│ │ │ +
1276 * @param __list Sorted list to merge.
│ │ │ +
1277 * @param __comp Comparison function defining sort order.
│ │ │ +
1278 *
│ │ │ +
1279 * Assumes that both @a __list and this list are sorted according to
│ │ │ +
1280 * comp. Merges elements of @a __list into this list
│ │ │ +
1281 * in sorted order, leaving @a __list empty when complete. Elements
│ │ │ +
1282 * in this list precede elements in @a __list that are equivalent
│ │ │ +
1283 * according to comp().
│ │ │ +
1284 */
│ │ │ +
1285 template<typename _Comp>
│ │ │ +
1286 void
│ │ │ +
1287 merge(forward_list&& __list, _Comp __comp);
│ │ │
1288
│ │ │ -
1289 //construct/destroy/copy
│ │ │ -
1290
│ │ │ -
1291 /// Default constructor.
│ │ │ - │ │ │ +
1289 template<typename _Comp>
│ │ │ +
1290 void
│ │ │ +
1291 merge(forward_list& __list, _Comp __comp)
│ │ │ +
1292 { merge(std::move(__list), __comp); }
│ │ │
1293
│ │ │
1294 /**
│ │ │ -
1295 * @brief Default constructor creates no elements.
│ │ │ -
1296 * @param __n Mnimal initial number of buckets.
│ │ │ -
1297 * @param __hf A hash functor.
│ │ │ -
1298 * @param __eql A key equality functor.
│ │ │ -
1299 * @param __a An allocator object.
│ │ │ -
1300 */
│ │ │ -
1301 explicit
│ │ │ -
│ │ │ - │ │ │ -
1303 const hasher& __hf = hasher(),
│ │ │ -
1304 const key_equal& __eql = key_equal(),
│ │ │ -
1305 const allocator_type& __a = allocator_type())
│ │ │ -
1306 : _M_h(__n, __hf, __eql, __a)
│ │ │ -
1307 { }
│ │ │ -
│ │ │ -
1308
│ │ │ -
1309 /**
│ │ │ -
1310 * @brief Builds an %unordered_multimap from a range.
│ │ │ -
1311 * @param __first An input iterator.
│ │ │ -
1312 * @param __last An input iterator.
│ │ │ -
1313 * @param __n Minimal initial number of buckets.
│ │ │ -
1314 * @param __hf A hash functor.
│ │ │ -
1315 * @param __eql A key equality functor.
│ │ │ -
1316 * @param __a An allocator object.
│ │ │ -
1317 *
│ │ │ -
1318 * Create an %unordered_multimap consisting of copies of the elements
│ │ │ -
1319 * from [__first,__last). This is linear in N (where N is
│ │ │ -
1320 * distance(__first,__last)).
│ │ │ -
1321 */
│ │ │ -
1322 template<typename _InputIterator>
│ │ │ -
│ │ │ - │ │ │ -
1324 size_type __n = 0,
│ │ │ -
1325 const hasher& __hf = hasher(),
│ │ │ -
1326 const key_equal& __eql = key_equal(),
│ │ │ -
1327 const allocator_type& __a = allocator_type())
│ │ │ -
1328 : _M_h(__first, __last, __n, __hf, __eql, __a)
│ │ │ -
1329 { }
│ │ │ -
│ │ │ -
1330
│ │ │ -
1331 /// Copy constructor.
│ │ │ - │ │ │ -
1333
│ │ │ -
1334 /// Move constructor.
│ │ │ - │ │ │ -
1336
│ │ │ -
1337 /**
│ │ │ -
1338 * @brief Creates an %unordered_multimap with no elements.
│ │ │ -
1339 * @param __a An allocator object.
│ │ │ -
1340 */
│ │ │ -
1341 explicit
│ │ │ -
│ │ │ - │ │ │ -
1343 : _M_h(__a)
│ │ │ -
1344 { }
│ │ │ -
│ │ │ -
1345
│ │ │ -
1346 /*
│ │ │ -
1347 * @brief Copy constructor with allocator argument.
│ │ │ -
1348 * @param __uset Input %unordered_multimap to copy.
│ │ │ -
1349 * @param __a An allocator object.
│ │ │ -
1350 */
│ │ │ - │ │ │ -
1352 const allocator_type& __a)
│ │ │ -
1353 : _M_h(__ummap._M_h, __a)
│ │ │ -
1354 { }
│ │ │ -
1355
│ │ │ -
1356 /*
│ │ │ -
1357 * @brief Move constructor with allocator argument.
│ │ │ -
1358 * @param __uset Input %unordered_multimap to move.
│ │ │ -
1359 * @param __a An allocator object.
│ │ │ -
1360 */
│ │ │ - │ │ │ -
1362 const allocator_type& __a)
│ │ │ -
1363 noexcept( noexcept(_Hashtable(std::move(__ummap._M_h), __a)) )
│ │ │ -
1364 : _M_h(std::move(__ummap._M_h), __a)
│ │ │ -
1365 { }
│ │ │ -
1366
│ │ │ -
1367 /**
│ │ │ -
1368 * @brief Builds an %unordered_multimap from an initializer_list.
│ │ │ -
1369 * @param __l An initializer_list.
│ │ │ -
1370 * @param __n Minimal initial number of buckets.
│ │ │ -
1371 * @param __hf A hash functor.
│ │ │ -
1372 * @param __eql A key equality functor.
│ │ │ -
1373 * @param __a An allocator object.
│ │ │ -
1374 *
│ │ │ -
1375 * Create an %unordered_multimap consisting of copies of the elements in
│ │ │ -
1376 * the list. This is linear in N (where N is @a __l.size()).
│ │ │ -
1377 */
│ │ │ -
│ │ │ - │ │ │ -
1379 size_type __n = 0,
│ │ │ -
1380 const hasher& __hf = hasher(),
│ │ │ -
1381 const key_equal& __eql = key_equal(),
│ │ │ -
1382 const allocator_type& __a = allocator_type())
│ │ │ -
1383 : _M_h(__l, __n, __hf, __eql, __a)
│ │ │ -
1384 { }
│ │ │ -
│ │ │ -
1385
│ │ │ - │ │ │ -
1387 : unordered_multimap(__n, hasher(), key_equal(), __a)
│ │ │ -
1388 { }
│ │ │ -
1389
│ │ │ -
1390 unordered_multimap(size_type __n, const hasher& __hf,
│ │ │ -
1391 const allocator_type& __a)
│ │ │ -
1392 : unordered_multimap(__n, __hf, key_equal(), __a)
│ │ │ -
1393 { }
│ │ │ -
1394
│ │ │ +
1295 * @brief Sort the elements of the list.
│ │ │ +
1296 *
│ │ │ +
1297 * Sorts the elements of this list in NlogN time. Equivalent
│ │ │ +
1298 * elements remain in list order.
│ │ │ +
1299 */
│ │ │ +
1300 void
│ │ │ +
│ │ │ + │ │ │ +
1302 { sort(std::less<_Tp>()); }
│ │ │ +
│ │ │ +
1303
│ │ │ +
1304 /**
│ │ │ +
1305 * @brief Sort the forward_list using a comparison function.
│ │ │ +
1306 *
│ │ │ +
1307 * Sorts the elements of this list in NlogN time. Equivalent
│ │ │ +
1308 * elements remain in list order.
│ │ │ +
1309 */
│ │ │ +
1310 template<typename _Comp>
│ │ │ +
1311 void
│ │ │ +
1312 sort(_Comp __comp);
│ │ │ +
1313
│ │ │ +
1314 /**
│ │ │ +
1315 * @brief Reverse the elements in list.
│ │ │ +
1316 *
│ │ │ +
1317 * Reverse the order of elements in the list in linear time.
│ │ │ +
1318 */
│ │ │ +
1319 void
│ │ │ +
│ │ │ +
1320 reverse() noexcept
│ │ │ +
1321 { this->_M_impl._M_head._M_reverse_after(); }
│ │ │ +
│ │ │ +
1322
│ │ │ +
1323 private:
│ │ │ +
1324 // Called by the range constructor to implement [23.3.4.2]/9
│ │ │ +
1325 template<typename _InputIterator>
│ │ │ +
1326 void
│ │ │ +
1327 _M_range_initialize(_InputIterator __first, _InputIterator __last);
│ │ │ +
1328
│ │ │ +
1329 // Called by forward_list(n,v,a), and the range constructor when it
│ │ │ +
1330 // turns out to be the same thing.
│ │ │ +
1331 void
│ │ │ +
1332 _M_fill_initialize(size_type __n, const value_type& __value);
│ │ │ +
1333
│ │ │ +
1334 // Called by splice_after and insert_after.
│ │ │ +
1335 iterator
│ │ │ +
1336 _M_splice_after(const_iterator __pos, const_iterator __before,
│ │ │ +
1337 const_iterator __last);
│ │ │ +
1338
│ │ │ +
1339 // Called by forward_list(n).
│ │ │ +
1340 void
│ │ │ +
1341 _M_default_initialize(size_type __n);
│ │ │ +
1342
│ │ │ +
1343 // Called by resize(sz).
│ │ │ +
1344 void
│ │ │ +
1345 _M_default_insert_after(const_iterator __pos, size_type __n);
│ │ │ +
1346
│ │ │ +
1347 // Called by operator=(forward_list&&)
│ │ │ +
1348 void
│ │ │ +
1349 _M_move_assign(forward_list&& __list, true_type) noexcept
│ │ │ +
1350 {
│ │ │ +
1351 clear();
│ │ │ +
1352 this->_M_impl._M_head._M_next = __list._M_impl._M_head._M_next;
│ │ │ +
1353 __list._M_impl._M_head._M_next = nullptr;
│ │ │ +
1354 std::__alloc_on_move(this->_M_get_Node_allocator(),
│ │ │ +
1355 __list._M_get_Node_allocator());
│ │ │ +
1356 }
│ │ │ +
1357
│ │ │ +
1358 // Called by operator=(forward_list&&)
│ │ │ +
1359 void
│ │ │ +
1360 _M_move_assign(forward_list&& __list, false_type)
│ │ │ +
1361 {
│ │ │ +
1362 if (__list._M_get_Node_allocator() == this->_M_get_Node_allocator())
│ │ │ +
1363 _M_move_assign(std::move(__list), true_type());
│ │ │ +
1364 else
│ │ │ +
1365 // The rvalue's allocator cannot be moved, or is not equal,
│ │ │ +
1366 // so we need to individually move each element.
│ │ │ +
1367 this->assign(std::make_move_iterator(__list.begin()),
│ │ │ +
1368 std::make_move_iterator(__list.end()));
│ │ │ +
1369 }
│ │ │ +
1370
│ │ │ +
1371 // Called by assign(_InputIterator, _InputIterator) if _Tp is
│ │ │ +
1372 // CopyAssignable.
│ │ │ +
1373 template<typename _InputIterator>
│ │ │ +
1374 void
│ │ │ +
1375 _M_assign(_InputIterator __first, _InputIterator __last, true_type)
│ │ │ +
1376 {
│ │ │ +
1377 auto __prev = before_begin();
│ │ │ +
1378 auto __curr = begin();
│ │ │ +
1379 auto __end = end();
│ │ │ +
1380 while (__curr != __end && __first != __last)
│ │ │ +
1381 {
│ │ │ +
1382 *__curr = *__first;
│ │ │ +
1383 ++__prev;
│ │ │ +
1384 ++__curr;
│ │ │ +
1385 ++__first;
│ │ │ +
1386 }
│ │ │ +
1387 if (__first != __last)
│ │ │ +
1388 insert_after(__prev, __first, __last);
│ │ │ +
1389 else if (__curr != __end)
│ │ │ +
1390 erase_after(__prev, __end);
│ │ │ +
1391 }
│ │ │ +
1392
│ │ │ +
1393 // Called by assign(_InputIterator, _InputIterator) if _Tp is not
│ │ │ +
1394 // CopyAssignable.
│ │ │
1395 template<typename _InputIterator>
│ │ │ -
1396 unordered_multimap(_InputIterator __first, _InputIterator __last,
│ │ │ -
1397 size_type __n,
│ │ │ -
1398 const allocator_type& __a)
│ │ │ -
1399 : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a)
│ │ │ -
1400 { }
│ │ │ -
1401
│ │ │ -
1402 template<typename _InputIterator>
│ │ │ -
1403 unordered_multimap(_InputIterator __first, _InputIterator __last,
│ │ │ -
1404 size_type __n, const hasher& __hf,
│ │ │ -
1405 const allocator_type& __a)
│ │ │ -
1406 : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a)
│ │ │ -
1407 { }
│ │ │ -
1408
│ │ │ -
1409 unordered_multimap(initializer_list<value_type> __l,
│ │ │ -
1410 size_type __n,
│ │ │ -
1411 const allocator_type& __a)
│ │ │ -
1412 : unordered_multimap(__l, __n, hasher(), key_equal(), __a)
│ │ │ -
1413 { }
│ │ │ -
1414
│ │ │ -
1415 unordered_multimap(initializer_list<value_type> __l,
│ │ │ -
1416 size_type __n, const hasher& __hf,
│ │ │ -
1417 const allocator_type& __a)
│ │ │ -
1418 : unordered_multimap(__l, __n, __hf, key_equal(), __a)
│ │ │ -
1419 { }
│ │ │ -
1420
│ │ │ -
1421 /// Copy assignment operator.
│ │ │ - │ │ │ - │ │ │ -
1424
│ │ │ -
1425 /// Move assignment operator.
│ │ │ - │ │ │ - │ │ │ -
1428
│ │ │ -
1429 /**
│ │ │ -
1430 * @brief %Unordered_multimap list assignment operator.
│ │ │ -
1431 * @param __l An initializer_list.
│ │ │ -
1432 *
│ │ │ -
1433 * This function fills an %unordered_multimap with copies of the
│ │ │ -
1434 * elements in the initializer list @a __l.
│ │ │ -
1435 *
│ │ │ -
1436 * Note that the assignment completely changes the %unordered_multimap
│ │ │ -
1437 * and that the resulting %unordered_multimap's size is the same as the
│ │ │ -
1438 * number of elements assigned.
│ │ │ -
1439 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1442 {
│ │ │ -
1443 _M_h = __l;
│ │ │ -
1444 return *this;
│ │ │ -
1445 }
│ │ │ -
│ │ │ -
1446
│ │ │ -
1447 /// Returns the allocator object used by the %unordered_multimap.
│ │ │ - │ │ │ -
│ │ │ -
1449 get_allocator() const noexcept
│ │ │ -
1450 { return _M_h.get_allocator(); }
│ │ │ -
│ │ │ -
1451
│ │ │ -
1452 // size and capacity:
│ │ │ -
1453
│ │ │ -
1454 /// Returns true if the %unordered_multimap is empty.
│ │ │ -
1455 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
1456 empty() const noexcept
│ │ │ -
1457 { return _M_h.empty(); }
│ │ │ -
│ │ │ -
1458
│ │ │ -
1459 /// Returns the size of the %unordered_multimap.
│ │ │ -
1460 size_type
│ │ │ -
│ │ │ -
1461 size() const noexcept
│ │ │ -
1462 { return _M_h.size(); }
│ │ │ -
│ │ │ -
1463
│ │ │ -
1464 /// Returns the maximum size of the %unordered_multimap.
│ │ │ -
1465 size_type
│ │ │ -
│ │ │ -
1466 max_size() const noexcept
│ │ │ -
1467 { return _M_h.max_size(); }
│ │ │ -
│ │ │ -
1468
│ │ │ -
1469 // iterators.
│ │ │ -
1470
│ │ │ -
1471 /**
│ │ │ -
1472 * Returns a read/write iterator that points to the first element in the
│ │ │ -
1473 * %unordered_multimap.
│ │ │ -
1474 */
│ │ │ -
1475 iterator
│ │ │ -
│ │ │ -
1476 begin() noexcept
│ │ │ -
1477 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1478
│ │ │ -
1479 ///@{
│ │ │ -
1480 /**
│ │ │ -
1481 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
1482 * element in the %unordered_multimap.
│ │ │ -
1483 */
│ │ │ - │ │ │ -
│ │ │ -
1485 begin() const noexcept
│ │ │ -
1486 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1487
│ │ │ - │ │ │ -
│ │ │ -
1489 cbegin() const noexcept
│ │ │ -
1490 { return _M_h.begin(); }
│ │ │ -
│ │ │ -
1491 ///@}
│ │ │ -
1492
│ │ │ -
1493 /**
│ │ │ -
1494 * Returns a read/write iterator that points one past the last element in
│ │ │ -
1495 * the %unordered_multimap.
│ │ │ -
1496 */
│ │ │ -
1497 iterator
│ │ │ -
│ │ │ -
1498 end() noexcept
│ │ │ -
1499 { return _M_h.end(); }
│ │ │ +
1396 void
│ │ │ +
1397 _M_assign(_InputIterator __first, _InputIterator __last, false_type)
│ │ │ +
1398 {
│ │ │ +
1399 clear();
│ │ │ +
1400 insert_after(cbefore_begin(), __first, __last);
│ │ │ +
1401 }
│ │ │ +
1402
│ │ │ +
1403 // Called by assign(size_type, const _Tp&) if Tp is CopyAssignable
│ │ │ +
1404 void
│ │ │ +
1405 _M_assign_n(size_type __n, const _Tp& __val, true_type)
│ │ │ +
1406 {
│ │ │ +
1407 auto __prev = before_begin();
│ │ │ +
1408 auto __curr = begin();
│ │ │ +
1409 auto __end = end();
│ │ │ +
1410 while (__curr != __end && __n > 0)
│ │ │ +
1411 {
│ │ │ +
1412 *__curr = __val;
│ │ │ +
1413 ++__prev;
│ │ │ +
1414 ++__curr;
│ │ │ +
1415 --__n;
│ │ │ +
1416 }
│ │ │ +
1417 if (__n > 0)
│ │ │ +
1418 insert_after(__prev, __n, __val);
│ │ │ +
1419 else if (__curr != __end)
│ │ │ +
1420 erase_after(__prev, __end);
│ │ │ +
1421 }
│ │ │ +
1422
│ │ │ +
1423 // Called by assign(size_type, const _Tp&) if Tp is non-CopyAssignable
│ │ │ +
1424 void
│ │ │ +
1425 _M_assign_n(size_type __n, const _Tp& __val, false_type)
│ │ │ +
1426 {
│ │ │ +
1427 clear();
│ │ │ +
1428 insert_after(cbefore_begin(), __n, __val);
│ │ │ +
1429 }
│ │ │ +
1430 };
│ │ │ +
│ │ │ +
1431
│ │ │ +
1432#if __cpp_deduction_guides >= 201606
│ │ │ +
1433 template<typename _InputIterator, typename _ValT
│ │ │ +
1434 = typename iterator_traits<_InputIterator>::value_type,
│ │ │ +
1435 typename _Allocator = allocator<_ValT>,
│ │ │ +
1436 typename = _RequireInputIter<_InputIterator>,
│ │ │ +
1437 typename = _RequireAllocator<_Allocator>>
│ │ │ +
1438 forward_list(_InputIterator, _InputIterator, _Allocator = _Allocator())
│ │ │ +
1439 -> forward_list<_ValT, _Allocator>;
│ │ │ +
1440#endif
│ │ │ +
1441
│ │ │ +
1442 /**
│ │ │ +
1443 * @brief Forward list equality comparison.
│ │ │ +
1444 * @param __lx A %forward_list
│ │ │ +
1445 * @param __ly A %forward_list of the same type as @a __lx.
│ │ │ +
1446 * @return True iff the elements of the forward lists are equal.
│ │ │ +
1447 *
│ │ │ +
1448 * This is an equivalence relation. It is linear in the number of
│ │ │ +
1449 * elements of the forward lists. Deques are considered equivalent
│ │ │ +
1450 * if corresponding elements compare equal.
│ │ │ +
1451 */
│ │ │ +
1452 template<typename _Tp, typename _Alloc>
│ │ │ +
1453 [[__nodiscard__]]
│ │ │ +
1454 bool
│ │ │ +
1455 operator==(const forward_list<_Tp, _Alloc>& __lx,
│ │ │ +
1456 const forward_list<_Tp, _Alloc>& __ly);
│ │ │ +
1457
│ │ │ +
1458#if __cpp_lib_three_way_comparison
│ │ │ +
1459 /**
│ │ │ +
1460 * @brief Forward list ordering relation.
│ │ │ +
1461 * @param __x A `forward_list`.
│ │ │ +
1462 * @param __y A `forward_list` of the same type as `__x`.
│ │ │ +
1463 * @return A value indicating whether `__x` is less than, equal to,
│ │ │ +
1464 * greater than, or incomparable with `__y`.
│ │ │ +
1465 *
│ │ │ +
1466 * See `std::lexicographical_compare_three_way()` for how the determination
│ │ │ +
1467 * is made. This operator is used to synthesize relational operators like
│ │ │ +
1468 * `<` and `>=` etc.
│ │ │ +
1469 */
│ │ │ +
1470 template<typename _Tp, typename _Alloc>
│ │ │ +
1471 [[nodiscard]]
│ │ │ +
1472 inline __detail::__synth3way_t<_Tp>
│ │ │ +
1473 operator<=>(const forward_list<_Tp, _Alloc>& __x,
│ │ │ +
1474 const forward_list<_Tp, _Alloc>& __y)
│ │ │ +
1475 {
│ │ │ +
1476 return std::lexicographical_compare_three_way(__x.begin(), __x.end(),
│ │ │ +
1477 __y.begin(), __y.end(),
│ │ │ +
1478 __detail::__synth3way);
│ │ │ +
1479 }
│ │ │ +
1480#else
│ │ │ +
1481 /**
│ │ │ +
1482 * @brief Forward list ordering relation.
│ │ │ +
1483 * @param __lx A %forward_list.
│ │ │ +
1484 * @param __ly A %forward_list of the same type as @a __lx.
│ │ │ +
1485 * @return True iff @a __lx is lexicographically less than @a __ly.
│ │ │ +
1486 *
│ │ │ +
1487 * This is a total ordering relation. It is linear in the number of
│ │ │ +
1488 * elements of the forward lists. The elements must be comparable
│ │ │ +
1489 * with @c <.
│ │ │ +
1490 *
│ │ │ +
1491 * See std::lexicographical_compare() for how the determination is made.
│ │ │ +
1492 */
│ │ │ +
1493 template<typename _Tp, typename _Alloc>
│ │ │ +
1494 [[__nodiscard__]]
│ │ │ +
│ │ │ +
1495 inline bool
│ │ │ +
1496 operator<(const forward_list<_Tp, _Alloc>& __lx,
│ │ │ + │ │ │ +
1498 { return std::lexicographical_compare(__lx.cbegin(), __lx.cend(),
│ │ │ +
1499 __ly.cbegin(), __ly.cend()); }
│ │ │
│ │ │
1500
│ │ │ -
1501 ///@{
│ │ │ -
1502 /**
│ │ │ -
1503 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
1504 * element in the %unordered_multimap.
│ │ │ -
1505 */
│ │ │ - │ │ │ -
│ │ │ -
1507 end() const noexcept
│ │ │ -
1508 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1509
│ │ │ - │ │ │ -
│ │ │ -
1511 cend() const noexcept
│ │ │ -
1512 { return _M_h.end(); }
│ │ │ -
│ │ │ -
1513 ///@}
│ │ │ -
1514
│ │ │ -
1515 // modifiers.
│ │ │ +
1501 /// Based on operator==
│ │ │ +
1502 template<typename _Tp, typename _Alloc>
│ │ │ +
1503 [[__nodiscard__]]
│ │ │ +
1504 inline bool
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
1507 { return !(__lx == __ly); }
│ │ │ +
│ │ │ +
1508
│ │ │ +
1509 /// Based on operator<
│ │ │ +
1510 template<typename _Tp, typename _Alloc>
│ │ │ +
1511 [[__nodiscard__]]
│ │ │ +
1512 inline bool
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
1515 { return (__ly < __lx); }
│ │ │ +
│ │ │
1516
│ │ │ -
1517 /**
│ │ │ -
1518 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
1519 * %unordered_multimap.
│ │ │ -
1520 *
│ │ │ -
1521 * @param __args Arguments used to generate a new pair instance (see
│ │ │ -
1522 * std::piecewise_contruct for passing arguments to each
│ │ │ -
1523 * part of the pair constructor).
│ │ │ -
1524 *
│ │ │ -
1525 * @return An iterator that points to the inserted pair.
│ │ │ -
1526 *
│ │ │ -
1527 * This function attempts to build and insert a (key, value) %pair into
│ │ │ -
1528 * the %unordered_multimap.
│ │ │ -
1529 *
│ │ │ -
1530 * Insertion requires amortized constant time.
│ │ │ -
1531 */
│ │ │ -
1532 template<typename... _Args>
│ │ │ -
1533 iterator
│ │ │ -
│ │ │ - │ │ │ -
1535 { return _M_h.emplace(std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
1536
│ │ │ -
1537 /**
│ │ │ -
1538 * @brief Attempts to build and insert a std::pair into the
│ │ │ -
1539 * %unordered_multimap.
│ │ │ -
1540 *
│ │ │ -
1541 * @param __pos An iterator that serves as a hint as to where the pair
│ │ │ -
1542 * should be inserted.
│ │ │ -
1543 * @param __args Arguments used to generate a new pair instance (see
│ │ │ -
1544 * std::piecewise_contruct for passing arguments to each
│ │ │ -
1545 * part of the pair constructor).
│ │ │ -
1546 * @return An iterator that points to the element with key of the
│ │ │ -
1547 * std::pair built from @a __args.
│ │ │ -
1548 *
│ │ │ -
1549 * Note that the first parameter is only a hint and can potentially
│ │ │ -
1550 * improve the performance of the insertion process. A bad hint would
│ │ │ -
1551 * cause no gains in efficiency.
│ │ │ -
1552 *
│ │ │ -
1553 * See
│ │ │ -
1554 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
1555 * for more on @a hinting.
│ │ │ -
1556 *
│ │ │ -
1557 * Insertion requires amortized constant time.
│ │ │ -
1558 */
│ │ │ -
1559 template<typename... _Args>
│ │ │ -
1560 iterator
│ │ │ -
│ │ │ - │ │ │ -
1562 { return _M_h.emplace_hint(__pos, std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
1563
│ │ │ -
1564 ///@{
│ │ │ -
1565 /**
│ │ │ -
1566 * @brief Inserts a std::pair into the %unordered_multimap.
│ │ │ -
1567 * @param __x Pair to be inserted (see std::make_pair for easy
│ │ │ -
1568 * creation of pairs).
│ │ │ -
1569 *
│ │ │ -
1570 * @return An iterator that points to the inserted pair.
│ │ │ -
1571 *
│ │ │ -
1572 * Insertion requires amortized constant time.
│ │ │ -
1573 */
│ │ │ -
1574 iterator
│ │ │ -
│ │ │ -
1575 insert(const value_type& __x)
│ │ │ -
1576 { return _M_h.insert(__x); }
│ │ │ -
│ │ │ -
1577
│ │ │ -
1578 iterator
│ │ │ -
│ │ │ - │ │ │ -
1580 { return _M_h.insert(std::move(__x)); }
│ │ │ -
│ │ │ -
1581
│ │ │ -
1582 template<typename _Pair>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1585 { return _M_h.emplace(std::forward<_Pair>(__x)); }
│ │ │ -
│ │ │ -
1586 ///@}
│ │ │ -
1587
│ │ │ -
1588 ///@{
│ │ │ -
1589 /**
│ │ │ -
1590 * @brief Inserts a std::pair into the %unordered_multimap.
│ │ │ -
1591 * @param __hint An iterator that serves as a hint as to where the
│ │ │ -
1592 * pair should be inserted.
│ │ │ -
1593 * @param __x Pair to be inserted (see std::make_pair for easy creation
│ │ │ -
1594 * of pairs).
│ │ │ -
1595 * @return An iterator that points to the element with key of
│ │ │ -
1596 * @a __x (may or may not be the %pair passed in).
│ │ │ -
1597 *
│ │ │ -
1598 * Note that the first parameter is only a hint and can potentially
│ │ │ -
1599 * improve the performance of the insertion process. A bad hint would
│ │ │ -
1600 * cause no gains in efficiency.
│ │ │ -
1601 *
│ │ │ -
1602 * See
│ │ │ -
1603 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
1604 * for more on @a hinting.
│ │ │ -
1605 *
│ │ │ -
1606 * Insertion requires amortized constant time.
│ │ │ -
1607 */
│ │ │ -
1608 iterator
│ │ │ -
│ │ │ - │ │ │ -
1610 { return _M_h.insert(__hint, __x); }
│ │ │ -
│ │ │ -
1611
│ │ │ -
1612 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
1613 // 2354. Unnecessary copying when inserting into maps with braced-init
│ │ │ -
1614 iterator
│ │ │ -
│ │ │ - │ │ │ -
1616 { return _M_h.insert(__hint, std::move(__x)); }
│ │ │ -
│ │ │ -
1617
│ │ │ -
1618 template<typename _Pair>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1621 { return _M_h.emplace_hint(__hint, std::forward<_Pair>(__x)); }
│ │ │ -
│ │ │ -
1622 ///@}
│ │ │ -
1623
│ │ │ -
1624 /**
│ │ │ -
1625 * @brief A template function that attempts to insert a range of
│ │ │ -
1626 * elements.
│ │ │ -
1627 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
1628 * inserted.
│ │ │ -
1629 * @param __last Iterator pointing to the end of the range.
│ │ │ -
1630 *
│ │ │ -
1631 * Complexity similar to that of the range constructor.
│ │ │ -
1632 */
│ │ │ -
1633 template<typename _InputIterator>
│ │ │ -
1634 void
│ │ │ -
│ │ │ - │ │ │ -
1636 { _M_h.insert(__first, __last); }
│ │ │ -
│ │ │ -
1637
│ │ │ -
1638 /**
│ │ │ -
1639 * @brief Attempts to insert a list of elements into the
│ │ │ -
1640 * %unordered_multimap.
│ │ │ -
1641 * @param __l A std::initializer_list<value_type> of elements
│ │ │ -
1642 * to be inserted.
│ │ │ -
1643 *
│ │ │ -
1644 * Complexity similar to that of the range constructor.
│ │ │ -
1645 */
│ │ │ -
1646 void
│ │ │ -
│ │ │ - │ │ │ -
1648 { _M_h.insert(__l); }
│ │ │ -
│ │ │ -
1649
│ │ │ -
1650#if __cplusplus > 201402L
│ │ │ -
1651 /// Extract a node.
│ │ │ -
1652 node_type
│ │ │ -
│ │ │ - │ │ │ -
1654 {
│ │ │ -
1655 __glibcxx_assert(__pos != end());
│ │ │ -
1656 return _M_h.extract(__pos);
│ │ │ -
1657 }
│ │ │ -
│ │ │ -
1658
│ │ │ -
1659 /// Extract a node.
│ │ │ -
1660 node_type
│ │ │ -
│ │ │ - │ │ │ -
1662 { return _M_h.extract(__key); }
│ │ │ -
│ │ │ -
1663
│ │ │ -
1664 /// Re-insert an extracted node.
│ │ │ -
1665 iterator
│ │ │ -
│ │ │ -
1666 insert(node_type&& __nh)
│ │ │ -
1667 { return _M_h._M_reinsert_node_multi(cend(), std::move(__nh)); }
│ │ │ -
│ │ │ -
1668
│ │ │ -
1669 /// Re-insert an extracted node.
│ │ │ -
1670 iterator
│ │ │ -
│ │ │ - │ │ │ -
1672 { return _M_h._M_reinsert_node_multi(__hint, std::move(__nh)); }
│ │ │ -
│ │ │ -
1673#endif // C++17
│ │ │ -
1674
│ │ │ -
1675 ///@{
│ │ │ -
1676 /**
│ │ │ -
1677 * @brief Erases an element from an %unordered_multimap.
│ │ │ -
1678 * @param __position An iterator pointing to the element to be erased.
│ │ │ -
1679 * @return An iterator pointing to the element immediately following
│ │ │ -
1680 * @a __position prior to the element being erased. If no such
│ │ │ -
1681 * element exists, end() is returned.
│ │ │ -
1682 *
│ │ │ -
1683 * This function erases an element, pointed to by the given iterator,
│ │ │ -
1684 * from an %unordered_multimap.
│ │ │ -
1685 * Note that this function only erases the element, and that if the
│ │ │ -
1686 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
1687 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
1688 */
│ │ │ -
1689 iterator
│ │ │ -
│ │ │ - │ │ │ -
1691 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
1692
│ │ │ -
1693 // LWG 2059.
│ │ │ -
1694 iterator
│ │ │ -
│ │ │ - │ │ │ -
1696 { return _M_h.erase(__position); }
│ │ │ -
│ │ │ -
1697 ///@}
│ │ │ -
1698
│ │ │ -
1699 /**
│ │ │ -
1700 * @brief Erases elements according to the provided key.
│ │ │ -
1701 * @param __x Key of elements to be erased.
│ │ │ -
1702 * @return The number of elements erased.
│ │ │ -
1703 *
│ │ │ -
1704 * This function erases all the elements located by the given key from
│ │ │ -
1705 * an %unordered_multimap.
│ │ │ -
1706 * Note that this function only erases the element, and that if the
│ │ │ -
1707 * element is itself a pointer, the pointed-to memory is not touched in
│ │ │ -
1708 * any way. Managing the pointer is the user's responsibility.
│ │ │ -
1709 */
│ │ │ -
1710 size_type
│ │ │ -
│ │ │ -
1711 erase(const key_type& __x)
│ │ │ -
1712 { return _M_h.erase(__x); }
│ │ │ -
│ │ │ -
1713
│ │ │ -
1714 /**
│ │ │ -
1715 * @brief Erases a [__first,__last) range of elements from an
│ │ │ -
1716 * %unordered_multimap.
│ │ │ -
1717 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
1718 * erased.
│ │ │ -
1719 * @param __last Iterator pointing to the end of the range to
│ │ │ -
1720 * be erased.
│ │ │ -
1721 * @return The iterator @a __last.
│ │ │ -
1722 *
│ │ │ -
1723 * This function erases a sequence of elements from an
│ │ │ -
1724 * %unordered_multimap.
│ │ │ -
1725 * Note that this function only erases the elements, and that if
│ │ │ -
1726 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
1727 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
1728 */
│ │ │ -
1729 iterator
│ │ │ -
│ │ │ - │ │ │ -
1731 { return _M_h.erase(__first, __last); }
│ │ │ -
│ │ │ -
1732
│ │ │ -
1733 /**
│ │ │ -
1734 * Erases all elements in an %unordered_multimap.
│ │ │ -
1735 * Note that this function only erases the elements, and that if the
│ │ │ -
1736 * elements themselves are pointers, the pointed-to memory is not touched
│ │ │ -
1737 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
1738 */
│ │ │ -
1739 void
│ │ │ -
│ │ │ -
1740 clear() noexcept
│ │ │ -
1741 { _M_h.clear(); }
│ │ │ -
│ │ │ -
1742
│ │ │ -
1743 /**
│ │ │ -
1744 * @brief Swaps data with another %unordered_multimap.
│ │ │ -
1745 * @param __x An %unordered_multimap of the same element and allocator
│ │ │ -
1746 * types.
│ │ │ -
1747 *
│ │ │ -
1748 * This exchanges the elements between two %unordered_multimap in
│ │ │ -
1749 * constant time.
│ │ │ -
1750 * Note that the global std::swap() function is specialized such that
│ │ │ -
1751 * std::swap(m1,m2) will feed to this function.
│ │ │ -
1752 */
│ │ │ -
1753 void
│ │ │ -
│ │ │ - │ │ │ -
1755 noexcept( noexcept(_M_h.swap(__x._M_h)) )
│ │ │ -
1756 { _M_h.swap(__x._M_h); }
│ │ │ -
│ │ │ -
1757
│ │ │ -
1758#if __cplusplus > 201402L
│ │ │ -
1759 template<typename, typename, typename>
│ │ │ -
1760 friend class std::_Hash_merge_helper;
│ │ │ -
1761
│ │ │ -
1762 template<typename _H2, typename _P2>
│ │ │ -
1763 void
│ │ │ - │ │ │ -
1765 {
│ │ │ -
1766 using _Merge_helper
│ │ │ - │ │ │ -
1768 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ -
1769 }
│ │ │ -
1770
│ │ │ -
1771 template<typename _H2, typename _P2>
│ │ │ -
1772 void
│ │ │ -
1773 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ -
1774 { merge(__source); }
│ │ │ -
1775
│ │ │ -
1776 template<typename _H2, typename _P2>
│ │ │ -
1777 void
│ │ │ -
1778 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source)
│ │ │ -
1779 {
│ │ │ -
1780 using _Merge_helper
│ │ │ -
1781 = _Hash_merge_helper<unordered_multimap, _H2, _P2>;
│ │ │ -
1782 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source));
│ │ │ -
1783 }
│ │ │ -
1784
│ │ │ -
1785 template<typename _H2, typename _P2>
│ │ │ -
1786 void
│ │ │ -
1787 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source)
│ │ │ -
1788 { merge(__source); }
│ │ │ -
1789#endif // C++17
│ │ │ -
1790
│ │ │ -
1791 // observers.
│ │ │ -
1792
│ │ │ -
1793 /// Returns the hash functor object with which the %unordered_multimap
│ │ │ -
1794 /// was constructed.
│ │ │ -
1795 hasher
│ │ │ -
│ │ │ - │ │ │ -
1797 { return _M_h.hash_function(); }
│ │ │ -
│ │ │ -
1798
│ │ │ -
1799 /// Returns the key comparison object with which the %unordered_multimap
│ │ │ -
1800 /// was constructed.
│ │ │ -
1801 key_equal
│ │ │ -
│ │ │ -
1802 key_eq() const
│ │ │ -
1803 { return _M_h.key_eq(); }
│ │ │ -
│ │ │ -
1804
│ │ │ -
1805 // lookup.
│ │ │ -
1806
│ │ │ -
1807 ///@{
│ │ │ -
1808 /**
│ │ │ -
1809 * @brief Tries to locate an element in an %unordered_multimap.
│ │ │ -
1810 * @param __x Key to be located.
│ │ │ -
1811 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ -
1812 * found.
│ │ │ -
1813 *
│ │ │ -
1814 * This function takes a key and tries to locate the element with which
│ │ │ -
1815 * the key matches. If successful the function returns an iterator
│ │ │ -
1816 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ -
1817 * past-the-end ( @c end() ) iterator.
│ │ │ -
1818 */
│ │ │ -
1819 iterator
│ │ │ -
│ │ │ -
1820 find(const key_type& __x)
│ │ │ -
1821 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
1822
│ │ │ -
1823#if __cplusplus > 201703L
│ │ │ -
1824 template<typename _Kt>
│ │ │ -
1825 auto
│ │ │ -
│ │ │ -
1826 find(const _Kt& __x) -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
1827 { return _M_h._M_find_tr(__x); }
│ │ │ -
│ │ │ -
1828#endif
│ │ │ -
1829
│ │ │ - │ │ │ -
│ │ │ -
1831 find(const key_type& __x) const
│ │ │ -
1832 { return _M_h.find(__x); }
│ │ │ -
│ │ │ -
1833
│ │ │ -
1834#if __cplusplus > 201703L
│ │ │ -
1835 template<typename _Kt>
│ │ │ -
1836 auto
│ │ │ -
│ │ │ -
1837 find(const _Kt& __x) const -> decltype(_M_h._M_find_tr(__x))
│ │ │ -
1838 { return _M_h._M_find_tr(__x); }
│ │ │ -
│ │ │ -
1839#endif
│ │ │ -
1840 ///@}
│ │ │ -
1841
│ │ │ -
1842 ///@{
│ │ │ -
1843 /**
│ │ │ -
1844 * @brief Finds the number of elements.
│ │ │ -
1845 * @param __x Key to count.
│ │ │ -
1846 * @return Number of elements with specified key.
│ │ │ -
1847 */
│ │ │ -
1848 size_type
│ │ │ -
│ │ │ -
1849 count(const key_type& __x) const
│ │ │ -
1850 { return _M_h.count(__x); }
│ │ │ -
│ │ │ -
1851
│ │ │ -
1852#if __cplusplus > 201703L
│ │ │ -
1853 template<typename _Kt>
│ │ │ -
1854 auto
│ │ │ -
│ │ │ -
1855 count(const _Kt& __x) const -> decltype(_M_h._M_count_tr(__x))
│ │ │ -
1856 { return _M_h._M_count_tr(__x); }
│ │ │ -
│ │ │ -
1857#endif
│ │ │ -
1858 ///@}
│ │ │ -
1859
│ │ │ -
1860#if __cplusplus > 201703L
│ │ │ -
1861 ///@{
│ │ │ -
1862 /**
│ │ │ -
1863 * @brief Finds whether an element with the given key exists.
│ │ │ -
1864 * @param __x Key of elements to be located.
│ │ │ -
1865 * @return True if there is any element with the specified key.
│ │ │ -
1866 */
│ │ │ -
1867 bool
│ │ │ -
│ │ │ -
1868 contains(const key_type& __x) const
│ │ │ -
1869 { return _M_h.find(__x) != _M_h.end(); }
│ │ │ -
│ │ │ -
1870
│ │ │ -
1871 template<typename _Kt>
│ │ │ -
1872 auto
│ │ │ -
│ │ │ -
1873 contains(const _Kt& __x) const
│ │ │ -
1874 -> decltype(_M_h._M_find_tr(__x), void(), true)
│ │ │ -
1875 { return _M_h._M_find_tr(__x) != _M_h.end(); }
│ │ │ -
│ │ │ -
1876 ///@}
│ │ │ -
1877#endif
│ │ │ -
1878
│ │ │ -
1879 ///@{
│ │ │ -
1880 /**
│ │ │ -
1881 * @brief Finds a subsequence matching given key.
│ │ │ -
1882 * @param __x Key to be located.
│ │ │ -
1883 * @return Pair of iterators that possibly points to the subsequence
│ │ │ -
1884 * matching given key.
│ │ │ -
1885 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1888 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
1889
│ │ │ -
1890#if __cplusplus > 201703L
│ │ │ -
1891 template<typename _Kt>
│ │ │ -
1892 auto
│ │ │ -
│ │ │ -
1893 equal_range(const _Kt& __x)
│ │ │ -
1894 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
1895 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
│ │ │ -
1896#endif
│ │ │ -
1897
│ │ │ - │ │ │ -
│ │ │ -
1899 equal_range(const key_type& __x) const
│ │ │ -
1900 { return _M_h.equal_range(__x); }
│ │ │ -
│ │ │ -
1901
│ │ │ -
1902#if __cplusplus > 201703L
│ │ │ -
1903 template<typename _Kt>
│ │ │ -
1904 auto
│ │ │ -
│ │ │ -
1905 equal_range(const _Kt& __x) const
│ │ │ -
1906 -> decltype(_M_h._M_equal_range_tr(__x))
│ │ │ -
1907 { return _M_h._M_equal_range_tr(__x); }
│ │ │ -
│ │ │ -
1908#endif
│ │ │ -
1909 ///@}
│ │ │ -
1910
│ │ │ -
1911 // bucket interface.
│ │ │ -
1912
│ │ │ -
1913 /// Returns the number of buckets of the %unordered_multimap.
│ │ │ -
1914 size_type
│ │ │ -
│ │ │ -
1915 bucket_count() const noexcept
│ │ │ -
1916 { return _M_h.bucket_count(); }
│ │ │ -
│ │ │ -
1917
│ │ │ -
1918 /// Returns the maximum number of buckets of the %unordered_multimap.
│ │ │ -
1919 size_type
│ │ │ -
│ │ │ -
1920 max_bucket_count() const noexcept
│ │ │ -
1921 { return _M_h.max_bucket_count(); }
│ │ │ -
│ │ │ -
1922
│ │ │ -
1923 /*
│ │ │ -
1924 * @brief Returns the number of elements in a given bucket.
│ │ │ -
1925 * @param __n A bucket index.
│ │ │ -
1926 * @return The number of elements in the bucket.
│ │ │ -
1927 */
│ │ │ -
1928 size_type
│ │ │ -
1929 bucket_size(size_type __n) const
│ │ │ -
1930 { return _M_h.bucket_size(__n); }
│ │ │ -
1931
│ │ │ -
1932 /*
│ │ │ -
1933 * @brief Returns the bucket index of a given element.
│ │ │ -
1934 * @param __key A key instance.
│ │ │ -
1935 * @return The key bucket index.
│ │ │ -
1936 */
│ │ │ -
1937 size_type
│ │ │ -
1938 bucket(const key_type& __key) const
│ │ │ -
1939 { return _M_h.bucket(__key); }
│ │ │ -
1940
│ │ │ -
1941 /**
│ │ │ -
1942 * @brief Returns a read/write iterator pointing to the first bucket
│ │ │ -
1943 * element.
│ │ │ -
1944 * @param __n The bucket index.
│ │ │ -
1945 * @return A read/write local iterator.
│ │ │ -
1946 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1949 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1950
│ │ │ -
1951 ///@{
│ │ │ -
1952 /**
│ │ │ -
1953 * @brief Returns a read-only (constant) iterator pointing to the first
│ │ │ -
1954 * bucket element.
│ │ │ -
1955 * @param __n The bucket index.
│ │ │ -
1956 * @return A read-only local iterator.
│ │ │ -
1957 */
│ │ │ - │ │ │ -
│ │ │ -
1959 begin(size_type __n) const
│ │ │ -
1960 { return _M_h.begin(__n); }
│ │ │ -
│ │ │ -
1961
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1964 { return _M_h.cbegin(__n); }
│ │ │ -
│ │ │ -
1965 ///@}
│ │ │ -
1966
│ │ │ -
1967 /**
│ │ │ -
1968 * @brief Returns a read/write iterator pointing to one past the last
│ │ │ -
1969 * bucket elements.
│ │ │ -
1970 * @param __n The bucket index.
│ │ │ -
1971 * @return A read/write local iterator.
│ │ │ -
1972 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
1975 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1976
│ │ │ -
1977 ///@{
│ │ │ -
1978 /**
│ │ │ -
1979 * @brief Returns a read-only (constant) iterator pointing to one past
│ │ │ -
1980 * the last bucket elements.
│ │ │ -
1981 * @param __n The bucket index.
│ │ │ -
1982 * @return A read-only local iterator.
│ │ │ -
1983 */
│ │ │ - │ │ │ -
│ │ │ -
1985 end(size_type __n) const
│ │ │ -
1986 { return _M_h.end(__n); }
│ │ │ -
│ │ │ -
1987
│ │ │ - │ │ │ -
│ │ │ -
1989 cend(size_type __n) const
│ │ │ -
1990 { return _M_h.cend(__n); }
│ │ │ -
│ │ │ -
1991 ///@}
│ │ │ -
1992
│ │ │ -
1993 // hash policy.
│ │ │ -
1994
│ │ │ -
1995 /// Returns the average number of elements per bucket.
│ │ │ -
1996 float
│ │ │ -
│ │ │ -
1997 load_factor() const noexcept
│ │ │ -
1998 { return _M_h.load_factor(); }
│ │ │ -
│ │ │ -
1999
│ │ │ -
2000 /// Returns a positive number that the %unordered_multimap tries to keep
│ │ │ -
2001 /// the load factor less than or equal to.
│ │ │ -
2002 float
│ │ │ -
│ │ │ -
2003 max_load_factor() const noexcept
│ │ │ -
2004 { return _M_h.max_load_factor(); }
│ │ │ -
│ │ │ -
2005
│ │ │ -
2006 /**
│ │ │ -
2007 * @brief Change the %unordered_multimap maximum load factor.
│ │ │ -
2008 * @param __z The new maximum load factor.
│ │ │ -
2009 */
│ │ │ -
2010 void
│ │ │ -
│ │ │ - │ │ │ -
2012 { _M_h.max_load_factor(__z); }
│ │ │ -
│ │ │ -
2013
│ │ │ -
2014 /**
│ │ │ -
2015 * @brief May rehash the %unordered_multimap.
│ │ │ -
2016 * @param __n The new number of buckets.
│ │ │ -
2017 *
│ │ │ -
2018 * Rehash will occur only if the new number of buckets respect the
│ │ │ -
2019 * %unordered_multimap maximum load factor.
│ │ │ -
2020 */
│ │ │ -
2021 void
│ │ │ -
│ │ │ - │ │ │ -
2023 { _M_h.rehash(__n); }
│ │ │ -
│ │ │ -
2024
│ │ │ -
2025 /**
│ │ │ -
2026 * @brief Prepare the %unordered_multimap for a specified number of
│ │ │ -
2027 * elements.
│ │ │ -
2028 * @param __n Number of elements required.
│ │ │ -
2029 *
│ │ │ -
2030 * Same as rehash(ceil(n / max_load_factor())).
│ │ │ -
2031 */
│ │ │ -
2032 void
│ │ │ -
│ │ │ - │ │ │ -
2034 { _M_h.reserve(__n); }
│ │ │ -
│ │ │ -
2035
│ │ │ -
2036 template<typename _Key1, typename _Tp1, typename _Hash1, typename _Pred1,
│ │ │ -
2037 typename _Alloc1>
│ │ │ -
2038 friend bool
│ │ │ -
2039 operator==(const unordered_multimap<_Key1, _Tp1,
│ │ │ -
2040 _Hash1, _Pred1, _Alloc1>&,
│ │ │ - │ │ │ -
2042 _Hash1, _Pred1, _Alloc1>&);
│ │ │ -
2043 };
│ │ │ -
│ │ │ -
2044
│ │ │ -
2045#if __cpp_deduction_guides >= 201606
│ │ │ -
2046
│ │ │ -
2047 template<typename _InputIterator,
│ │ │ -
2048 typename _Hash = hash<__iter_key_t<_InputIterator>>,
│ │ │ -
2049 typename _Pred = equal_to<__iter_key_t<_InputIterator>>,
│ │ │ -
2050 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>,
│ │ │ -
2051 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
2052 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
2053 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
2054 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2055 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
2057 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ -
2058 _Allocator = _Allocator())
│ │ │ -
2059 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ -
2060 __iter_val_t<_InputIterator>, _Hash, _Pred,
│ │ │ -
2061 _Allocator>;
│ │ │ -
2062
│ │ │ -
2063 template<typename _Key, typename _Tp, typename _Hash = hash<_Key>,
│ │ │ -
2064 typename _Pred = equal_to<_Key>,
│ │ │ -
2065 typename _Allocator = allocator<pair<const _Key, _Tp>>,
│ │ │ -
2066 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
2067 typename = _RequireNotAllocator<_Pred>,
│ │ │ -
2068 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2069 unordered_multimap(initializer_list<pair<_Key, _Tp>>,
│ │ │ - │ │ │ -
2071 _Hash = _Hash(), _Pred = _Pred(),
│ │ │ -
2072 _Allocator = _Allocator())
│ │ │ -
2073 -> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Allocator>;
│ │ │ -
2074
│ │ │ -
2075 template<typename _InputIterator, typename _Allocator,
│ │ │ -
2076 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
2077 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2078 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
2080 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ -
2081 __iter_val_t<_InputIterator>,
│ │ │ -
2082 hash<__iter_key_t<_InputIterator>>,
│ │ │ -
2083 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ -
2084
│ │ │ -
2085 template<typename _InputIterator, typename _Allocator,
│ │ │ -
2086 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
2087 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2088 unordered_multimap(_InputIterator, _InputIterator, _Allocator)
│ │ │ -
2089 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ -
2090 __iter_val_t<_InputIterator>,
│ │ │ -
2091 hash<__iter_key_t<_InputIterator>>,
│ │ │ -
2092 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ -
2093
│ │ │ -
2094 template<typename _InputIterator, typename _Hash, typename _Allocator,
│ │ │ -
2095 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
2096 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
2097 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2098 unordered_multimap(_InputIterator, _InputIterator,
│ │ │ - │ │ │ -
2100 _Allocator)
│ │ │ -
2101 -> unordered_multimap<__iter_key_t<_InputIterator>,
│ │ │ -
2102 __iter_val_t<_InputIterator>, _Hash,
│ │ │ -
2103 equal_to<__iter_key_t<_InputIterator>>, _Allocator>;
│ │ │ -
2104
│ │ │ -
2105 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ -
2106 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2107 unordered_multimap(initializer_list<pair<_Key, _Tp>>,
│ │ │ - │ │ │ -
2109 _Allocator)
│ │ │ -
2110 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ -
2111
│ │ │ -
2112 template<typename _Key, typename _Tp, typename _Allocator,
│ │ │ -
2113 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2114 unordered_multimap(initializer_list<pair<_Key, _Tp>>, _Allocator)
│ │ │ -
2115 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>;
│ │ │ -
2116
│ │ │ -
2117 template<typename _Key, typename _Tp, typename _Hash, typename _Allocator,
│ │ │ -
2118 typename = _RequireNotAllocatorOrIntegral<_Hash>,
│ │ │ -
2119 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2120 unordered_multimap(initializer_list<pair<_Key, _Tp>>,
│ │ │ - │ │ │ -
2122 _Hash, _Allocator)
│ │ │ -
2123 -> unordered_multimap<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>;
│ │ │ -
2124
│ │ │ -
2125#endif
│ │ │ -
2126
│ │ │ -
2127 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2128 inline void
│ │ │ -
2129 swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
2130 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
2131 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
2132 { __x.swap(__y); }
│ │ │ -
2133
│ │ │ -
2134 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2135 inline void
│ │ │ -
2136 swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
2137 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
2138 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
2139 { __x.swap(__y); }
│ │ │ -
2140
│ │ │ -
2141 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2142 inline bool
│ │ │ -
2143 operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
2144 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
2145 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ -
2146
│ │ │ -
2147#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
2148 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2149 inline bool
│ │ │ -
2150 operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
2151 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
2152 { return !(__x == __y); }
│ │ │ -
2153#endif
│ │ │ -
2154
│ │ │ -
2155 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2156 inline bool
│ │ │ -
2157 operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
2158 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
2159 { return __x._M_h._M_equal(__y._M_h); }
│ │ │ -
2160
│ │ │ -
2161#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
2162 template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
│ │ │ -
2163 inline bool
│ │ │ -
2164 operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
│ │ │ -
2165 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
│ │ │ -
2166 { return !(__x == __y); }
│ │ │ -
2167#endif
│ │ │ -
2168
│ │ │ -
2169_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ -
2170
│ │ │ -
2171#if __cplusplus > 201402L
│ │ │ -
2172 // Allow std::unordered_map access to internals of compatible maps.
│ │ │ -
2173 template<typename _Key, typename _Val, typename _Hash1, typename _Eq1,
│ │ │ -
2174 typename _Alloc, typename _Hash2, typename _Eq2>
│ │ │ -
2175 struct _Hash_merge_helper<
│ │ │ -
2176 _GLIBCXX_STD_C::unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>,
│ │ │ -
2177 _Hash2, _Eq2>
│ │ │ -
2178 {
│ │ │ -
2179 private:
│ │ │ -
2180 template<typename... _Tp>
│ │ │ -
2181 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>;
│ │ │ -
2182 template<typename... _Tp>
│ │ │ -
2183 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>;
│ │ │ -
2184
│ │ │ -
2185 friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>;
│ │ │ -
2186
│ │ │ -
2187 static auto&
│ │ │ -
2188 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ -
2189 { return __map._M_h; }
│ │ │ -
2190
│ │ │ -
2191 static auto&
│ │ │ -
2192 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ -
2193 { return __map._M_h; }
│ │ │ -
2194 };
│ │ │ -
2195
│ │ │ -
2196 // Allow std::unordered_multimap access to internals of compatible maps.
│ │ │ -
2197 template<typename _Key, typename _Val, typename _Hash1, typename _Eq1,
│ │ │ -
2198 typename _Alloc, typename _Hash2, typename _Eq2>
│ │ │ -
2199 struct _Hash_merge_helper<
│ │ │ -
2200 _GLIBCXX_STD_C::unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>,
│ │ │ -
2201 _Hash2, _Eq2>
│ │ │ -
2202 {
│ │ │ -
2203 private:
│ │ │ -
2204 template<typename... _Tp>
│ │ │ -
2205 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>;
│ │ │ -
2206 template<typename... _Tp>
│ │ │ -
2207 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>;
│ │ │ -
2208
│ │ │ -
2209 friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>;
│ │ │ -
2210
│ │ │ -
2211 static auto&
│ │ │ -
2212 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ -
2213 { return __map._M_h; }
│ │ │ -
2214
│ │ │ -
2215 static auto&
│ │ │ -
2216 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map)
│ │ │ -
2217 { return __map._M_h; }
│ │ │ -
2218 };
│ │ │ -
2219#endif // C++17
│ │ │ -
2220
│ │ │ -
2221_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
2222} // namespace std
│ │ │ -
2223
│ │ │ -
2224#endif /* _UNORDERED_MAP_H */
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:97
│ │ │ +
1517 /// Based on operator<
│ │ │ +
1518 template<typename _Tp, typename _Alloc>
│ │ │ +
1519 [[__nodiscard__]]
│ │ │ +
1520 inline bool
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
1523 { return !(__lx < __ly); }
│ │ │ +
│ │ │ +
1524
│ │ │ +
1525 /// Based on operator<
│ │ │ +
1526 template<typename _Tp, typename _Alloc>
│ │ │ +
1527 [[__nodiscard__]]
│ │ │ +
│ │ │ +
1528 inline bool
│ │ │ +
1529 operator<=(const forward_list<_Tp, _Alloc>& __lx,
│ │ │ + │ │ │ +
1531 { return !(__ly < __lx); }
│ │ │ +
│ │ │ +
1532#endif // three-way comparison
│ │ │ +
1533
│ │ │ +
1534 /// See std::forward_list::swap().
│ │ │ +
1535 template<typename _Tp, typename _Alloc>
│ │ │ +
1536 inline void
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
1539 noexcept(noexcept(__lx.swap(__ly)))
│ │ │ +
1540 { __lx.swap(__ly); }
│ │ │ +
│ │ │ +
1541
│ │ │ +
1542_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ +
1543_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
1544} // namespace std
│ │ │ +
1545
│ │ │ +
1546#endif // _FORWARD_LIST_H
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition type_traits:82
│ │ │ +
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Definition type_traits:85
│ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:97
│ │ │ +
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
__detail::_Hashtable_traits< _Cache, false, false > __ummap_traits
Base types for unordered_multimap.
│ │ │ -
__detail::_Hashtable_traits< _Cache, false, true > __umap_traits
Base types for unordered_map.
│ │ │ -
Common iterator class.
│ │ │ -
A standard container composed of equivalent keys (possibly containing multiple of each key value) tha...
│ │ │ -
float load_factor() const noexcept
Returns the average number of elements per bucket.
│ │ │ -
_Hashtable::reference reference
Iterator-related typedefs.
│ │ │ -
iterator erase(iterator __position)
Erases an element from an unordered_multimap.
│ │ │ -
const_iterator end() const noexcept
│ │ │ -
size_type erase(const key_type &__x)
Erases elements according to the provided key.
│ │ │ -
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
│ │ │ -
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_multimap.
│ │ │ -
_Hashtable::iterator iterator
Iterator-related typedefs.
│ │ │ -
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_multimap.
│ │ │ -
iterator begin() noexcept
│ │ │ -
const_iterator begin() const noexcept
│ │ │ -
hasher hash_function() const
Returns the hash functor object with which the unordered_multimap was constructed.
│ │ │ -
iterator insert(const_iterator __hint, node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > insert(const_iterator __hint, _Pair &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ -
unordered_multimap & operator=(const unordered_multimap &)=default
Copy assignment operator.
│ │ │ -
key_equal key_eq() const
Returns the key comparison object with which the unordered_multimap was constructed.
│ │ │ -
size_type count(const key_type &__x) const
Finds the number of elements.
│ │ │ -
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_multimap.
│ │ │ -
_Hashtable::mapped_type mapped_type
Public typedefs.
│ │ │ -
auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_multimap.
│ │ │ -
local_iterator end(size_type __n)
Returns a read/write iterator pointing to one past the last bucket elements.
│ │ │ -
void insert(_InputIterator __first, _InputIterator __last)
A template function that attempts to insert a range of elements.
│ │ │ -
unordered_multimap & operator=(initializer_list< value_type > __l)
Unordered_multimap list assignment operator.
│ │ │ -
unordered_multimap(size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Default constructor creates no elements.
│ │ │ -
_Hashtable::value_type value_type
Public typedefs.
│ │ │ -
iterator emplace(_Args &&... __args)
Attempts to build and insert a std::pair into the unordered_multimap.
│ │ │ -
node_type extract(const key_type &__key)
Extract a node.
│ │ │ -
bool contains(const key_type &__x) const
Finds whether an element with the given key exists.
│ │ │ -
_Hashtable::const_reference const_reference
Iterator-related typedefs.
│ │ │ -
iterator insert(node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
iterator erase(const_iterator __position)
Erases an element from an unordered_multimap.
│ │ │ -
iterator end() noexcept
│ │ │ -
local_iterator begin(size_type __n)
Returns a read/write iterator pointing to the first bucket element.
│ │ │ -
float max_load_factor() const noexcept
Returns a positive number that the unordered_multimap tries to keep the load factor less than or equa...
│ │ │ -
unordered_multimap()=default
Default constructor.
│ │ │ -
iterator insert(value_type &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ -
iterator insert(const value_type &__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ -
unordered_multimap & operator=(unordered_multimap &&)=default
Move assignment operator.
│ │ │ -
_Hashtable::hasher hasher
Public typedefs.
│ │ │ -
_Hashtable::local_iterator local_iterator
Iterator-related typedefs.
│ │ │ -
void reserve(size_type __n)
Prepare the unordered_multimap for a specified number of elements.
│ │ │ -
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
│ │ │ -
unordered_multimap(_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_multimap from a range.
│ │ │ - │ │ │ -
iterator find(const key_type &__x)
Tries to locate an element in an unordered_multimap.
│ │ │ -
unordered_multimap(initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_multimap from an initializer_list.
│ │ │ -
auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x))
Finds the number of elements.
│ │ │ -
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_multimap.
│ │ │ -
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
_Hashtable::pointer pointer
Iterator-related typedefs.
│ │ │ -
_Hashtable::allocator_type allocator_type
Public typedefs.
│ │ │ -
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_multimap.
│ │ │ -
_Hashtable::const_local_iterator const_local_iterator
Iterator-related typedefs.
│ │ │ -
unordered_multimap(unordered_multimap &&)=default
Move constructor.
│ │ │ -
unordered_multimap(const allocator_type &__a)
Creates an unordered_multimap with no elements.
│ │ │ -
_Hashtable::difference_type difference_type
Iterator-related typedefs.
│ │ │ -
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ -
_Hashtable::const_pointer const_pointer
Iterator-related typedefs.
│ │ │ -
__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > insert(_Pair &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ -
auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), true)
Finds whether an element with the given key exists.
│ │ │ -
void swap(unordered_multimap &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_multimap.
│ │ │ -
void rehash(size_type __n)
May rehash the unordered_multimap.
│ │ │ -
_Hashtable::const_iterator const_iterator
Iterator-related typedefs.
│ │ │ -
void insert(initializer_list< value_type > __l)
Attempts to insert a list of elements into the unordered_multimap.
│ │ │ -
const_iterator cend() const noexcept
│ │ │ -
size_type max_size() const noexcept
Returns the maximum size of the unordered_multimap.
│ │ │ -
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
bool empty() const noexcept
Returns true if the unordered_multimap is empty.
│ │ │ -
const_iterator cbegin() const noexcept
│ │ │ -
_Hashtable::key_type key_type
Public typedefs.
│ │ │ -
node_type extract(const_iterator __pos)
Extract a node.
│ │ │ -
const_local_iterator cend(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
iterator insert(const_iterator __hint, const value_type &__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ -
size_type size() const noexcept
Returns the size of the unordered_multimap.
│ │ │ -
unordered_multimap(const unordered_multimap &)=default
Copy constructor.
│ │ │ -
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_multimap.
│ │ │ -
iterator insert(const_iterator __hint, value_type &&__x)
Inserts a std::pair into the unordered_multimap.
│ │ │ -
auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ -
_Hashtable::key_equal key_equal
Public typedefs.
│ │ │ -
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_multimap.
│ │ │ -
void max_load_factor(float __z)
Change the unordered_multimap maximum load factor.
│ │ │ -
auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ -
A standard container composed of unique keys (containing at most one of each key value) that associat...
│ │ │ -
iterator insert(const_iterator __hint, value_type &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
_Hashtable::iterator iterator
Iterator-related typedefs.
│ │ │ -
void max_load_factor(float __z)
Change the unordered_map maximum load factor.
│ │ │ -
const mapped_type & at(const key_type &__k) const
Access to unordered_map data.
│ │ │ -
bool contains(const key_type &__x) const
Finds whether an element with the given key exists.
│ │ │ -
node_type extract(const key_type &__key)
Extract a node.
│ │ │ -
void insert(_InputIterator __first, _InputIterator __last)
A template function that attempts to insert a range of elements.
│ │ │ -
allocator_type get_allocator() const noexcept
Returns the allocator object used by the unordered_map.
│ │ │ -
auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_map.
│ │ │ -
unordered_map & operator=(initializer_list< value_type > __l)
Unordered_map list assignment operator.
│ │ │ -
_Hashtable::const_pointer const_pointer
Iterator-related typedefs.
│ │ │ -
auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x))
Tries to locate an element in an unordered_map.
│ │ │ -
void insert(initializer_list< value_type > __l)
Attempts to insert a list of elements into the unordered_map.
│ │ │ -
__enable_if_t< is_constructible< value_type, _Pair && >::value, iterator > insert(const_iterator __hint, _Pair &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
│ │ │ -
mapped_type & at(const key_type &__k)
Access to unordered_map data.
│ │ │ -
iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from an unordered_map.
│ │ │ -
iterator try_emplace(const_iterator __hint, const key_type &__k, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ -
node_type extract(const_iterator __pos)
Extract a node.
│ │ │ -
std::pair< iterator, bool > insert(const value_type &__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
void reserve(size_type __n)
Prepare the unordered_map for a specified number of elements.
│ │ │ -
const_local_iterator cbegin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
│ │ │ -
iterator insert(const_iterator, node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
_Hashtable::reference reference
Iterator-related typedefs.
│ │ │ -
iterator insert(const_iterator __hint, const value_type &__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
iterator end() noexcept
│ │ │ -
_Hashtable::allocator_type allocator_type
Public typedefs.
│ │ │ -
unordered_map(const unordered_map &)=default
Copy constructor.
│ │ │ -
size_type count(const key_type &__x) const
Finds the number of elements.
│ │ │ -
bool empty() const noexcept
Returns true if the unordered_map is empty.
│ │ │ -
size_type erase(const key_type &__x)
Erases elements according to the provided key.
│ │ │ -
const_iterator find(const key_type &__x) const
Tries to locate an element in an unordered_map.
│ │ │ -
unordered_map(unordered_map &&)=default
Move constructor.
│ │ │ -
const_local_iterator end(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ -
auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), true)
Finds whether an element with the given key exists.
│ │ │ -
size_type max_size() const noexcept
Returns the maximum size of the unordered_map.
│ │ │ -
const_iterator end() const noexcept
│ │ │ -
unordered_map()=default
Default constructor.
│ │ │ -
_Hashtable::mapped_type mapped_type
Public typedefs.
│ │ │ -
unordered_map & operator=(unordered_map &&)=default
Move assignment operator.
│ │ │ -
const_local_iterator begin(size_type __n) const
Returns a read-only (constant) iterator pointing to the first bucket element.
│ │ │ -
unordered_map(size_type __n, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Default constructor creates no elements.
│ │ │ -
std::pair< iterator, bool > emplace(_Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ -
const_local_iterator cend(size_type __n) const
Returns a read-only (constant) iterator pointing to one past the last bucket elements.
│ │ │ -
size_type size() const noexcept
Returns the size of the unordered_map.
│ │ │ -
__enable_if_t< is_constructible< value_type, _Pair && >::value, pair< iterator, bool > > insert(_Pair &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
mapped_type & operator[](key_type &&__k)
Subscript ( [] ) access to unordered_map data.
│ │ │ -
std::pair< iterator, bool > insert(value_type &&__x)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
_Hashtable::hasher hasher
Public typedefs.
│ │ │ -
pair< iterator, bool > insert_or_assign(const key_type &__k, _Obj &&__obj)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
unordered_map(_InputIterator __first, _InputIterator __last, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_map from a range.
│ │ │ -
void clear() noexcept
│ │ │ -
mapped_type & operator[](const key_type &__k)
Subscript ( [] ) access to unordered_map data.
│ │ │ -
pair< iterator, bool > try_emplace(const key_type &__k, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ -
const_iterator begin() const noexcept
│ │ │ -
key_equal key_eq() const
Returns the key comparison object with which the unordered_map was constructed.
│ │ │ -
_Hashtable::const_reference const_reference
Iterator-related typedefs.
│ │ │ -
_Hashtable::key_equal key_equal
Public typedefs.
│ │ │ -
_Hashtable::local_iterator local_iterator
Iterator-related typedefs.
│ │ │ -
iterator erase(iterator __position)
Erases an element from an unordered_map.
│ │ │ -
const_iterator cend() const noexcept
│ │ │ -
local_iterator end(size_type __n)
Returns a read/write iterator pointing to one past the last bucket elements.
│ │ │ -
_Hashtable::pointer pointer
Iterator-related typedefs.
│ │ │ -
iterator insert_or_assign(const_iterator __hint, const key_type &__k, _Obj &&__obj)
Attempts to insert a std::pair into the unordered_map.
│ │ │ -
unordered_map(const allocator_type &__a)
Creates an unordered_map with no elements.
│ │ │ -
_Hashtable::key_type key_type
Public typedefs.
│ │ │ -
size_type bucket_count() const noexcept
Returns the number of buckets of the unordered_map.
│ │ │ -
iterator begin() noexcept
│ │ │ -
hasher hash_function() const
Returns the hash functor object with which the unordered_map was constructed.
│ │ │ -
auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x))
Finds a subsequence matching given key.
│ │ │ -
unordered_map(initializer_list< value_type > __l, size_type __n=0, const hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type &__a=allocator_type())
Builds an unordered_map from an initializer_list.
│ │ │ -
_Hashtable::const_iterator const_iterator
Iterator-related typedefs.
│ │ │ -
_Hashtable::size_type size_type
Iterator-related typedefs.
│ │ │ -
iterator find(const key_type &__x)
Tries to locate an element in an unordered_map.
│ │ │ -
float load_factor() const noexcept
Returns the average number of elements per bucket.
│ │ │ -
iterator erase(const_iterator __position)
Erases an element from an unordered_map.
│ │ │ -
void swap(unordered_map &__x) noexcept(noexcept(_M_h.swap(__x._M_h)))
Swaps data with another unordered_map.
│ │ │ -
local_iterator begin(size_type __n)
Returns a read/write iterator pointing to the first bucket element.
│ │ │ -
float max_load_factor() const noexcept
Returns a positive number that the unordered_map tries to keep the load factor less than or equal to.
│ │ │ -
unordered_map & operator=(const unordered_map &)=default
Copy assignment operator.
│ │ │ -
_Hashtable::difference_type difference_type
Iterator-related typedefs.
│ │ │ -
auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x))
Finds the number of elements.
│ │ │ -
_Hashtable::const_local_iterator const_local_iterator
Iterator-related typedefs.
│ │ │ -
size_type max_bucket_count() const noexcept
Returns the maximum number of buckets of the unordered_map.
│ │ │ -
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Attempts to build and insert a std::pair into the unordered_map.
│ │ │ -
insert_return_type insert(node_type &&__nh)
Re-insert an extracted node.
│ │ │ -
_Hashtable::value_type value_type
Public typedefs.
│ │ │ -
void rehash(size_type __n)
May rehash the unordered_map.
│ │ │ -
const_iterator cbegin() const noexcept
│ │ │ - │ │ │ - │ │ │ +
integral_constant
Definition type_traits:63
│ │ │ + │ │ │ +
is_nothrow_default_constructible
Definition type_traits:1124
│ │ │ +
is_assignable
Definition type_traits:1156
│ │ │ +
A helper basic node class for forward_list. This is just a linked list with nothing inside it....
│ │ │ +
A helper node class for forward_list. This is just a linked list with uninitialized storage for a dat...
│ │ │ +
A forward_list::iterator.
│ │ │ +
friend bool operator==(const _Self &__x, const _Self &__y) noexcept
Forward list iterator equality comparison.
│ │ │ +
A forward_list::const_iterator.
│ │ │ +
friend bool operator==(const _Self &__x, const _Self &__y) noexcept
Forward list const_iterator equality comparison.
│ │ │ +
Base class for forward_list.
│ │ │ +
A standard container with linear time access to elements, and fixed time insertion/deletion at any po...
│ │ │ +
__remove_return_type unique(_BinPred __binary_pred)
Remove consecutive elements satisfying a predicate.
│ │ │ +
iterator begin() noexcept
│ │ │ +
const_iterator before_begin() const noexcept
│ │ │ +
void reverse() noexcept
Reverse the elements in list.
│ │ │ +
forward_list()=default
Creates a forward_list with no elements.
│ │ │ +
~forward_list() noexcept
The forward_list dtor.
│ │ │ +
iterator erase_after(const_iterator __pos)
Removes the element pointed to by the iterator following pos.
│ │ │ +
void swap(forward_list &__list) noexcept
Swaps data with another forward_list.
│ │ │ +
const_reference front() const
│ │ │ +
void merge(forward_list &&__list)
Merge sorted lists.
│ │ │ +
forward_list(const _Alloc &__al) noexcept
Creates a forward_list with no elements.
│ │ │ +
void sort()
Sort the elements of the list.
│ │ │ +
iterator before_begin() noexcept
│ │ │ +
forward_list(const forward_list &__list, const __type_identity_t< _Alloc > &__al)
Copy constructor with allocator argument.
│ │ │ +
iterator emplace_after(const_iterator __pos, _Args &&... __args)
Constructs object in forward_list after the specified iterator.
│ │ │ +
forward_list(const forward_list &__list)
The forward_list copy constructor.
│ │ │ +
iterator insert_after(const_iterator __pos, const _Tp &__val)
Inserts given value into forward_list after specified iterator.
│ │ │ +
forward_list & operator=(forward_list &&__list) noexcept(_Node_alloc_traits::_S_nothrow_move())
The forward_list move assignment operator.
│ │ │ +
void resize(size_type __sz)
Resizes the forward_list to the specified number of elements.
│ │ │ +
forward_list & operator=(const forward_list &__list)
The forward_list assignment operator.
│ │ │ +
__remove_return_type remove_if(_Pred __pred)
Remove all elements satisfying a predicate.
│ │ │ +
iterator end() noexcept
│ │ │ +
forward_list(size_type __n, const _Tp &__value, const _Alloc &__al=_Alloc())
Creates a forward_list with copies of an exemplar element.
│ │ │ +
void assign(size_type __n, const _Tp &__val)
Assigns a given value to a forward_list.
│ │ │ +
const_iterator begin() const noexcept
│ │ │ +
void splice_after(const_iterator __pos, forward_list &&__list) noexcept
Insert contents of another forward_list.
│ │ │ +
const_iterator cbefore_begin() const noexcept
│ │ │ +
forward_list & operator=(std::initializer_list< _Tp > __il)
The forward_list initializer list assignment operator.
│ │ │ +
forward_list(std::initializer_list< _Tp > __il, const _Alloc &__al=_Alloc())
Builds a forward_list from an initializer_list.
│ │ │ +
reference emplace_front(_Args &&... __args)
Constructs object in forward_list at the front of the list.
│ │ │ +
forward_list(size_type __n, const _Alloc &__al=_Alloc())
Creates a forward_list with default constructed elements.
│ │ │ +
iterator insert_after(const_iterator __pos, std::initializer_list< _Tp > __il)
Inserts the contents of an initializer_list into forward_list after the specified iterator.
│ │ │ +
const_iterator end() const noexcept
│ │ │ +
void splice_after(const_iterator __pos, forward_list &&, const_iterator __before, const_iterator __last) noexcept
Insert range from another forward_list.
│ │ │ +
reference front()
│ │ │ +
forward_list(forward_list &&__list, const __type_identity_t< _Alloc > &__al) noexcept(_Node_alloc_traits::_S_always_equal())
Move constructor with allocator argument.
│ │ │ +
iterator erase_after(const_iterator __pos, const_iterator __last)
Remove a range of elements.
│ │ │ +
__remove_return_type unique()
Remove consecutive duplicate elements.
│ │ │ +
void clear() noexcept
Erases all the elements.
│ │ │ +
__remove_return_type remove(const _Tp &__val)
Remove all elements equal to value.
│ │ │ +
const_iterator cend() const noexcept
│ │ │ +
void assign(_InputIterator __first, _InputIterator __last)
Assigns a range to a forward_list.
│ │ │ +
bool empty() const noexcept
│ │ │ +
allocator_type get_allocator() const noexcept
Get a copy of the memory allocation object.
│ │ │ +
void push_front(const _Tp &__val)
Add data to the front of the forward_list.
│ │ │ +
forward_list(forward_list &&)=default
The forward_list move constructor.
│ │ │ +
forward_list(_InputIterator __first, _InputIterator __last, const _Alloc &__al=_Alloc())
Builds a forward_list from a range.
│ │ │ +
void splice_after(const_iterator __pos, forward_list &, const_iterator __before, const_iterator __last) noexcept
Insert range from another forward_list.
│ │ │ +
const_iterator cbegin() const noexcept
│ │ │ +
void pop_front()
Removes first element.
│ │ │ +
void assign(std::initializer_list< _Tp > __il)
Assigns an initializer_list to a forward_list.
│ │ │ +
size_type max_size() const noexcept
│ │ │ +
Uniform interface to all pointer-like types.
Definition ptr_traits.h:185
│ │ │ +
Forward iterators support a superset of input iterator operations.
│ │ │ +
Common iterator class.
│ │ │ + │ │ │ +
Uniform interface to C++98 and C++11 allocators.
│ │ │ +
static constexpr pointer allocate(_Alloc &__a, size_type __n)
Allocate memory.
│ │ │ +
static constexpr void deallocate(_Alloc &__a, pointer __p, size_type __n)
Deallocate memory.
│ │ │ +
static constexpr size_type max_size(const _Alloc &__a) noexcept
The maximum supported allocation size.
│ │ │ + │ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -unordered_map.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// unordered_map implementation -*- C++ -*- │ │ │ │ +1// -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2010-2023 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2008-2023 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,2947 +21,1823 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/unordered_map.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{unordered_map} │ │ │ │ +27 * Do not attempt to use it directly. @headername{forward_list} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _UNORDERED_MAP_H │ │ │ │ -31#define _UNORDERED_MAP_H │ │ │ │ +30#ifndef _FORWARD_LIST_H │ │ │ │ +31#define _FORWARD_LIST_H 1 │ │ │ │ 32 │ │ │ │ -33#include <_b_i_t_s_/_h_a_s_h_t_a_b_l_e_._h> │ │ │ │ -34#include <_b_i_t_s_/_a_l_l_o_c_a_t_o_r_._h> │ │ │ │ -35#include <_b_i_t_s_/_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h> // hash │ │ │ │ -36#include <_b_i_t_s_/_s_t_l___f_u_n_c_t_i_o_n_._h> // equal_to │ │ │ │ -37 │ │ │ │ -38namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -39{ │ │ │ │ -40_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -41_GLIBCXX_BEGIN_NAMESPACE_CONTAINER │ │ │ │ -42 │ │ │ │ -43 /// Base types for unordered_map. │ │ │ │ -44 template │ │ │ │ -_4_5 using _____u_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits<_Cache, false, true>; │ │ │ │ -46 │ │ │ │ -47 template, │ │ │ │ -50 typename ___P_r_e_d = _s_t_d_:_:_e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ -51 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_> >, │ │ │ │ -52 typename ___T_r = _____u_m_a_p___t_r_a_i_t_s_<_____c_a_c_h_e___d_e_f_a_u_l_t_<___K_e_y_,_ ___H_a_s_h_>_:_:_v_a_l_u_e>> │ │ │ │ -53 using _____u_m_a_p___h_a_s_h_t_a_b_l_e = ___H_a_s_h_t_a_b_l_e_<___K_e_y_,_ _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t_ ___K_e_y_,_ ___T_p_>, │ │ │ │ -54 _Alloc, __detail::_Select1st, │ │ │ │ -55 ___P_r_e_d, ___H_a_s_h, │ │ │ │ -56 __detail::_Mod_range_hashing, │ │ │ │ -57 __detail::_Default_ranged_hash, │ │ │ │ -58 __detail::_Prime_rehash_policy, ___T_r>; │ │ │ │ -59 │ │ │ │ -60 /// Base types for unordered_multimap. │ │ │ │ -61 template │ │ │ │ -_6_2 using _____u_m_m_a_p___t_r_a_i_t_s = __detail::_Hashtable_traits<_Cache, false, false>; │ │ │ │ +33#pragma GCC system_header │ │ │ │ +34 │ │ │ │ +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 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e │ │ │ │ +55 { │ │ │ │ +56 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e() = default; │ │ │ │ +57 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e&& __x) noexcept │ │ │ │ +58 : _M_next(__x._M_next) │ │ │ │ +59 { __x._M_next = nullptr; } │ │ │ │ +60 │ │ │ │ +61 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e(const ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e&) = delete; │ │ │ │ +62 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e& operator=(const ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e&) = delete; │ │ │ │ 63 │ │ │ │ -64 template, │ │ │ │ -67 typename ___P_r_e_d = _s_t_d_:_:_e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ -68 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_> >, │ │ │ │ -69 typename ___T_r = _____u_m_m_a_p___t_r_a_i_t_s_<_____c_a_c_h_e___d_e_f_a_u_l_t_<___K_e_y_,_ ___H_a_s_h_>_:_:_v_a_l_u_e>> │ │ │ │ -70 using _____u_m_m_a_p___h_a_s_h_t_a_b_l_e = ___H_a_s_h_t_a_b_l_e_<___K_e_y_,_ _s_t_d_:_:_p_a_i_r_<_c_o_n_s_t_ ___K_e_y_,_ ___T_p_>, │ │ │ │ -71 _Alloc, __detail::_Select1st, │ │ │ │ -72 ___P_r_e_d, ___H_a_s_h, │ │ │ │ -73 __detail::_Mod_range_hashing, │ │ │ │ -74 __detail::_Default_ranged_hash, │ │ │ │ -75 __detail::_Prime_rehash_policy, ___T_r>; │ │ │ │ -76 │ │ │ │ -77 template │ │ │ │ -78 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p; │ │ │ │ -79 │ │ │ │ -80 /** │ │ │ │ -81 * @brief A standard container composed of unique keys (containing │ │ │ │ -82 * at most one of each key value) that associates values of another type │ │ │ │ -83 * with the keys. │ │ │ │ -84 * │ │ │ │ -85 * @ingroup unordered_associative_containers │ │ │ │ -86 * @headerfile unordered_map │ │ │ │ -87 * @since C++11 │ │ │ │ -88 * │ │ │ │ -89 * @tparam _Key Type of key objects. │ │ │ │ -90 * @tparam _Tp Type of mapped objects. │ │ │ │ -91 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ -92 * @tparam _Pred Predicate function object type, defaults │ │ │ │ -93 * to equal_to<_Value>. │ │ │ │ -94 * @tparam _Alloc Allocator type, defaults to │ │ │ │ -95 * std::allocator>. │ │ │ │ -96 * │ │ │ │ -97 * Meets the requirements of a container, and │ │ │ │ -98 * unordered associative container │ │ │ │ -99 * │ │ │ │ -100 * The resulting value type of the container is std::pair. │ │ │ │ -101 * │ │ │ │ -102 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ -103 * alias __umap_hashtable. │ │ │ │ -104 */ │ │ │ │ -105 template, │ │ │ │ -107 typename ___P_r_e_d = _e_q_u_a_l___t_o_<___K_e_y_>, │ │ │ │ -108 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_9 class _u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ -110 { │ │ │ │ -111 typedef _____u_m_a_p___h_a_s_h_t_a_b_l_e_<___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_> ___H_a_s_h_t_a_b_l_e; │ │ │ │ -112 ___H_a_s_h_t_a_b_l_e _M_h; │ │ │ │ -113 │ │ │ │ -114 public: │ │ │ │ -115 // typedefs: │ │ │ │ -116 ///@{ │ │ │ │ -117 /// Public typedefs. │ │ │ │ -_1_1_8 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ -_1_1_9 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ -_1_2_0 typedef typename _Hashtable::mapped_type _m_a_p_p_e_d___t_y_p_e; │ │ │ │ -_1_2_1 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ -_1_2_2 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ -_1_2_3 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ -124 ///@} │ │ │ │ -125 │ │ │ │ -126 ///@{ │ │ │ │ -127 /// Iterator-related typedefs. │ │ │ │ -_1_2_8 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ -_1_2_9 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ -_1_3_0 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_3_1 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_3_2 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ -_1_3_3 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ -_1_3_4 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_3_5 typedef typename _Hashtable::const_local_iterator _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_3_6 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ -_1_3_7 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ -138 ///@} │ │ │ │ +64 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e& │ │ │ │ +65 operator=(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e&& __x) noexcept │ │ │ │ +66 { │ │ │ │ +67 _M_next = __x._M_next; │ │ │ │ +68 __x._M_next = nullptr; │ │ │ │ +69 return *this; │ │ │ │ +70 } │ │ │ │ +71 │ │ │ │ +72 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* _M_next = nullptr; │ │ │ │ +73 │ │ │ │ +74 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* │ │ │ │ +75 _M_transfer_after(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __begin, │ │ │ │ +76 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __end) noexcept │ │ │ │ +77 { │ │ │ │ +78 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* _____k_e_e_p = __begin->_M_next; │ │ │ │ +79 if (__end) │ │ │ │ +80 { │ │ │ │ +81 __begin->_M_next = __end->_M_next; │ │ │ │ +82 __end->_M_next = _M_next; │ │ │ │ +83 } │ │ │ │ +84 else │ │ │ │ +85 __begin->_M_next = nullptr; │ │ │ │ +86 _M_next = _____k_e_e_p; │ │ │ │ +87 return __end; │ │ │ │ +88 } │ │ │ │ +89 │ │ │ │ +90 void │ │ │ │ +91 _M_reverse_after() noexcept │ │ │ │ +92 { │ │ │ │ +93 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* _____t_a_i_l = _M_next; │ │ │ │ +94 if (!_____t_a_i_l) │ │ │ │ +95 return; │ │ │ │ +96 while (___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* _____t_e_m_p = _____t_a_i_l->_M_next) │ │ │ │ +97 { │ │ │ │ +98 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* _____k_e_e_p = _M_next; │ │ │ │ +99 _M_next = _____t_e_m_p; │ │ │ │ +100 _____t_a_i_l->_M_next = _____t_e_m_p->_M_next; │ │ │ │ +101 _M_next->_M_next = _____k_e_e_p; │ │ │ │ +102 } │ │ │ │ +103 } │ │ │ │ +104 }; │ │ │ │ +105 │ │ │ │ +106 /** │ │ │ │ +107 * @brief A helper node class for %forward_list. │ │ │ │ +108 * This is just a linked list with uninitialized storage for a │ │ │ │ +109 * data value in each node. │ │ │ │ +110 * There is a sorting utility method. │ │ │ │ +111 */ │ │ │ │ +112 template │ │ │ │ +_1_1_3 struct ___F_w_d___l_i_s_t___n_o_d_e │ │ │ │ +114 : public ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e │ │ │ │ +115 { │ │ │ │ +116 ___F_w_d___l_i_s_t___n_o_d_e() = default; │ │ │ │ +117 │ │ │ │ +118 __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 ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r │ │ │ │ +136 { │ │ │ │ +137 typedef ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r_<___T_p_> ___S_e_l_f; │ │ │ │ +138 typedef ___F_w_d___l_i_s_t___n_o_d_e_<___T_p_> ___N_o_d_e; │ │ │ │ 139 │ │ │ │ -140#if __cplusplus > 201402L │ │ │ │ -141 using node_type = typename _Hashtable::node_type; │ │ │ │ -142 using insert_return_type = typename _Hashtable::insert_return_type; │ │ │ │ -143#endif │ │ │ │ -144 │ │ │ │ -145 //construct/destroy/copy │ │ │ │ -146 │ │ │ │ -147 /// Default constructor. │ │ │ │ -_1_4_8 _u_n_o_r_d_e_r_e_d___m_a_p() = default; │ │ │ │ -149 │ │ │ │ -150 /** │ │ │ │ -151 * @brief Default constructor creates no elements. │ │ │ │ -152 * @param __n Minimal initial number of buckets. │ │ │ │ -153 * @param __hf A hash functor. │ │ │ │ -154 * @param __eql A key equality functor. │ │ │ │ -155 * @param __a An allocator object. │ │ │ │ -156 */ │ │ │ │ -157 explicit │ │ │ │ -_1_5_8 _u_n_o_r_d_e_r_e_d___m_a_p(_s_i_z_e___t_y_p_e __n, │ │ │ │ -159 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -160 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -161 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()) │ │ │ │ -162 : _M_h(__n, _____h_f, _____e_q_l, __a) │ │ │ │ -163 { } │ │ │ │ -164 │ │ │ │ -165 /** │ │ │ │ -166 * @brief Builds an %unordered_map from a range. │ │ │ │ -167 * @param __first An input iterator. │ │ │ │ -168 * @param __last An input iterator. │ │ │ │ -169 * @param __n Minimal initial number of buckets. │ │ │ │ -170 * @param __hf A hash functor. │ │ │ │ -171 * @param __eql A key equality functor. │ │ │ │ -172 * @param __a An allocator object. │ │ │ │ -173 * │ │ │ │ -174 * Create an %unordered_map consisting of copies of the elements from │ │ │ │ -175 * [__first,__last). This is linear in N (where N is │ │ │ │ -176 * distance(__first,__last)). │ │ │ │ -177 */ │ │ │ │ -178 template │ │ │ │ -_1_7_9 _u_n_o_r_d_e_r_e_d___m_a_p(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ -180 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -181 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -182 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -183 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()) │ │ │ │ -184 : _M_h(__first, __last, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -185 { } │ │ │ │ -186 │ │ │ │ -187 /// Copy constructor. │ │ │ │ -_1_8_8 _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; │ │ │ │ -189 │ │ │ │ -190 /// Move constructor. │ │ │ │ -_1_9_1 _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; │ │ │ │ -192 │ │ │ │ -193 /** │ │ │ │ -194 * @brief Creates an %unordered_map with no elements. │ │ │ │ -195 * @param __a An allocator object. │ │ │ │ -196 */ │ │ │ │ -197 explicit │ │ │ │ -_1_9_8 _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) │ │ │ │ -199 : _M_h(__a) │ │ │ │ -200 { } │ │ │ │ -201 │ │ │ │ -202 /* │ │ │ │ -203 * @brief Copy constructor with allocator argument. │ │ │ │ -204 * @param __uset Input %unordered_map to copy. │ │ │ │ -205 * @param __a An allocator object. │ │ │ │ -206 */ │ │ │ │ -207 _u_n_o_r_d_e_r_e_d___m_a_p(const _u_n_o_r_d_e_r_e_d___m_a_p& _____u_m_a_p, │ │ │ │ -208 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -209 : _M_h(_____u_m_a_p._M_h, __a) │ │ │ │ -210 { } │ │ │ │ -211 │ │ │ │ -212 /* │ │ │ │ -213 * @brief Move constructor with allocator argument. │ │ │ │ -214 * @param __uset Input %unordered_map to move. │ │ │ │ -215 * @param __a An allocator object. │ │ │ │ -216 */ │ │ │ │ -217 _u_n_o_r_d_e_r_e_d___m_a_p(_u_n_o_r_d_e_r_e_d___m_a_p&& __umap, │ │ │ │ -218 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -219 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__umap._M_h), __a)) ) │ │ │ │ -220 : _M_h(_s_t_d_:_:_m_o_v_e(__umap._M_h), __a) │ │ │ │ -221 { } │ │ │ │ -222 │ │ │ │ -223 /** │ │ │ │ -224 * @brief Builds an %unordered_map from an initializer_list. │ │ │ │ -225 * @param __l An initializer_list. │ │ │ │ -226 * @param __n Minimal initial number of buckets. │ │ │ │ -227 * @param __hf A hash functor. │ │ │ │ -228 * @param __eql A key equality functor. │ │ │ │ -229 * @param __a An allocator object. │ │ │ │ -230 * │ │ │ │ -231 * Create an %unordered_map consisting of copies of the elements in the │ │ │ │ -232 * list. This is linear in N (where N is @a __l.size()). │ │ │ │ -233 */ │ │ │ │ -_2_3_4 _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, │ │ │ │ -235 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -236 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -237 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -238 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()) │ │ │ │ -239 : _M_h(_____l, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -240 { } │ │ │ │ -241 │ │ │ │ -242 _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) │ │ │ │ -243 : _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) │ │ │ │ -244 { } │ │ │ │ +140 typedef _Tp value_type; │ │ │ │ +141 typedef _Tp* pointer; │ │ │ │ +142 typedef _Tp& reference; │ │ │ │ +143 typedef ptrdiff_t difference_type; │ │ │ │ +144 typedef _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g _i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y; │ │ │ │ +145 │ │ │ │ +146 ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r() noexcept │ │ │ │ +147 : _M_node() { } │ │ │ │ +148 │ │ │ │ +149 explicit │ │ │ │ +150 ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __n) noexcept │ │ │ │ +151 : _M_node(__n) { } │ │ │ │ +152 │ │ │ │ +153 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +154 reference │ │ │ │ +155 operator*() const noexcept │ │ │ │ +156 { return *static_cast<___N_o_d_e*>(this->_M_node)->_M_valptr(); } │ │ │ │ +157 │ │ │ │ +158 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +159 pointer │ │ │ │ +160 operator->() const noexcept │ │ │ │ +161 { return static_cast<___N_o_d_e*>(this->_M_node)->_M_valptr(); } │ │ │ │ +162 │ │ │ │ +163 ___S_e_l_f& │ │ │ │ +164 operator++() noexcept │ │ │ │ +165 { │ │ │ │ +166 _M_node = _M_node->_M_next; │ │ │ │ +167 return *this; │ │ │ │ +168 } │ │ │ │ +169 │ │ │ │ +170 ___S_e_l_f │ │ │ │ +171 operator++(int) noexcept │ │ │ │ +172 { │ │ │ │ +173 ___S_e_l_f _____t_m_p(*this); │ │ │ │ +174 _M_node = _M_node->_M_next; │ │ │ │ +175 return _____t_m_p; │ │ │ │ +176 } │ │ │ │ +177 │ │ │ │ +178 /** │ │ │ │ +179 * @brief Forward list iterator equality comparison. │ │ │ │ +180 */ │ │ │ │ +181 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +182 friend bool │ │ │ │ +_1_8_3 _o_p_e_r_a_t_o_r_=_=(const ___S_e_l_f& __x, const ___S_e_l_f& __y) noexcept │ │ │ │ +184 { return __x._M_node == __y._M_node; } │ │ │ │ +185 │ │ │ │ +186#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ +187 /** │ │ │ │ +188 * @brief Forward list iterator inequality comparison. │ │ │ │ +189 */ │ │ │ │ +190 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +191 friend bool │ │ │ │ +192 operator!=(const _Self& __x, const _Self& __y) noexcept │ │ │ │ +193 { return __x._M_node != __y._M_node; } │ │ │ │ +194#endif │ │ │ │ +195 │ │ │ │ +196 _Self │ │ │ │ +197 _M_next() const noexcept │ │ │ │ +198 { │ │ │ │ +199 if (_M_node) │ │ │ │ +200 return _Fwd_list_iterator(_M_node->_M_next); │ │ │ │ +201 else │ │ │ │ +202 return _Fwd_list_iterator(nullptr); │ │ │ │ +203 } │ │ │ │ +204 │ │ │ │ +205 _Fwd_list_node_base* _M_node; │ │ │ │ +206 }; │ │ │ │ +207 │ │ │ │ +208 /** │ │ │ │ +209 * @brief A forward_list::const_iterator. │ │ │ │ +210 * │ │ │ │ +211 * All the functions are op overloads. │ │ │ │ +212 */ │ │ │ │ +213 template │ │ │ │ +_2_1_4 struct ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +215 { │ │ │ │ +216 typedef ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r_<___T_p_> ___S_e_l_f; │ │ │ │ +217 typedef const ___F_w_d___l_i_s_t___n_o_d_e_<___T_p_> ___N_o_d_e; │ │ │ │ +218 typedef ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r_<___T_p_> _i_t_e_r_a_t_o_r; │ │ │ │ +219 │ │ │ │ +220 typedef _Tp value_type; │ │ │ │ +221 typedef const _Tp* pointer; │ │ │ │ +222 typedef const _Tp& reference; │ │ │ │ +223 typedef ptrdiff_t difference_type; │ │ │ │ +224 typedef _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g _i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y; │ │ │ │ +225 │ │ │ │ +226 ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r() noexcept │ │ │ │ +227 : _M_node() { } │ │ │ │ +228 │ │ │ │ +229 explicit │ │ │ │ +230 ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r(const ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __n) noexcept │ │ │ │ +231 : _M_node(__n) { } │ │ │ │ +232 │ │ │ │ +233 ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r(const _i_t_e_r_a_t_o_r& __iter) noexcept │ │ │ │ +234 : _M_node(__iter._M_node) { } │ │ │ │ +235 │ │ │ │ +236 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +237 reference │ │ │ │ +238 operator*() const noexcept │ │ │ │ +239 { return *static_cast<___N_o_d_e*>(this->_M_node)->_M_valptr(); } │ │ │ │ +240 │ │ │ │ +241 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +242 pointer │ │ │ │ +243 operator->() const noexcept │ │ │ │ +244 { return static_cast<___N_o_d_e*>(this->_M_node)->_M_valptr(); } │ │ │ │ 245 │ │ │ │ -246 _u_n_o_r_d_e_r_e_d___m_a_p(_s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -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(__n, __hf, _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, │ │ │ │ -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, _h_a_s_h_e_r(), _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -256 { } │ │ │ │ -257 │ │ │ │ -258 template │ │ │ │ -259 _u_n_o_r_d_e_r_e_d___m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ -260 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -261 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -262 : _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) │ │ │ │ -263 { } │ │ │ │ -264 │ │ │ │ -265 _u_n_o_r_d_e_r_e_d___m_a_p(initializer_list __l, │ │ │ │ -266 _s_i_z_e___t_y_p_e __n, │ │ │ │ -267 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -268 : _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) │ │ │ │ -269 { } │ │ │ │ -270 │ │ │ │ -271 _u_n_o_r_d_e_r_e_d___m_a_p(initializer_list __l, │ │ │ │ -272 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -273 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -274 : _u_n_o_r_d_e_r_e_d___m_a_p(__l, __n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -275 { } │ │ │ │ -276 │ │ │ │ -277 /// Copy assignment operator. │ │ │ │ -278 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ -_2_7_9 _o_p_e_r_a_t_o_r_=(const _u_n_o_r_d_e_r_e_d___m_a_p&) = default; │ │ │ │ -280 │ │ │ │ -281 /// Move assignment operator. │ │ │ │ -282 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ -_2_8_3 _o_p_e_r_a_t_o_r_=(_u_n_o_r_d_e_r_e_d___m_a_p&&) = default; │ │ │ │ -284 │ │ │ │ -285 /** │ │ │ │ -286 * @brief %Unordered_map list assignment operator. │ │ │ │ -287 * @param __l An initializer_list. │ │ │ │ -288 * │ │ │ │ -289 * This function fills an %unordered_map with copies of the elements in │ │ │ │ -290 * the initializer list @a __l. │ │ │ │ -291 * │ │ │ │ -292 * Note that the assignment completely changes the %unordered_map and │ │ │ │ -293 * that the resulting %unordered_map's size is the same as the number │ │ │ │ -294 * of elements assigned. │ │ │ │ -295 */ │ │ │ │ -296 _u_n_o_r_d_e_r_e_d___m_a_p& │ │ │ │ -_2_9_7 _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) │ │ │ │ -298 { │ │ │ │ -299 _M_h = _____l; │ │ │ │ -300 return *this; │ │ │ │ -301 } │ │ │ │ -302 │ │ │ │ -303 /// Returns the allocator object used by the %unordered_map. │ │ │ │ -304 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_3_0_5 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ -306 { return _M_h.get_allocator(); } │ │ │ │ -307 │ │ │ │ -308 // size and capacity: │ │ │ │ -309 │ │ │ │ -310 /// Returns true if the %unordered_map is empty. │ │ │ │ -311 _GLIBCXX_NODISCARD bool │ │ │ │ -_3_1_2 _e_m_p_t_y() const noexcept │ │ │ │ -313 { return _M_h.empty(); } │ │ │ │ -314 │ │ │ │ -315 /// Returns the size of the %unordered_map. │ │ │ │ -316 _s_i_z_e___t_y_p_e │ │ │ │ -_3_1_7 _s_i_z_e() const noexcept │ │ │ │ -318 { return _M_h.size(); } │ │ │ │ -319 │ │ │ │ -320 /// Returns the maximum size of the %unordered_map. │ │ │ │ -321 _s_i_z_e___t_y_p_e │ │ │ │ -_3_2_2 _m_a_x___s_i_z_e() const noexcept │ │ │ │ -323 { return _M_h.max_size(); } │ │ │ │ -324 │ │ │ │ -325 // iterators. │ │ │ │ -326 │ │ │ │ -327 /** │ │ │ │ -328 * Returns a read/write iterator that points to the first element in the │ │ │ │ -329 * %unordered_map. │ │ │ │ -330 */ │ │ │ │ -331 _i_t_e_r_a_t_o_r │ │ │ │ -_3_3_2 _b_e_g_i_n() noexcept │ │ │ │ -333 { return _M_h.begin(); } │ │ │ │ -334 │ │ │ │ -335 ///@{ │ │ │ │ -336 /** │ │ │ │ -337 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -338 * element in the %unordered_map. │ │ │ │ -339 */ │ │ │ │ -340 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_4_1 _b_e_g_i_n() const noexcept │ │ │ │ -342 { return _M_h.begin(); } │ │ │ │ -343 │ │ │ │ -344 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_4_5 _c_b_e_g_i_n() const noexcept │ │ │ │ -346 { return _M_h.begin(); } │ │ │ │ -347 ///@} │ │ │ │ -348 │ │ │ │ -349 /** │ │ │ │ -350 * Returns a read/write iterator that points one past the last element in │ │ │ │ -351 * the %unordered_map. │ │ │ │ -352 */ │ │ │ │ -353 _i_t_e_r_a_t_o_r │ │ │ │ -_3_5_4 _e_n_d() noexcept │ │ │ │ -355 { return _M_h.end(); } │ │ │ │ -356 │ │ │ │ -357 ///@{ │ │ │ │ -358 /** │ │ │ │ -359 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -360 * element in the %unordered_map. │ │ │ │ -361 */ │ │ │ │ -362 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_6_3 _e_n_d() const noexcept │ │ │ │ -364 { return _M_h.end(); } │ │ │ │ -365 │ │ │ │ -366 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_3_6_7 _c_e_n_d() const noexcept │ │ │ │ -368 { return _M_h.end(); } │ │ │ │ -369 ///@} │ │ │ │ -370 │ │ │ │ -371 // modifiers. │ │ │ │ -372 │ │ │ │ -373 /** │ │ │ │ -374 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -375 * %unordered_map. │ │ │ │ -376 * │ │ │ │ -377 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ -378 * std::piecewise_contruct for passing arguments to each │ │ │ │ -379 * part of the pair constructor). │ │ │ │ -380 * │ │ │ │ -381 * @return A pair, of which the first element is an iterator that points │ │ │ │ -382 * to the possibly inserted pair, and the second is a bool that │ │ │ │ -383 * is true if the pair was actually inserted. │ │ │ │ -384 * │ │ │ │ -385 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ -386 * the %unordered_map. │ │ │ │ -387 * An %unordered_map relies on unique keys and thus a %pair is only │ │ │ │ -388 * inserted if its first element (the key) is not already present in the │ │ │ │ -389 * %unordered_map. │ │ │ │ -390 * │ │ │ │ -391 * Insertion requires amortized constant time. │ │ │ │ -392 */ │ │ │ │ -393 template │ │ │ │ -394 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_3_9_5 _e_m_p_l_a_c_e(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -396 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -397 │ │ │ │ -398 /** │ │ │ │ -399 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -400 * %unordered_map. │ │ │ │ -401 * │ │ │ │ -402 * @param __pos An iterator that serves as a hint as to where the pair │ │ │ │ -403 * should be inserted. │ │ │ │ -404 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ -405 * std::piecewise_contruct for passing arguments to each │ │ │ │ -406 * part of the pair constructor). │ │ │ │ -407 * @return An iterator that points to the element with key of the │ │ │ │ -408 * std::pair built from @a __args (may or may not be that │ │ │ │ -409 * std::pair). │ │ │ │ -410 * │ │ │ │ -411 * This function is not concerned about whether the insertion took place, │ │ │ │ -412 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ -413 * does. │ │ │ │ -414 * Note that the first parameter is only a hint and can potentially │ │ │ │ -415 * improve the performance of the insertion process. A bad hint would │ │ │ │ -416 * cause no gains in efficiency. │ │ │ │ -417 * │ │ │ │ -418 * See │ │ │ │ -419 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -420 * for more on @a hinting. │ │ │ │ -421 * │ │ │ │ -422 * Insertion requires amortized constant time. │ │ │ │ -423 */ │ │ │ │ -424 template │ │ │ │ -425 _i_t_e_r_a_t_o_r │ │ │ │ -_4_2_6 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -427 { return _M_h.emplace_hint(_____p_o_s, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -428 │ │ │ │ -429#if __cplusplus > 201402L │ │ │ │ -430 /// Extract a node. │ │ │ │ -431 node_type │ │ │ │ -_4_3_2 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ -433 { │ │ │ │ -434 __glibcxx_assert(_____p_o_s != _e_n_d()); │ │ │ │ -435 return _M_h.extract(_____p_o_s); │ │ │ │ -436 } │ │ │ │ -437 │ │ │ │ -438 /// Extract a node. │ │ │ │ -439 node_type │ │ │ │ -_4_4_0 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& _____k_e_y) │ │ │ │ -441 { return _M_h.extract(_____k_e_y); } │ │ │ │ -442 │ │ │ │ -443 /// Re-insert an extracted node. │ │ │ │ -444 insert_return_type │ │ │ │ -_4_4_5 _i_n_s_e_r_t(node_type&& _____n_h) │ │ │ │ -446 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ -447 │ │ │ │ -448 /// Re-insert an extracted node. │ │ │ │ -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, node_type&& _____n_h) │ │ │ │ -451 { return _M_h._M_reinsert_node(_s_t_d_:_:_m_o_v_e(_____n_h)).position; } │ │ │ │ -452 │ │ │ │ -453#define __cpp_lib_unordered_map_try_emplace 201411L │ │ │ │ -454 /** │ │ │ │ -455 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -456 * %unordered_map. │ │ │ │ -457 * │ │ │ │ -458 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ -459 * the unordered_map. │ │ │ │ -460 * @param __args Arguments used to generate the .second for a │ │ │ │ -461 * new pair instance. │ │ │ │ -462 * │ │ │ │ -463 * @return A pair, of which the first element is an iterator that points │ │ │ │ -464 * to the possibly inserted pair, and the second is a bool that │ │ │ │ -465 * is true if the pair was actually inserted. │ │ │ │ -466 * │ │ │ │ -467 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ -468 * the %unordered_map. │ │ │ │ -469 * An %unordered_map relies on unique keys and thus a %pair is only │ │ │ │ -470 * inserted if its first element (the key) is not already present in the │ │ │ │ -471 * %unordered_map. │ │ │ │ -472 * If a %pair is not inserted, this function has no effect. │ │ │ │ -473 * │ │ │ │ -474 * Insertion requires amortized constant time. │ │ │ │ -475 */ │ │ │ │ -476 template │ │ │ │ -477 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_4_7_8 _t_r_y___e_m_p_l_a_c_e(const _k_e_y___t_y_p_e& _____k, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -479 { │ │ │ │ -480 return _M_h.try_emplace(_c_e_n_d(), _____k, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ -481 } │ │ │ │ -482 │ │ │ │ -483 // move-capable overload │ │ │ │ -484 template │ │ │ │ -485 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -486 _t_r_y___e_m_p_l_a_c_e(_k_e_y___t_y_p_e&& _____k, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -487 { │ │ │ │ -488 return _M_h.try_emplace(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ -489 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ -490 } │ │ │ │ -491 │ │ │ │ -492 /** │ │ │ │ -493 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -494 * %unordered_map. │ │ │ │ -495 * │ │ │ │ -496 * @param __hint An iterator that serves as a hint as to where the pair │ │ │ │ -497 * should be inserted. │ │ │ │ -498 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ -499 * the unordered_map. │ │ │ │ -500 * @param __args Arguments used to generate the .second for a │ │ │ │ -501 * new pair instance. │ │ │ │ -502 * @return An iterator that points to the element with key of the │ │ │ │ -503 * std::pair built from @a __args (may or may not be that │ │ │ │ -504 * std::pair). │ │ │ │ -505 * │ │ │ │ -506 * This function is not concerned about whether the insertion took place, │ │ │ │ -507 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ -508 * does. However, if insertion did not take place, │ │ │ │ -509 * this function has no effect. │ │ │ │ -510 * Note that the first parameter is only a hint and can potentially │ │ │ │ -511 * improve the performance of the insertion process. A bad hint would │ │ │ │ -512 * cause no gains in efficiency. │ │ │ │ -513 * │ │ │ │ -514 * See │ │ │ │ -515 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -516 * for more on @a hinting. │ │ │ │ -517 * │ │ │ │ -518 * Insertion requires amortized constant time. │ │ │ │ -519 */ │ │ │ │ -520 template │ │ │ │ -521 _i_t_e_r_a_t_o_r │ │ │ │ -_5_2_2 _t_r_y___e_m_p_l_a_c_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _k_e_y___t_y_p_e& _____k, │ │ │ │ -523 ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -524 { │ │ │ │ -525 return _M_h.try_emplace(_____h_i_n_t, _____k, │ │ │ │ -526 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...).first; │ │ │ │ -527 } │ │ │ │ -528 │ │ │ │ -529 // move-capable overload │ │ │ │ -530 template │ │ │ │ -531 _i_t_e_r_a_t_o_r │ │ │ │ -532 _t_r_y___e_m_p_l_a_c_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _k_e_y___t_y_p_e&& _____k, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -533 { │ │ │ │ -534 return _M_h.try_emplace(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ -535 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...).first; │ │ │ │ -536 } │ │ │ │ -537#endif // C++17 │ │ │ │ -538 │ │ │ │ -539 ///@{ │ │ │ │ -540 /** │ │ │ │ -541 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ -542 │ │ │ │ -543 * @param __x Pair to be inserted (see std::make_pair for easy │ │ │ │ -544 * creation of pairs). │ │ │ │ -545 * │ │ │ │ -546 * @return A pair, of which the first element is an iterator that │ │ │ │ -547 * points to the possibly inserted pair, and the second is │ │ │ │ -548 * a bool that is true if the pair was actually inserted. │ │ │ │ -549 * │ │ │ │ -550 * This function attempts to insert a (key, value) %pair into the │ │ │ │ -551 * %unordered_map. An %unordered_map relies on unique keys and thus a │ │ │ │ -552 * %pair is only inserted if its first element (the key) is not already │ │ │ │ -553 * present in the %unordered_map. │ │ │ │ -554 * │ │ │ │ -555 * Insertion requires amortized constant time. │ │ │ │ -556 */ │ │ │ │ -557 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_5_5_8 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -559 { return _M_h.insert(__x); } │ │ │ │ -560 │ │ │ │ -561 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -562 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ -563 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_5_6_4 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -565 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -566 │ │ │ │ -567 template │ │ │ │ -568 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, │ │ │ │ -569 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_>> │ │ │ │ -_5_7_0 _i_n_s_e_r_t(___P_a_i_r&& __x) │ │ │ │ -571 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ -572 ///@} │ │ │ │ -573 │ │ │ │ -574 ///@{ │ │ │ │ +246 ___S_e_l_f& │ │ │ │ +247 operator++() noexcept │ │ │ │ +248 { │ │ │ │ +249 _M_node = _M_node->_M_next; │ │ │ │ +250 return *this; │ │ │ │ +251 } │ │ │ │ +252 │ │ │ │ +253 ___S_e_l_f │ │ │ │ +254 operator++(int) noexcept │ │ │ │ +255 { │ │ │ │ +256 ___S_e_l_f _____t_m_p(*this); │ │ │ │ +257 _M_node = _M_node->_M_next; │ │ │ │ +258 return _____t_m_p; │ │ │ │ +259 } │ │ │ │ +260 │ │ │ │ +261 /** │ │ │ │ +262 * @brief Forward list const_iterator equality comparison. │ │ │ │ +263 */ │ │ │ │ +264 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +265 friend bool │ │ │ │ +_2_6_6 _o_p_e_r_a_t_o_r_=_=(const ___S_e_l_f& __x, const ___S_e_l_f& __y) noexcept │ │ │ │ +267 { return __x._M_node == __y._M_node; } │ │ │ │ +268 │ │ │ │ +269#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ +270 /** │ │ │ │ +271 * @brief Forward list const_iterator inequality comparison. │ │ │ │ +272 */ │ │ │ │ +273 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +274 friend bool │ │ │ │ +275 operator!=(const _Self& __x, const _Self& __y) noexcept │ │ │ │ +276 { return __x._M_node != __y._M_node; } │ │ │ │ +277#endif │ │ │ │ +278 │ │ │ │ +279 _Self │ │ │ │ +280 _M_next() const noexcept │ │ │ │ +281 { │ │ │ │ +282 if (this->_M_node) │ │ │ │ +283 return _Fwd_list_const_iterator(_M_node->_M_next); │ │ │ │ +284 else │ │ │ │ +285 return _Fwd_list_const_iterator(nullptr); │ │ │ │ +286 } │ │ │ │ +287 │ │ │ │ +288 const _Fwd_list_node_base* _M_node; │ │ │ │ +289 }; │ │ │ │ +290 │ │ │ │ +291 /** │ │ │ │ +292 * @brief Base class for %forward_list. │ │ │ │ +293 */ │ │ │ │ +294 template │ │ │ │ +_2_9_5 struct ___F_w_d___l_i_s_t___b_a_s_e │ │ │ │ +296 { │ │ │ │ +297 protected: │ │ │ │ +298 typedef _____a_l_l_o_c___r_e_b_i_n_d_<___A_l_l_o_c_,_ ___F_w_d___l_i_s_t___n_o_d_e_<___T_p_>> _Node_alloc_type; │ │ │ │ +299 typedef _____g_n_u___c_x_x_:_:_____a_l_l_o_c___t_r_a_i_t_s_<___N_o_d_e___a_l_l_o_c___t_y_p_e_> ___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s; │ │ │ │ +300 │ │ │ │ +301 struct _Fwd_list_impl │ │ │ │ +302 : public _Node_alloc_type │ │ │ │ +303 { │ │ │ │ +304 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e _M_head; │ │ │ │ +305 │ │ │ │ +306 _Fwd_list_impl() │ │ │ │ +307 noexcept(_i_s___n_o_t_h_r_o_w___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t_i_b_l_e_<___N_o_d_e___a_l_l_o_c___t_y_p_e_>_:_:_v_a_l_u_e) │ │ │ │ +308 : _Node_alloc_type(), _M_head() │ │ │ │ +309 { } │ │ │ │ +310 │ │ │ │ +311 _Fwd_list_impl(_Fwd_list_impl&&) = default; │ │ │ │ +312 │ │ │ │ +313 _Fwd_list_impl(_Fwd_list_impl&& _____f_l, _Node_alloc_type&& __a) │ │ │ │ +314 : _Node_alloc_type(_s_t_d_:_:_m_o_v_e(__a)), _M_head(_s_t_d_:_:_m_o_v_e(_____f_l._M_head)) │ │ │ │ +315 { } │ │ │ │ +316 │ │ │ │ +317 _Fwd_list_impl(_Node_alloc_type&& __a) │ │ │ │ +318 : _Node_alloc_type(_s_t_d_:_:_m_o_v_e(__a)), _M_head() │ │ │ │ +319 { } │ │ │ │ +320 }; │ │ │ │ +321 │ │ │ │ +322 _Fwd_list_impl _M_impl; │ │ │ │ +323 │ │ │ │ +324 public: │ │ │ │ +325 typedef ___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r_<___T_p_> _i_t_e_r_a_t_o_r; │ │ │ │ +326 typedef ___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r_<___T_p_> _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ +327 typedef ___F_w_d___l_i_s_t___n_o_d_e_<___T_p_> ___N_o_d_e; │ │ │ │ +328 │ │ │ │ +329 _Node_alloc_type& │ │ │ │ +330 _M_get_Node_allocator() noexcept │ │ │ │ +331 { return this->_M_impl; } │ │ │ │ +332 │ │ │ │ +333 const _Node_alloc_type& │ │ │ │ +334 _M_get_Node_allocator() const noexcept │ │ │ │ +335 { return this->_M_impl; } │ │ │ │ +336 │ │ │ │ +337 ___F_w_d___l_i_s_t___b_a_s_e() = default; │ │ │ │ +338 │ │ │ │ +339 ___F_w_d___l_i_s_t___b_a_s_e(_Node_alloc_type&& __a) │ │ │ │ +340 : _M_impl(_s_t_d_:_:_m_o_v_e(__a)) { } │ │ │ │ +341 │ │ │ │ +342 // When allocators are always equal. │ │ │ │ +343 ___F_w_d___l_i_s_t___b_a_s_e(___F_w_d___l_i_s_t___b_a_s_e&& _____l_s_t, _Node_alloc_type&& __a, │ │ │ │ +344 _s_t_d_:_:_t_r_u_e___t_y_p_e) │ │ │ │ +345 : _M_impl(_s_t_d_:_:_m_o_v_e(_____l_s_t._M_impl), _s_t_d_:_:_m_o_v_e(__a)) │ │ │ │ +346 { } │ │ │ │ +347 │ │ │ │ +348 // When allocators are not always equal. │ │ │ │ +349 ___F_w_d___l_i_s_t___b_a_s_e(___F_w_d___l_i_s_t___b_a_s_e&& _____l_s_t, _Node_alloc_type&& __a); │ │ │ │ +350 │ │ │ │ +351 ___F_w_d___l_i_s_t___b_a_s_e(___F_w_d___l_i_s_t___b_a_s_e&&) = default; │ │ │ │ +352 │ │ │ │ +353 _~___F_w_d___l_i_s_t___b_a_s_e() │ │ │ │ +354 { _M_erase_after(&_M_impl._M_head, nullptr); } │ │ │ │ +355 │ │ │ │ +356 protected: │ │ │ │ +357 ___N_o_d_e* │ │ │ │ +358 _M_get_node() │ │ │ │ +359 { │ │ │ │ +360 auto _____p_t_r = ___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s_:_:_a_l_l_o_c_a_t_e(_M_get_Node_allocator(), 1); │ │ │ │ +361 return std::__to_address(_____p_t_r); │ │ │ │ +362 } │ │ │ │ +363 │ │ │ │ +364 template │ │ │ │ +365 ___N_o_d_e* │ │ │ │ +366 _M_create_node(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +367 { │ │ │ │ +368 ___N_o_d_e* _____n_o_d_e = this->_M_get_node(); │ │ │ │ +369 __try │ │ │ │ +370 { │ │ │ │ +371 ::new ((void*)_____n_o_d_e) ___N_o_d_e; │ │ │ │ +372 _Node_alloc_traits::construct(_M_get_Node_allocator(), │ │ │ │ +373 _____n_o_d_e->_M_valptr(), │ │ │ │ +374 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ +375 } │ │ │ │ +376 __catch(...) │ │ │ │ +377 { │ │ │ │ +378 this->_M_put_node(_____n_o_d_e); │ │ │ │ +379 __throw_exception_again; │ │ │ │ +380 } │ │ │ │ +381 return _____n_o_d_e; │ │ │ │ +382 } │ │ │ │ +383 │ │ │ │ +384 template │ │ │ │ +385 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* │ │ │ │ +386 _M_insert_after(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s); │ │ │ │ +387 │ │ │ │ +388 void │ │ │ │ +389 _M_put_node(___N_o_d_e* __p) │ │ │ │ +390 { │ │ │ │ +391 typedef typename ___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s_:_:_p_o_i_n_t_e_r _Ptr; │ │ │ │ +392 auto _____p_t_r = _s_t_d_:_:_p_o_i_n_t_e_r___t_r_a_i_t_s_<___P_t_r_>_:_:_p_o_i_n_t_e_r___t_o(*__p); │ │ │ │ +393 ___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s_:_:_d_e_a_l_l_o_c_a_t_e(_M_get_Node_allocator(), _____p_t_r, 1); │ │ │ │ +394 } │ │ │ │ +395 │ │ │ │ +396 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* │ │ │ │ +397 _M_erase_after(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* _____p_o_s); │ │ │ │ +398 │ │ │ │ +399 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* │ │ │ │ +400 _M_erase_after(___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* _____p_o_s, │ │ │ │ +401 ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e* __last); │ │ │ │ +402 }; │ │ │ │ +403 │ │ │ │ +404 /** │ │ │ │ +405 * @brief A standard container with linear time access to elements, │ │ │ │ +406 * and fixed time insertion/deletion at any point in the sequence. │ │ │ │ +407 * │ │ │ │ +408 * @ingroup sequences │ │ │ │ +409 * @headerfile forward_list │ │ │ │ +410 * @since C++11 │ │ │ │ +411 * │ │ │ │ +412 * @tparam _Tp Type of element. │ │ │ │ +413 * @tparam _Alloc Allocator type, defaults to allocator<_Tp>. │ │ │ │ +414 * │ │ │ │ +415 * Meets the requirements of a container, a │ │ │ │ +416 * sequence, including the │ │ │ │ +417 * optional sequence requirements with the │ │ │ │ +418 * %exception of @c at and @c operator[]. │ │ │ │ +419 * │ │ │ │ +420 * This is a @e singly @e linked %list. Traversal up the │ │ │ │ +421 * %list requires linear time, but adding and removing elements (or │ │ │ │ +422 * @e nodes) is done in constant time, regardless of where the │ │ │ │ +423 * change takes place. Unlike std::vector and std::deque, │ │ │ │ +424 * random-access iterators are not provided, so subscripting ( @c │ │ │ │ +425 * [] ) access is not allowed. For algorithms which only need │ │ │ │ +426 * sequential access, this lack makes no difference. │ │ │ │ +427 * │ │ │ │ +428 * Also unlike the other standard containers, std::forward_list provides │ │ │ │ +429 * specialized algorithms %unique to linked lists, such as │ │ │ │ +430 * splicing, sorting, and in-place reversal. │ │ │ │ +431 */ │ │ │ │ +432 template> │ │ │ │ +_4_3_3 class _f_o_r_w_a_r_d___l_i_s_t : private ___F_w_d___l_i_s_t___b_a_s_e<_Tp, _Alloc> │ │ │ │ +434 { │ │ │ │ +435 static_assert(_i_s___s_a_m_e_<_t_y_p_e_n_a_m_e_ _r_e_m_o_v_e___c_v_<___T_p_>_:_:_t_y_p_e, _Tp>::value, │ │ │ │ +436 "std::forward_list must have a non-const, non-volatile value_type"); │ │ │ │ +437#if __cplusplus > 201703L || defined __STRICT_ANSI__ │ │ │ │ +438 static_assert(_i_s___s_a_m_e_<_t_y_p_e_n_a_m_e_ ___A_l_l_o_c_:_:_v_a_l_u_e___t_y_p_e_,_ ___T_p_>_:_:_v_a_l_u_e, │ │ │ │ +439 "std::forward_list must have the same value_type as its allocator"); │ │ │ │ +440#endif │ │ │ │ +441 │ │ │ │ +442 private: │ │ │ │ +443 typedef ___F_w_d___l_i_s_t___b_a_s_e_<___T_p_,_ ___A_l_l_o_c_> ___B_a_s_e; │ │ │ │ +444 typedef ___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e ___N_o_d_e___b_a_s_e; │ │ │ │ +445 typedef typename ___B_a_s_e_:_:___N_o_d_e ___N_o_d_e; │ │ │ │ +446 typedef typename ___B_a_s_e_:_:___N_o_d_e___a_l_l_o_c___t_y_p_e ___N_o_d_e___a_l_l_o_c___t_y_p_e; │ │ │ │ +447 typedef typename ___B_a_s_e_:_:___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s ___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s; │ │ │ │ +448 typedef _a_l_l_o_c_a_t_o_r___t_r_a_i_t_s_<_____a_l_l_o_c___r_e_b_i_n_d_<___A_l_l_o_c_,_ ___T_p_>> ___A_l_l_o_c___t_r_a_i_t_s; │ │ │ │ +449 │ │ │ │ +450 public: │ │ │ │ +451 // types: │ │ │ │ +452 typedef _Tp value_type; │ │ │ │ +453 typedef typename _Alloc_traits::pointer pointer; │ │ │ │ +454 typedef typename _Alloc_traits::const_pointer const_pointer; │ │ │ │ +455 typedef value_type& reference; │ │ │ │ +456 typedef const value_type& const_reference; │ │ │ │ +457 │ │ │ │ +458 typedef typename ___B_a_s_e_:_:_i_t_e_r_a_t_o_r _i_t_e_r_a_t_o_r; │ │ │ │ +459 typedef typename ___B_a_s_e_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ +460 typedef std::size_t size_type; │ │ │ │ +461 typedef std::ptrdiff_t difference_type; │ │ │ │ +462 typedef _Alloc allocator_type; │ │ │ │ +463 │ │ │ │ +464 // 23.3.4.2 construct/copy/destroy: │ │ │ │ +465 │ │ │ │ +466 /** │ │ │ │ +467 * @brief Creates a %forward_list with no elements. │ │ │ │ +468 */ │ │ │ │ +_4_6_9 _f_o_r_w_a_r_d___l_i_s_t() = default; │ │ │ │ +470 │ │ │ │ +471 /** │ │ │ │ +472 * @brief Creates a %forward_list with no elements. │ │ │ │ +473 * @param __al An allocator object. │ │ │ │ +474 */ │ │ │ │ +475 explicit │ │ │ │ +_4_7_6 _f_o_r_w_a_r_d___l_i_s_t(const _Alloc& _____a_l) noexcept │ │ │ │ +477 : ___B_a_s_e(___N_o_d_e___a_l_l_o_c___t_y_p_e(_____a_l)) │ │ │ │ +478 { } │ │ │ │ +479 │ │ │ │ +480 /** │ │ │ │ +481 * @brief Copy constructor with allocator argument. │ │ │ │ +482 * @param __list Input list to copy. │ │ │ │ +483 * @param __al An allocator object. │ │ │ │ +484 */ │ │ │ │ +_4_8_5 _f_o_r_w_a_r_d___l_i_s_t(const _f_o_r_w_a_r_d___l_i_s_t& _____l_i_s_t, │ │ │ │ +486 const _____t_y_p_e___i_d_e_n_t_i_t_y___t_<___A_l_l_o_c_>& _____a_l) │ │ │ │ +487 : ___B_a_s_e(___N_o_d_e___a_l_l_o_c___t_y_p_e(_____a_l)) │ │ │ │ +488 { _M_range_initialize(_____l_i_s_t.begin(), _____l_i_s_t.end()); } │ │ │ │ +489 │ │ │ │ +490 private: │ │ │ │ +491 _f_o_r_w_a_r_d___l_i_s_t(_f_o_r_w_a_r_d___l_i_s_t&& _____l_i_s_t, _Node_alloc_type&& _____a_l, │ │ │ │ +492 _f_a_l_s_e___t_y_p_e) │ │ │ │ +493 : _Base(_s_t_d::_m_o_v_e(_____l_i_s_t), _s_t_d::_m_o_v_e(_____a_l)) │ │ │ │ +494 { │ │ │ │ +495 // If __list is not empty it means its allocator is not equal to __a, │ │ │ │ +496 // so we need to move from each element individually. │ │ │ │ +497 _i_n_s_e_r_t___a_f_t_e_r(_c_b_e_f_o_r_e___b_e_g_i_n(), │ │ │ │ +498 std::__make_move_if_noexcept_iterator(_____l_i_s_t.begin()), │ │ │ │ +499 std::__make_move_if_noexcept_iterator(_____l_i_s_t.end())); │ │ │ │ +500 } │ │ │ │ +501 │ │ │ │ +502 _f_o_r_w_a_r_d___l_i_s_t(_f_o_r_w_a_r_d___l_i_s_t&& __list, _Node_alloc_type&& __al, │ │ │ │ +503 _t_r_u_e___t_y_p_e) │ │ │ │ +504 noexcept │ │ │ │ +505 : _Base(_s_t_d_:_:_m_o_v_e(__list), _Node_alloc_type(__al), _t_r_u_e___t_y_p_e{}) │ │ │ │ +506 { } │ │ │ │ +507 │ │ │ │ +508 public: │ │ │ │ +509 /** │ │ │ │ +510 * @brief Move constructor with allocator argument. │ │ │ │ +511 * @param __list Input list to move. │ │ │ │ +512 * @param __al An allocator object. │ │ │ │ +513 */ │ │ │ │ +_5_1_4 _f_o_r_w_a_r_d___l_i_s_t(_f_o_r_w_a_r_d___l_i_s_t&& _____l_i_s_t, │ │ │ │ +515 const _____t_y_p_e___i_d_e_n_t_i_t_y___t_<___A_l_l_o_c_>& _____a_l) │ │ │ │ +516 noexcept(_Node_alloc_traits::_S_always_equal()) │ │ │ │ +517 : _f_o_r_w_a_r_d___l_i_s_t(_s_t_d::_m_o_v_e(_____l_i_s_t), ___N_o_d_e___a_l_l_o_c___t_y_p_e(_____a_l), │ │ │ │ +518 _t_y_p_e_n_a_m_e ___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s::is_always_equal{}) │ │ │ │ +519 { } │ │ │ │ +520 │ │ │ │ +521 /** │ │ │ │ +522 * @brief Creates a %forward_list with default constructed elements. │ │ │ │ +523 * @param __n The number of elements to initially create. │ │ │ │ +524 * @param __al An allocator object. │ │ │ │ +525 * │ │ │ │ +526 * This constructor creates the %forward_list with @a __n default │ │ │ │ +527 * constructed elements. │ │ │ │ +528 */ │ │ │ │ +529 explicit │ │ │ │ +_5_3_0 _f_o_r_w_a_r_d___l_i_s_t(size_type __n, const _Alloc& _____a_l = _Alloc()) │ │ │ │ +531 : ___B_a_s_e(___N_o_d_e___a_l_l_o_c___t_y_p_e(_____a_l)) │ │ │ │ +532 { _M_default_initialize(__n); } │ │ │ │ +533 │ │ │ │ +534 /** │ │ │ │ +535 * @brief Creates a %forward_list with copies of an exemplar element. │ │ │ │ +536 * @param __n The number of elements to initially create. │ │ │ │ +537 * @param __value An element to copy. │ │ │ │ +538 * @param __al An allocator object. │ │ │ │ +539 * │ │ │ │ +540 * This constructor fills the %forward_list with @a __n copies of │ │ │ │ +541 * @a __value. │ │ │ │ +542 */ │ │ │ │ +_5_4_3 _f_o_r_w_a_r_d___l_i_s_t(size_type __n, const _Tp& __value, │ │ │ │ +544 const _Alloc& _____a_l = _Alloc()) │ │ │ │ +545 : ___B_a_s_e(___N_o_d_e___a_l_l_o_c___t_y_p_e(_____a_l)) │ │ │ │ +546 { _M_fill_initialize(__n, __value); } │ │ │ │ +547 │ │ │ │ +548 /** │ │ │ │ +549 * @brief Builds a %forward_list from a range. │ │ │ │ +550 * @param __first An input iterator. │ │ │ │ +551 * @param __last An input iterator. │ │ │ │ +552 * @param __al An allocator object. │ │ │ │ +553 * │ │ │ │ +554 * Create a %forward_list consisting of copies of the elements from │ │ │ │ +555 * [@a __first,@a __last). This is linear in N (where N is │ │ │ │ +556 * distance(@a __first,@a __last)). │ │ │ │ +557 */ │ │ │ │ +558 template> │ │ │ │ +_5_6_0 _f_o_r_w_a_r_d___l_i_s_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ +561 const _Alloc& _____a_l = _Alloc()) │ │ │ │ +562 : ___B_a_s_e(___N_o_d_e___a_l_l_o_c___t_y_p_e(_____a_l)) │ │ │ │ +563 { _M_range_initialize(__first, __last); } │ │ │ │ +564 │ │ │ │ +565 /** │ │ │ │ +566 * @brief The %forward_list copy constructor. │ │ │ │ +567 * @param __list A %forward_list of identical element and allocator │ │ │ │ +568 * types. │ │ │ │ +569 */ │ │ │ │ +_5_7_0 _f_o_r_w_a_r_d___l_i_s_t(const _f_o_r_w_a_r_d___l_i_s_t& _____l_i_s_t) │ │ │ │ +571 : ___B_a_s_e(___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s::_S_select_on_copy( │ │ │ │ +572 _____l_i_s_t._M_get_Node_allocator())) │ │ │ │ +573 { _M_range_initialize(_____l_i_s_t.begin(), _____l_i_s_t.end()); } │ │ │ │ +574 │ │ │ │ 575 /** │ │ │ │ -576 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ -577 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -578 * pair should be inserted. │ │ │ │ -579 * @param __x Pair to be inserted (see std::make_pair for easy creation │ │ │ │ -580 * of pairs). │ │ │ │ -581 * @return An iterator that points to the element with key of │ │ │ │ -582 * @a __x (may or may not be the %pair passed in). │ │ │ │ -583 * │ │ │ │ -584 * This function is not concerned about whether the insertion took place, │ │ │ │ -585 * and thus does not return a boolean like the single-argument insert() │ │ │ │ -586 * does. Note that the first parameter is only a hint and can │ │ │ │ -587 * potentially improve the performance of the insertion process. A bad │ │ │ │ -588 * hint would cause no gains in efficiency. │ │ │ │ -589 * │ │ │ │ -590 * See │ │ │ │ -591 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -592 * for more on @a hinting. │ │ │ │ -593 * │ │ │ │ -594 * Insertion requires amortized constant time. │ │ │ │ -595 */ │ │ │ │ -596 _i_t_e_r_a_t_o_r │ │ │ │ -_5_9_7 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -598 { return _M_h.insert(_____h_i_n_t, __x); } │ │ │ │ -599 │ │ │ │ -600 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -601 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ -602 _i_t_e_r_a_t_o_r │ │ │ │ -_6_0_3 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -604 { return _M_h.insert(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -605 │ │ │ │ -606 template │ │ │ │ -607 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, _i_t_e_r_a_t_o_r> │ │ │ │ -_6_0_8 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, ___P_a_i_r&& __x) │ │ │ │ -609 { return _M_h.emplace_hint(_____h_i_n_t, _s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ -610 ///@} │ │ │ │ -611 │ │ │ │ -612 /** │ │ │ │ -613 * @brief A template function that attempts to insert a range of │ │ │ │ -614 * elements. │ │ │ │ -615 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -616 * inserted. │ │ │ │ -617 * @param __last Iterator pointing to the end of the range. │ │ │ │ -618 * │ │ │ │ -619 * Complexity similar to that of the range constructor. │ │ │ │ -620 */ │ │ │ │ -621 template │ │ │ │ -622 void │ │ │ │ -_6_2_3 _i_n_s_e_r_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ -624 { _M_h.insert(__first, __last); } │ │ │ │ -625 │ │ │ │ -626 /** │ │ │ │ -627 * @brief Attempts to insert a list of elements into the %unordered_map. │ │ │ │ -628 * @param __l A std::initializer_list of elements │ │ │ │ -629 * to be inserted. │ │ │ │ -630 * │ │ │ │ -631 * Complexity similar to that of the range constructor. │ │ │ │ -632 */ │ │ │ │ -633 void │ │ │ │ -_6_3_4 _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) │ │ │ │ -635 { _M_h.insert(_____l); } │ │ │ │ -636 │ │ │ │ -637 │ │ │ │ -638#if __cplusplus > 201402L │ │ │ │ -639 /** │ │ │ │ -640 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ -641 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ -642 * the map. │ │ │ │ -643 * @param __obj Argument used to generate the .second for a pair │ │ │ │ -644 * instance. │ │ │ │ -645 * │ │ │ │ -646 * @return A pair, of which the first element is an iterator that │ │ │ │ -647 * points to the possibly inserted pair, and the second is │ │ │ │ -648 * a bool that is true if the pair was actually inserted. │ │ │ │ -649 * │ │ │ │ -650 * This function attempts to insert a (key, value) %pair into the │ │ │ │ -651 * %unordered_map. An %unordered_map relies on unique keys and thus a │ │ │ │ -652 * %pair is only inserted if its first element (the key) is not already │ │ │ │ -653 * present in the %unordered_map. │ │ │ │ -654 * If the %pair was already in the %unordered_map, the .second of │ │ │ │ -655 * the %pair is assigned from __obj. │ │ │ │ -656 * │ │ │ │ -657 * Insertion requires amortized constant time. │ │ │ │ -658 */ │ │ │ │ -659 template │ │ │ │ -660 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_6_6_1 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(const _k_e_y___t_y_p_e& _____k, _Obj&& _____o_b_j) │ │ │ │ -662 { │ │ │ │ -663 auto _____r_e_t = _M_h.try_emplace(_c_e_n_d(), _____k, │ │ │ │ -664 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ -665 if (!_____r_e_t.second) │ │ │ │ -666 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ -667 return _____r_e_t; │ │ │ │ -668 } │ │ │ │ -669 │ │ │ │ -670 // move-capable overload │ │ │ │ -671 template │ │ │ │ -672 _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -673 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_k_e_y___t_y_p_e&& _____k, _Obj&& _____o_b_j) │ │ │ │ -674 { │ │ │ │ -675 auto _____r_e_t = _M_h.try_emplace(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ -676 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ -677 if (!_____r_e_t.second) │ │ │ │ -678 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ -679 return _____r_e_t; │ │ │ │ -680 } │ │ │ │ -681 │ │ │ │ -682 /** │ │ │ │ -683 * @brief Attempts to insert a std::pair into the %unordered_map. │ │ │ │ -684 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -685 * pair should be inserted. │ │ │ │ -686 * @param __k Key to use for finding a possibly existing pair in │ │ │ │ -687 * the unordered_map. │ │ │ │ -688 * @param __obj Argument used to generate the .second for a pair │ │ │ │ -689 * instance. │ │ │ │ -690 * @return An iterator that points to the element with key of │ │ │ │ -691 * @a __x (may or may not be the %pair passed in). │ │ │ │ -692 * │ │ │ │ -693 * This function is not concerned about whether the insertion took place, │ │ │ │ -694 * and thus does not return a boolean like the single-argument insert() │ │ │ │ -695 * does. │ │ │ │ -696 * If the %pair was already in the %unordered map, the .second of │ │ │ │ -697 * the %pair is assigned from __obj. │ │ │ │ -698 * Note that the first parameter is only a hint and can │ │ │ │ -699 * potentially improve the performance of the insertion process. A bad │ │ │ │ -700 * hint would cause no gains in efficiency. │ │ │ │ -701 * │ │ │ │ -702 * See │ │ │ │ -703 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -704 * for more on @a hinting. │ │ │ │ -705 * │ │ │ │ -706 * Insertion requires amortized constant time. │ │ │ │ -707 */ │ │ │ │ -708 template │ │ │ │ -709 _i_t_e_r_a_t_o_r │ │ │ │ -_7_1_0 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _k_e_y___t_y_p_e& _____k, │ │ │ │ -711 _Obj&& _____o_b_j) │ │ │ │ -712 { │ │ │ │ -713 auto _____r_e_t = _M_h.try_emplace(_____h_i_n_t, _____k, _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ -714 if (!_____r_e_t.second) │ │ │ │ -715 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ -716 return _____r_e_t.first; │ │ │ │ -717 } │ │ │ │ -718 │ │ │ │ -719 // move-capable overload │ │ │ │ -720 template │ │ │ │ -721 _i_t_e_r_a_t_o_r │ │ │ │ -722 _i_n_s_e_r_t___o_r___a_s_s_i_g_n(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _k_e_y___t_y_p_e&& _____k, _Obj&& _____o_b_j) │ │ │ │ -723 { │ │ │ │ -724 auto _____r_e_t = _M_h.try_emplace(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____k), │ │ │ │ -725 _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j)); │ │ │ │ -726 if (!_____r_e_t.second) │ │ │ │ -727 _____r_e_t.first->second = _s_t_d_:_:_f_o_r_w_a_r_d_<___O_b_j_>(_____o_b_j); │ │ │ │ -728 return _____r_e_t.first; │ │ │ │ -729 } │ │ │ │ -730#endif │ │ │ │ -731 │ │ │ │ -732 ///@{ │ │ │ │ -733 /** │ │ │ │ -734 * @brief Erases an element from an %unordered_map. │ │ │ │ -735 * @param __position An iterator pointing to the element to be erased. │ │ │ │ -736 * @return An iterator pointing to the element immediately following │ │ │ │ -737 * @a __position prior to the element being erased. If no such │ │ │ │ -738 * element exists, end() is returned. │ │ │ │ -739 * │ │ │ │ -740 * This function erases an element, pointed to by the given iterator, │ │ │ │ -741 * from an %unordered_map. │ │ │ │ -742 * Note that this function only erases the element, and that if the │ │ │ │ -743 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -744 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -745 */ │ │ │ │ -746 _i_t_e_r_a_t_o_r │ │ │ │ -_7_4_7 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -748 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -749 │ │ │ │ -750 // LWG 2059. │ │ │ │ -751 _i_t_e_r_a_t_o_r │ │ │ │ -_7_5_2 _e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -753 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -754 ///@} │ │ │ │ -755 │ │ │ │ -756 /** │ │ │ │ -757 * @brief Erases elements according to the provided key. │ │ │ │ -758 * @param __x Key of element to be erased. │ │ │ │ -759 * @return The number of elements erased. │ │ │ │ -760 * │ │ │ │ -761 * This function erases all the elements located by the given key from │ │ │ │ -762 * an %unordered_map. For an %unordered_map the result of this function │ │ │ │ -763 * can only be 0 (not present) or 1 (present). │ │ │ │ -764 * Note that this function only erases the element, and that if the │ │ │ │ -765 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -766 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -767 */ │ │ │ │ -768 _s_i_z_e___t_y_p_e │ │ │ │ -_7_6_9 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -770 { return _M_h.erase(__x); } │ │ │ │ -771 │ │ │ │ -772 /** │ │ │ │ -773 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ -774 * %unordered_map. │ │ │ │ -775 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -776 * erased. │ │ │ │ -777 * @param __last Iterator pointing to the end of the range to │ │ │ │ -778 * be erased. │ │ │ │ -779 * @return The iterator @a __last. │ │ │ │ -780 * │ │ │ │ -781 * This function erases a sequence of elements from an %unordered_map. │ │ │ │ -782 * Note that this function only erases the elements, and that if │ │ │ │ -783 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -784 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -785 */ │ │ │ │ -786 _i_t_e_r_a_t_o_r │ │ │ │ -_7_8_7 _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) │ │ │ │ -788 { return _M_h.erase(__first, __last); } │ │ │ │ -789 │ │ │ │ -790 /** │ │ │ │ -791 * Erases all elements in an %unordered_map. │ │ │ │ -792 * Note that this function only erases the elements, and that if the │ │ │ │ -793 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ -794 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -795 */ │ │ │ │ -796 void │ │ │ │ -_7_9_7 _c_l_e_a_r() noexcept │ │ │ │ -798 { _M_h.clear(); } │ │ │ │ -799 │ │ │ │ -800 /** │ │ │ │ -801 * @brief Swaps data with another %unordered_map. │ │ │ │ -802 * @param __x An %unordered_map of the same element and allocator │ │ │ │ -803 * types. │ │ │ │ -804 * │ │ │ │ -805 * This exchanges the elements between two %unordered_map in constant │ │ │ │ -806 * time. │ │ │ │ -807 * Note that the global std::swap() function is specialized such that │ │ │ │ -808 * std::swap(m1,m2) will feed to this function. │ │ │ │ -809 */ │ │ │ │ -810 void │ │ │ │ -_8_1_1 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_a_p& __x) │ │ │ │ -812 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ -813 { _M_h.swap(__x._M_h); } │ │ │ │ -814 │ │ │ │ -815#if __cplusplus > 201402L │ │ │ │ -816 template │ │ │ │ -817 friend class std::_Hash_merge_helper; │ │ │ │ -818 │ │ │ │ -819 template │ │ │ │ -820 void │ │ │ │ -821 merge(_u_n_o_r_d_e_r_e_d___m_a_p_<___K_e_y_,_ ___T_p_,_ ___H_2_,_ ___P_2_,_ ___A_l_l_o_c_>& _____s_o_u_r_c_e) │ │ │ │ -822 { │ │ │ │ -823 using ___M_e_r_g_e___h_e_l_p_e_r = ___H_a_s_h___m_e_r_g_e___h_e_l_p_e_r_<_u_n_o_r_d_e_r_e_d___m_a_p_,_ ___H_2_,_ ___P_2_>; │ │ │ │ -824 _M_h._M_merge_unique(_Merge_helper::_S_get_table(_____s_o_u_r_c_e)); │ │ │ │ -825 } │ │ │ │ -826 │ │ │ │ -827 template │ │ │ │ -828 void │ │ │ │ -829 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ -830 { merge(__source); } │ │ │ │ -831 │ │ │ │ -832 template │ │ │ │ -833 void │ │ │ │ -834 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>& __source) │ │ │ │ +576 * @brief The %forward_list move constructor. │ │ │ │ +577 * @param __list A %forward_list of identical element and allocator │ │ │ │ +578 * types. │ │ │ │ +579 * │ │ │ │ +580 * The newly-created %forward_list contains the exact contents of the │ │ │ │ +581 * moved instance. The contents of the moved instance are a valid, but │ │ │ │ +582 * unspecified %forward_list. │ │ │ │ +583 */ │ │ │ │ +_5_8_4 _f_o_r_w_a_r_d___l_i_s_t(_f_o_r_w_a_r_d___l_i_s_t&&) = default; │ │ │ │ +585 │ │ │ │ +586 /** │ │ │ │ +587 * @brief Builds a %forward_list from an initializer_list │ │ │ │ +588 * @param __il An initializer_list of value_type. │ │ │ │ +589 * @param __al An allocator object. │ │ │ │ +590 * │ │ │ │ +591 * Create a %forward_list consisting of copies of the elements │ │ │ │ +592 * in the initializer_list @a __il. This is linear in __il.size(). │ │ │ │ +593 */ │ │ │ │ +_5_9_4 _f_o_r_w_a_r_d___l_i_s_t(_s_t_d_:_:_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<___T_p_> _____i_l, │ │ │ │ +595 const _Alloc& _____a_l = _Alloc()) │ │ │ │ +596 : ___B_a_s_e(___N_o_d_e___a_l_l_o_c___t_y_p_e(_____a_l)) │ │ │ │ +597 { _M_range_initialize(_____i_l.begin(), _____i_l.end()); } │ │ │ │ +598 │ │ │ │ +599 /** │ │ │ │ +600 * @brief The forward_list dtor. │ │ │ │ +601 */ │ │ │ │ +_6_0_2 _~_f_o_r_w_a_r_d___l_i_s_t() noexcept │ │ │ │ +603 { } │ │ │ │ +604 │ │ │ │ +605 /** │ │ │ │ +606 * @brief The %forward_list assignment operator. │ │ │ │ +607 * @param __list A %forward_list of identical element and allocator │ │ │ │ +608 * types. │ │ │ │ +609 * │ │ │ │ +610 * All the elements of @a __list are copied. │ │ │ │ +611 * │ │ │ │ +612 * Whether the allocator is copied depends on the allocator traits. │ │ │ │ +613 */ │ │ │ │ +614 _f_o_r_w_a_r_d___l_i_s_t& │ │ │ │ +615 _o_p_e_r_a_t_o_r_=(const _f_o_r_w_a_r_d___l_i_s_t& _____l_i_s_t); │ │ │ │ +616 │ │ │ │ +617 /** │ │ │ │ +618 * @brief The %forward_list move assignment operator. │ │ │ │ +619 * @param __list A %forward_list of identical element and allocator │ │ │ │ +620 * types. │ │ │ │ +621 * │ │ │ │ +622 * The contents of @a __list are moved into this %forward_list │ │ │ │ +623 * (without copying, if the allocators permit it). │ │ │ │ +624 * │ │ │ │ +625 * Afterwards @a __list is a valid, but unspecified %forward_list │ │ │ │ +626 * │ │ │ │ +627 * Whether the allocator is moved depends on the allocator traits. │ │ │ │ +628 */ │ │ │ │ +629 _f_o_r_w_a_r_d___l_i_s_t& │ │ │ │ +_6_3_0 _o_p_e_r_a_t_o_r_=(_f_o_r_w_a_r_d___l_i_s_t&& _____l_i_s_t) │ │ │ │ +631 noexcept(_Node_alloc_traits::_S_nothrow_move()) │ │ │ │ +632 { │ │ │ │ +633 constexpr bool _____m_o_v_e___s_t_o_r_a_g_e = │ │ │ │ +634 _Node_alloc_traits::_S_propagate_on_move_assign() │ │ │ │ +635 || _Node_alloc_traits::_S_always_equal(); │ │ │ │ +636 _M_move_assign(_s_t_d_:_:_m_o_v_e(_____l_i_s_t), _____b_o_o_l___c_o_n_s_t_a_n_t_<_____m_o_v_e___s_t_o_r_a_g_e_>()); │ │ │ │ +637 return *this; │ │ │ │ +638 } │ │ │ │ +639 │ │ │ │ +640 /** │ │ │ │ +641 * @brief The %forward_list initializer list assignment operator. │ │ │ │ +642 * @param __il An initializer_list of value_type. │ │ │ │ +643 * │ │ │ │ +644 * Replace the contents of the %forward_list with copies of the │ │ │ │ +645 * elements in the initializer_list @a __il. This is linear in │ │ │ │ +646 * __il.size(). │ │ │ │ +647 */ │ │ │ │ +648 _f_o_r_w_a_r_d___l_i_s_t& │ │ │ │ +_6_4_9 _o_p_e_r_a_t_o_r_=(_s_t_d_:_:_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<___T_p_> _____i_l) │ │ │ │ +650 { │ │ │ │ +651 _a_s_s_i_g_n(_____i_l); │ │ │ │ +652 return *this; │ │ │ │ +653 } │ │ │ │ +654 │ │ │ │ +655 /** │ │ │ │ +656 * @brief Assigns a range to a %forward_list. │ │ │ │ +657 * @param __first An input iterator. │ │ │ │ +658 * @param __last An input iterator. │ │ │ │ +659 * │ │ │ │ +660 * This function fills a %forward_list with copies of the elements │ │ │ │ +661 * in the range [@a __first,@a __last). │ │ │ │ +662 * │ │ │ │ +663 * Note that the assignment completely changes the %forward_list and │ │ │ │ +664 * that the number of elements of the resulting %forward_list is the │ │ │ │ +665 * same as the number of elements assigned. │ │ │ │ +666 */ │ │ │ │ +667 template> │ │ │ │ +669 void │ │ │ │ +_6_7_0 _a_s_s_i_g_n(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ +671 { │ │ │ │ +672 typedef _i_s___a_s_s_i_g_n_a_b_l_e<_Tp, decltype(*__first)> __assignable; │ │ │ │ +673 _M_assign(__first, __last, __assignable()); │ │ │ │ +674 } │ │ │ │ +675 │ │ │ │ +676 /** │ │ │ │ +677 * @brief Assigns a given value to a %forward_list. │ │ │ │ +678 * @param __n Number of elements to be assigned. │ │ │ │ +679 * @param __val Value to be assigned. │ │ │ │ +680 * │ │ │ │ +681 * This function fills a %forward_list with @a __n copies of the │ │ │ │ +682 * given value. Note that the assignment completely changes the │ │ │ │ +683 * %forward_list, and that the resulting %forward_list has __n │ │ │ │ +684 * elements. │ │ │ │ +685 */ │ │ │ │ +686 void │ │ │ │ +_6_8_7 _a_s_s_i_g_n(size_type __n, const _Tp& __val) │ │ │ │ +688 { _M_assign_n(__n, __val, _i_s___c_o_p_y___a_s_s_i_g_n_a_b_l_e_<___T_p_>()); } │ │ │ │ +689 │ │ │ │ +690 /** │ │ │ │ +691 * @brief Assigns an initializer_list to a %forward_list. │ │ │ │ +692 * @param __il An initializer_list of value_type. │ │ │ │ +693 * │ │ │ │ +694 * Replace the contents of the %forward_list with copies of the │ │ │ │ +695 * elements in the initializer_list @a __il. This is linear in │ │ │ │ +696 * il.size(). │ │ │ │ +697 */ │ │ │ │ +698 void │ │ │ │ +_6_9_9 _a_s_s_i_g_n(_s_t_d_:_:_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<___T_p_> _____i_l) │ │ │ │ +700 { _a_s_s_i_g_n(_____i_l.begin(), _____i_l.end()); } │ │ │ │ +701 │ │ │ │ +702 /// Get a copy of the memory allocation object. │ │ │ │ +703 allocator_type │ │ │ │ +_7_0_4 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ +705 { return allocator_type(this->_M_get_Node_allocator()); } │ │ │ │ +706 │ │ │ │ +707 // 23.3.4.3 iterators: │ │ │ │ +708 │ │ │ │ +709 /** │ │ │ │ +710 * Returns a read/write iterator that points before the first element │ │ │ │ +711 * in the %forward_list. Iteration is done in ordinary element order. │ │ │ │ +712 */ │ │ │ │ +713 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +714 _i_t_e_r_a_t_o_r │ │ │ │ +_7_1_5 _b_e_f_o_r_e___b_e_g_i_n() noexcept │ │ │ │ +716 { return _i_t_e_r_a_t_o_r(&this->_M_impl._M_head); } │ │ │ │ +717 │ │ │ │ +718 /** │ │ │ │ +719 * Returns a read-only (constant) iterator that points before the │ │ │ │ +720 * first element in the %forward_list. Iteration is done in ordinary │ │ │ │ +721 * element order. │ │ │ │ +722 */ │ │ │ │ +723 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +724 const_iterator │ │ │ │ +_7_2_5 _b_e_f_o_r_e___b_e_g_i_n() const noexcept │ │ │ │ +726 { return _c_o_n_s_t___i_t_e_r_a_t_o_r(&this->_M_impl._M_head); } │ │ │ │ +727 │ │ │ │ +728 /** │ │ │ │ +729 * Returns a read/write iterator that points to the first element │ │ │ │ +730 * in the %forward_list. Iteration is done in ordinary element order. │ │ │ │ +731 */ │ │ │ │ +732 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +733 _i_t_e_r_a_t_o_r │ │ │ │ +_7_3_4 _b_e_g_i_n() noexcept │ │ │ │ +735 { return _i_t_e_r_a_t_o_r(this->_M_impl._M_head._M_next); } │ │ │ │ +736 │ │ │ │ +737 /** │ │ │ │ +738 * Returns a read-only (constant) iterator that points to the first │ │ │ │ +739 * element in the %forward_list. Iteration is done in ordinary │ │ │ │ +740 * element order. │ │ │ │ +741 */ │ │ │ │ +742 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +743 const_iterator │ │ │ │ +_7_4_4 _b_e_g_i_n() const noexcept │ │ │ │ +745 { return _c_o_n_s_t___i_t_e_r_a_t_o_r(this->_M_impl._M_head._M_next); } │ │ │ │ +746 │ │ │ │ +747 /** │ │ │ │ +748 * Returns a read/write iterator that points one past the last │ │ │ │ +749 * element in the %forward_list. Iteration is done in ordinary │ │ │ │ +750 * element order. │ │ │ │ +751 */ │ │ │ │ +752 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +753 _i_t_e_r_a_t_o_r │ │ │ │ +_7_5_4 _e_n_d() noexcept │ │ │ │ +755 { return _i_t_e_r_a_t_o_r(nullptr); } │ │ │ │ +756 │ │ │ │ +757 /** │ │ │ │ +758 * Returns a read-only iterator that points one past the last │ │ │ │ +759 * element in the %forward_list. Iteration is done in ordinary │ │ │ │ +760 * element order. │ │ │ │ +761 */ │ │ │ │ +762 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +763 const_iterator │ │ │ │ +_7_6_4 _e_n_d() const noexcept │ │ │ │ +765 { return _c_o_n_s_t___i_t_e_r_a_t_o_r(nullptr); } │ │ │ │ +766 │ │ │ │ +767 /** │ │ │ │ +768 * Returns a read-only (constant) iterator that points to the │ │ │ │ +769 * first element in the %forward_list. Iteration is done in ordinary │ │ │ │ +770 * element order. │ │ │ │ +771 */ │ │ │ │ +772 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +773 const_iterator │ │ │ │ +_7_7_4 _c_b_e_g_i_n() const noexcept │ │ │ │ +775 { return _c_o_n_s_t___i_t_e_r_a_t_o_r(this->_M_impl._M_head._M_next); } │ │ │ │ +776 │ │ │ │ +777 /** │ │ │ │ +778 * Returns a read-only (constant) iterator that points before the │ │ │ │ +779 * first element in the %forward_list. Iteration is done in ordinary │ │ │ │ +780 * element order. │ │ │ │ +781 */ │ │ │ │ +782 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +783 const_iterator │ │ │ │ +_7_8_4 _c_b_e_f_o_r_e___b_e_g_i_n() const noexcept │ │ │ │ +785 { return _c_o_n_s_t___i_t_e_r_a_t_o_r(&this->_M_impl._M_head); } │ │ │ │ +786 │ │ │ │ +787 /** │ │ │ │ +788 * Returns a read-only (constant) iterator that points one past │ │ │ │ +789 * the last element in the %forward_list. Iteration is done in │ │ │ │ +790 * ordinary element order. │ │ │ │ +791 */ │ │ │ │ +792 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +793 const_iterator │ │ │ │ +_7_9_4 _c_e_n_d() const noexcept │ │ │ │ +795 { return _c_o_n_s_t___i_t_e_r_a_t_o_r(nullptr); } │ │ │ │ +796 │ │ │ │ +797 /** │ │ │ │ +798 * Returns true if the %forward_list is empty. (Thus begin() would │ │ │ │ +799 * equal end().) │ │ │ │ +800 */ │ │ │ │ +801 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +802 bool │ │ │ │ +_8_0_3 _e_m_p_t_y() const noexcept │ │ │ │ +804 { return this->_M_impl._M_head._M_next == nullptr; } │ │ │ │ +805 │ │ │ │ +806 /** │ │ │ │ +807 * Returns the largest possible number of elements of %forward_list. │ │ │ │ +808 */ │ │ │ │ +809 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +810 size_type │ │ │ │ +_8_1_1 _m_a_x___s_i_z_e() const noexcept │ │ │ │ +812 { return ___N_o_d_e___a_l_l_o_c___t_r_a_i_t_s_:_:_m_a_x___s_i_z_e(this->_M_get_Node_allocator()); } │ │ │ │ +813 │ │ │ │ +814 // 23.3.4.4 element access: │ │ │ │ +815 │ │ │ │ +816 /** │ │ │ │ +817 * Returns a read/write reference to the data at the first │ │ │ │ +818 * element of the %forward_list. │ │ │ │ +819 */ │ │ │ │ +820 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +821 reference │ │ │ │ +_8_2_2 _f_r_o_n_t() │ │ │ │ +823 { │ │ │ │ +824 ___N_o_d_e* _____f_r_o_n_t = static_cast<___N_o_d_e*>(this->_M_impl._M_head._M_next); │ │ │ │ +825 return *_____f_r_o_n_t->_M_valptr(); │ │ │ │ +826 } │ │ │ │ +827 │ │ │ │ +828 /** │ │ │ │ +829 * Returns a read-only (constant) reference to the data at the first │ │ │ │ +830 * element of the %forward_list. │ │ │ │ +831 */ │ │ │ │ +832 [[_____n_o_d_i_s_c_a_r_d____]] │ │ │ │ +833 const_reference │ │ │ │ +_8_3_4 _f_r_o_n_t() const │ │ │ │ 835 { │ │ │ │ -836 using _Merge_helper = _Hash_merge_helper; │ │ │ │ -837 _M_h._M_merge_unique(_Merge_helper::_S_get_table(__source)); │ │ │ │ +836 ___N_o_d_e* _____f_r_o_n_t = static_cast<___N_o_d_e*>(this->_M_impl._M_head._M_next); │ │ │ │ +837 return *_____f_r_o_n_t->_M_valptr(); │ │ │ │ 838 } │ │ │ │ 839 │ │ │ │ -840 template │ │ │ │ -841 void │ │ │ │ -842 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ -843 { merge(__source); } │ │ │ │ -844#endif // C++17 │ │ │ │ -845 │ │ │ │ -846 // observers. │ │ │ │ -847 │ │ │ │ -848 /// Returns the hash functor object with which the %unordered_map was │ │ │ │ -849 /// constructed. │ │ │ │ -850 _h_a_s_h_e_r │ │ │ │ -_8_5_1 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ -852 { return _M_h.hash_function(); } │ │ │ │ -853 │ │ │ │ -854 /// Returns the key comparison object with which the %unordered_map was │ │ │ │ -855 /// constructed. │ │ │ │ -856 _k_e_y___e_q_u_a_l │ │ │ │ -_8_5_7 _k_e_y___e_q() const │ │ │ │ -858 { return _M_h.key_eq(); } │ │ │ │ -859 │ │ │ │ -860 // lookup. │ │ │ │ -861 │ │ │ │ -862 ///@{ │ │ │ │ -863 /** │ │ │ │ -864 * @brief Tries to locate an element in an %unordered_map. │ │ │ │ -865 * @param __x Key to be located. │ │ │ │ -866 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ -867 * found. │ │ │ │ -868 * │ │ │ │ -869 * This function takes a key and tries to locate the element with which │ │ │ │ -870 * the key matches. If successful the function returns an iterator │ │ │ │ -871 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ -872 * past-the-end ( @c end() ) iterator. │ │ │ │ -873 */ │ │ │ │ -874 _i_t_e_r_a_t_o_r │ │ │ │ -_8_7_5 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -876 { return _M_h.find(__x); } │ │ │ │ -877 │ │ │ │ -878#if __cplusplus > 201703L │ │ │ │ -879 template │ │ │ │ -880 auto │ │ │ │ -_8_8_1 _f_i_n_d(const ___K_t& __x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -882 { return _M_h._M_find_tr(__x); } │ │ │ │ -883#endif │ │ │ │ -884 │ │ │ │ -885 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_8_8_6 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -887 { return _M_h.find(__x); } │ │ │ │ +840 // 23.3.4.5 modifiers: │ │ │ │ +841 │ │ │ │ +842 /** │ │ │ │ +843 * @brief Constructs object in %forward_list at the front of the │ │ │ │ +844 * list. │ │ │ │ +845 * @param __args Arguments. │ │ │ │ +846 * │ │ │ │ +847 * This function will insert an object of type Tp constructed │ │ │ │ +848 * with Tp(std::forward(args)...) at the front of the list │ │ │ │ +849 * Due to the nature of a %forward_list this operation can │ │ │ │ +850 * be done in constant time, and does not invalidate iterators │ │ │ │ +851 * and references. │ │ │ │ +852 */ │ │ │ │ +853 template │ │ │ │ +854#if __cplusplus > 201402L │ │ │ │ +855 reference │ │ │ │ +856#else │ │ │ │ +857 void │ │ │ │ +858#endif │ │ │ │ +_8_5_9 _e_m_p_l_a_c_e___f_r_o_n_t(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +860 { │ │ │ │ +861 this->_M_insert_after(_c_b_e_f_o_r_e___b_e_g_i_n(), │ │ │ │ +862 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ +863#if __cplusplus > 201402L │ │ │ │ +864 return _f_r_o_n_t(); │ │ │ │ +865#endif │ │ │ │ +866 } │ │ │ │ +867 │ │ │ │ +868 /** │ │ │ │ +869 * @brief Add data to the front of the %forward_list. │ │ │ │ +870 * @param __val Data to be added. │ │ │ │ +871 * │ │ │ │ +872 * This is a typical stack operation. The function creates an │ │ │ │ +873 * element at the front of the %forward_list and assigns the given │ │ │ │ +874 * data to it. Due to the nature of a %forward_list this operation │ │ │ │ +875 * can be done in constant time, and does not invalidate iterators │ │ │ │ +876 * and references. │ │ │ │ +877 */ │ │ │ │ +878 void │ │ │ │ +_8_7_9 _p_u_s_h___f_r_o_n_t(const _Tp& __val) │ │ │ │ +880 { this->_M_insert_after(_c_b_e_f_o_r_e___b_e_g_i_n(), __val); } │ │ │ │ +881 │ │ │ │ +882 /** │ │ │ │ +883 * │ │ │ │ +884 */ │ │ │ │ +885 void │ │ │ │ +886 _p_u_s_h___f_r_o_n_t(_Tp&& __val) │ │ │ │ +887 { this->_M_insert_after(_c_b_e_f_o_r_e___b_e_g_i_n(), _s_t_d_:_:_m_o_v_e(__val)); } │ │ │ │ 888 │ │ │ │ -889#if __cplusplus > 201703L │ │ │ │ -890 template │ │ │ │ -891 auto │ │ │ │ -_8_9_2 _f_i_n_d(const ___K_t& __x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -893 { return _M_h._M_find_tr(__x); } │ │ │ │ -894#endif │ │ │ │ -895 ///@} │ │ │ │ -896 │ │ │ │ -897 ///@{ │ │ │ │ -898 /** │ │ │ │ -899 * @brief Finds the number of elements. │ │ │ │ -900 * @param __x Key to count. │ │ │ │ -901 * @return Number of elements with specified key. │ │ │ │ -902 * │ │ │ │ -903 * This function only makes sense for %unordered_multimap; for │ │ │ │ -904 * %unordered_map the result will either be 0 (not present) or 1 │ │ │ │ -905 * (present). │ │ │ │ -906 */ │ │ │ │ -907 _s_i_z_e___t_y_p_e │ │ │ │ -_9_0_8 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -909 { return _M_h.count(__x); } │ │ │ │ -910 │ │ │ │ -911#if __cplusplus > 201703L │ │ │ │ -912 template │ │ │ │ -913 auto │ │ │ │ -_9_1_4 _c_o_u_n_t(const ___K_t& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -915 { return _M_h._M_count_tr(__x); } │ │ │ │ -916#endif │ │ │ │ -917 ///@} │ │ │ │ -918 │ │ │ │ -919#if __cplusplus > 201703L │ │ │ │ -920 ///@{ │ │ │ │ -921 /** │ │ │ │ -922 * @brief Finds whether an element with the given key exists. │ │ │ │ -923 * @param __x Key of elements to be located. │ │ │ │ -924 * @return True if there is any element with the specified key. │ │ │ │ -925 */ │ │ │ │ -926 bool │ │ │ │ -_9_2_7 _c_o_n_t_a_i_n_s(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -928 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ -929 │ │ │ │ -930 template │ │ │ │ -931 auto │ │ │ │ -_9_3_2 _c_o_n_t_a_i_n_s(const ___K_t& __x) const │ │ │ │ -933 -> decltype(_M_h._M_find_tr(__x), _v_o_i_d(), true) │ │ │ │ -934 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ -935 ///@} │ │ │ │ -936#endif │ │ │ │ -937 │ │ │ │ -938 ///@{ │ │ │ │ -939 /** │ │ │ │ -940 * @brief Finds a subsequence matching given key. │ │ │ │ -941 * @param __x Key to be located. │ │ │ │ -942 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ -943 * matching given key. │ │ │ │ -944 * │ │ │ │ -945 * This function probably only makes sense for %unordered_multimap. │ │ │ │ -946 */ │ │ │ │ -947 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_> │ │ │ │ -_9_4_8 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -949 { return _M_h.equal_range(__x); } │ │ │ │ -950 │ │ │ │ -951#if __cplusplus > 201703L │ │ │ │ -952 template │ │ │ │ -953 auto │ │ │ │ -_9_5_4 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) │ │ │ │ -955 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -956 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -957#endif │ │ │ │ -958 │ │ │ │ -959 _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_6_0 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -961 { return _M_h.equal_range(__x); } │ │ │ │ -962 │ │ │ │ -963#if __cplusplus > 201703L │ │ │ │ -964 template │ │ │ │ -965 auto │ │ │ │ -_9_6_6 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) const │ │ │ │ -967 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -968 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -969#endif │ │ │ │ -970 ///@} │ │ │ │ -971 │ │ │ │ -972 ///@{ │ │ │ │ -973 /** │ │ │ │ -974 * @brief Subscript ( @c [] ) access to %unordered_map data. │ │ │ │ -975 * @param __k The key for which data should be retrieved. │ │ │ │ -976 * @return A reference to the data of the (key,data) %pair. │ │ │ │ -977 * │ │ │ │ -978 * Allows for easy lookup with the subscript ( @c [] )operator. Returns │ │ │ │ -979 * data associated with the key specified in subscript. If the key does │ │ │ │ -980 * not exist, a pair with that key is created using default values, which │ │ │ │ -981 * is then returned. │ │ │ │ -982 * │ │ │ │ -983 * Lookup requires constant time. │ │ │ │ -984 */ │ │ │ │ -985 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ -_9_8_6 _o_p_e_r_a_t_o_r_[_](const _k_e_y___t_y_p_e& _____k) │ │ │ │ -987 { return _M_h[_____k]; } │ │ │ │ -988 │ │ │ │ -989 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ -_9_9_0 _o_p_e_r_a_t_o_r_[_](_k_e_y___t_y_p_e&& _____k) │ │ │ │ -991 { return _M_h[_s_t_d_:_:_m_o_v_e(_____k)]; } │ │ │ │ -992 ///@} │ │ │ │ -993 │ │ │ │ -994 ///@{ │ │ │ │ -995 /** │ │ │ │ -996 * @brief Access to %unordered_map data. │ │ │ │ -997 * @param __k The key for which data should be retrieved. │ │ │ │ -998 * @return A reference to the data whose key is equal to @a __k, if │ │ │ │ -999 * such a data is present in the %unordered_map. │ │ │ │ -1000 * @throw std::out_of_range If no such data is present. │ │ │ │ -1001 */ │ │ │ │ -1002 _m_a_p_p_e_d___t_y_p_e& │ │ │ │ -_1_0_0_3 _a_t(const _k_e_y___t_y_p_e& _____k) │ │ │ │ -1004 { return _M_h.at(_____k); } │ │ │ │ -1005 │ │ │ │ -1006 const _m_a_p_p_e_d___t_y_p_e& │ │ │ │ -_1_0_0_7 _a_t(const _k_e_y___t_y_p_e& _____k) const │ │ │ │ -1008 { return _M_h.at(_____k); } │ │ │ │ -1009 ///@} │ │ │ │ -1010 │ │ │ │ -1011 // bucket interface. │ │ │ │ -1012 │ │ │ │ -1013 /// Returns the number of buckets of the %unordered_map. │ │ │ │ -1014 _s_i_z_e___t_y_p_e │ │ │ │ -_1_0_1_5 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1016 { return _M_h.bucket_count(); } │ │ │ │ -1017 │ │ │ │ -1018 /// Returns the maximum number of buckets of the %unordered_map. │ │ │ │ -1019 _s_i_z_e___t_y_p_e │ │ │ │ -_1_0_2_0 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1021 { return _M_h.max_bucket_count(); } │ │ │ │ -1022 │ │ │ │ -1023 /* │ │ │ │ -1024 * @brief Returns the number of elements in a given bucket. │ │ │ │ -1025 * @param __n A bucket index. │ │ │ │ -1026 * @return The number of elements in the bucket. │ │ │ │ -1027 */ │ │ │ │ -1028 _s_i_z_e___t_y_p_e │ │ │ │ -1029 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1030 { return _M_h.bucket_size(__n); } │ │ │ │ -1031 │ │ │ │ -1032 /* │ │ │ │ -1033 * @brief Returns the bucket index of a given element. │ │ │ │ -1034 * @param __key A key instance. │ │ │ │ -1035 * @return The key bucket index. │ │ │ │ -1036 */ │ │ │ │ -1037 _s_i_z_e___t_y_p_e │ │ │ │ -1038 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ -1039 { return _M_h.bucket(__key); } │ │ │ │ -1040 │ │ │ │ -1041 /** │ │ │ │ -1042 * @brief Returns a read/write iterator pointing to the first bucket │ │ │ │ -1043 * element. │ │ │ │ -1044 * @param __n The bucket index. │ │ │ │ -1045 * @return A read/write local iterator. │ │ │ │ -1046 */ │ │ │ │ -1047 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_4_8 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1049 { return _M_h.begin(__n); } │ │ │ │ -1050 │ │ │ │ -1051 ///@{ │ │ │ │ +889 /** │ │ │ │ +890 * @brief Removes first element. │ │ │ │ +891 * │ │ │ │ +892 * This is a typical stack operation. It shrinks the %forward_list │ │ │ │ +893 * by one. Due to the nature of a %forward_list this operation can │ │ │ │ +894 * be done in constant time, and only invalidates iterators/references │ │ │ │ +895 * to the element being removed. │ │ │ │ +896 * │ │ │ │ +897 * Note that no data is returned, and if the first element's data │ │ │ │ +898 * is needed, it should be retrieved before pop_front() is │ │ │ │ +899 * called. │ │ │ │ +900 */ │ │ │ │ +901 void │ │ │ │ +_9_0_2 _p_o_p___f_r_o_n_t() │ │ │ │ +903 { this->_M_erase_after(&this->_M_impl._M_head); } │ │ │ │ +904 │ │ │ │ +905 /** │ │ │ │ +906 * @brief Constructs object in %forward_list after the specified │ │ │ │ +907 * iterator. │ │ │ │ +908 * @param __pos A const_iterator into the %forward_list. │ │ │ │ +909 * @param __args Arguments. │ │ │ │ +910 * @return An iterator that points to the inserted data. │ │ │ │ +911 * │ │ │ │ +912 * This function will insert an object of type T constructed │ │ │ │ +913 * with T(std::forward(args)...) after the specified │ │ │ │ +914 * location. Due to the nature of a %forward_list this operation can │ │ │ │ +915 * be done in constant time, and does not invalidate iterators │ │ │ │ +916 * and references. │ │ │ │ +917 */ │ │ │ │ +918 template │ │ │ │ +919 _i_t_e_r_a_t_o_r │ │ │ │ +_9_2_0 _e_m_p_l_a_c_e___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +921 { return _i_t_e_r_a_t_o_r(this->_M_insert_after(_____p_o_s, │ │ │ │ +922 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...)); } │ │ │ │ +923 │ │ │ │ +924 /** │ │ │ │ +925 * @brief Inserts given value into %forward_list after specified │ │ │ │ +926 * iterator. │ │ │ │ +927 * @param __pos An iterator into the %forward_list. │ │ │ │ +928 * @param __val Data to be inserted. │ │ │ │ +929 * @return An iterator that points to the inserted data. │ │ │ │ +930 * │ │ │ │ +931 * This function will insert a copy of the given value after │ │ │ │ +932 * the specified location. Due to the nature of a %forward_list this │ │ │ │ +933 * operation can be done in constant time, and does not │ │ │ │ +934 * invalidate iterators and references. │ │ │ │ +935 */ │ │ │ │ +936 _i_t_e_r_a_t_o_r │ │ │ │ +_9_3_7 _i_n_s_e_r_t___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, const _Tp& __val) │ │ │ │ +938 { return _i_t_e_r_a_t_o_r(this->_M_insert_after(_____p_o_s, __val)); } │ │ │ │ +939 │ │ │ │ +940 /** │ │ │ │ +941 * │ │ │ │ +942 */ │ │ │ │ +943 _i_t_e_r_a_t_o_r │ │ │ │ +944 _i_n_s_e_r_t___a_f_t_e_r(const_iterator _____p_o_s, _Tp&& __val) │ │ │ │ +945 { return _i_t_e_r_a_t_o_r(this->_M_insert_after(_____p_o_s, _s_t_d_:_:_m_o_v_e(__val))); } │ │ │ │ +946 │ │ │ │ +947 /** │ │ │ │ +948 * @brief Inserts a number of copies of given data into the │ │ │ │ +949 * %forward_list. │ │ │ │ +950 * @param __pos An iterator into the %forward_list. │ │ │ │ +951 * @param __n Number of elements to be inserted. │ │ │ │ +952 * @param __val Data to be inserted. │ │ │ │ +953 * @return An iterator pointing to the last inserted copy of │ │ │ │ +954 * @a val or @a pos if @a n == 0. │ │ │ │ +955 * │ │ │ │ +956 * This function will insert a specified number of copies of the │ │ │ │ +957 * given data after the location specified by @a pos. │ │ │ │ +958 * │ │ │ │ +959 * This operation is linear in the number of elements inserted and │ │ │ │ +960 * does not invalidate iterators and references. │ │ │ │ +961 */ │ │ │ │ +962 iterator │ │ │ │ +963 _i_n_s_e_r_t___a_f_t_e_r(const_iterator __pos, size_type __n, const _Tp& __val); │ │ │ │ +964 │ │ │ │ +965 /** │ │ │ │ +966 * @brief Inserts a range into the %forward_list. │ │ │ │ +967 * @param __pos An iterator into the %forward_list. │ │ │ │ +968 * @param __first An input iterator. │ │ │ │ +969 * @param __last An input iterator. │ │ │ │ +970 * @return An iterator pointing to the last inserted element or │ │ │ │ +971 * @a __pos if @a __first == @a __last. │ │ │ │ +972 * │ │ │ │ +973 * This function will insert copies of the data in the range │ │ │ │ +974 * [@a __first,@a __last) into the %forward_list after the │ │ │ │ +975 * location specified by @a __pos. │ │ │ │ +976 * │ │ │ │ +977 * This operation is linear in the number of elements inserted and │ │ │ │ +978 * does not invalidate iterators and references. │ │ │ │ +979 */ │ │ │ │ +980 template> │ │ │ │ +982 iterator │ │ │ │ +983 _i_n_s_e_r_t___a_f_t_e_r(const_iterator __pos, │ │ │ │ +984 _InputIterator __first, _InputIterator __last); │ │ │ │ +985 │ │ │ │ +986 /** │ │ │ │ +987 * @brief Inserts the contents of an initializer_list into │ │ │ │ +988 * %forward_list after the specified iterator. │ │ │ │ +989 * @param __pos An iterator into the %forward_list. │ │ │ │ +990 * @param __il An initializer_list of value_type. │ │ │ │ +991 * @return An iterator pointing to the last inserted element │ │ │ │ +992 * or @a __pos if @a __il is empty. │ │ │ │ +993 * │ │ │ │ +994 * This function will insert copies of the data in the │ │ │ │ +995 * initializer_list @a __il into the %forward_list before the location │ │ │ │ +996 * specified by @a __pos. │ │ │ │ +997 * │ │ │ │ +998 * This operation is linear in the number of elements inserted and │ │ │ │ +999 * does not invalidate iterators and references. │ │ │ │ +1000 */ │ │ │ │ +1001 iterator │ │ │ │ +_1_0_0_2 _i_n_s_e_r_t___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, _s_t_d_:_:_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t_<___T_p_> _____i_l) │ │ │ │ +1003 { return _i_n_s_e_r_t___a_f_t_e_r(_____p_o_s, _____i_l.begin(), _____i_l.end()); } │ │ │ │ +1004 │ │ │ │ +1005 /** │ │ │ │ +1006 * @brief Removes the element pointed to by the iterator following │ │ │ │ +1007 * @c pos. │ │ │ │ +1008 * @param __pos Iterator pointing before element to be erased. │ │ │ │ +1009 * @return An iterator pointing to the element following the one │ │ │ │ +1010 * that was erased, or end() if no such element exists. │ │ │ │ +1011 * │ │ │ │ +1012 * This function will erase the element at the given position and │ │ │ │ +1013 * thus shorten the %forward_list by one. │ │ │ │ +1014 * │ │ │ │ +1015 * Due to the nature of a %forward_list this operation can be done │ │ │ │ +1016 * in constant time, and only invalidates iterators/references to │ │ │ │ +1017 * the element being removed. The user is also cautioned that │ │ │ │ +1018 * this function only erases the element, and that if the element │ │ │ │ +1019 * is itself a pointer, the pointed-to memory is not touched in │ │ │ │ +1020 * any way. Managing the pointer is the user's responsibility. │ │ │ │ +1021 */ │ │ │ │ +1022 _i_t_e_r_a_t_o_r │ │ │ │ +_1_0_2_3 _e_r_a_s_e___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ +1024 { return _i_t_e_r_a_t_o_r(this->_M_erase_after(const_cast<___N_o_d_e___b_a_s_e*> │ │ │ │ +1025 (_____p_o_s._M_node))); } │ │ │ │ +1026 │ │ │ │ +1027 /** │ │ │ │ +1028 * @brief Remove a range of elements. │ │ │ │ +1029 * @param __pos Iterator pointing before the first element to be │ │ │ │ +1030 * erased. │ │ │ │ +1031 * @param __last Iterator pointing to one past the last element to be │ │ │ │ +1032 * erased. │ │ │ │ +1033 * @return @ __last. │ │ │ │ +1034 * │ │ │ │ +1035 * This function will erase the elements in the range │ │ │ │ +1036 * @a (__pos,__last) and shorten the %forward_list accordingly. │ │ │ │ +1037 * │ │ │ │ +1038 * This operation is linear time in the size of the range and only │ │ │ │ +1039 * invalidates iterators/references to the element being removed. │ │ │ │ +1040 * The user is also cautioned that this function only erases the │ │ │ │ +1041 * elements, and that if the elements themselves are pointers, the │ │ │ │ +1042 * pointed-to memory is not touched in any way. Managing the pointer │ │ │ │ +1043 * is the user's responsibility. │ │ │ │ +1044 */ │ │ │ │ +1045 _i_t_e_r_a_t_o_r │ │ │ │ +_1_0_4_6 _e_r_a_s_e___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, _c_o_n_s_t___i_t_e_r_a_t_o_r __last) │ │ │ │ +1047 { return _i_t_e_r_a_t_o_r(this->_M_erase_after(const_cast<___N_o_d_e___b_a_s_e*> │ │ │ │ +1048 (_____p_o_s._M_node), │ │ │ │ +1049 const_cast<___N_o_d_e___b_a_s_e*> │ │ │ │ +1050 (__last._M_node))); } │ │ │ │ +1051 │ │ │ │ 1052 /** │ │ │ │ -1053 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ -1054 * bucket element. │ │ │ │ -1055 * @param __n The bucket index. │ │ │ │ -1056 * @return A read-only local iterator. │ │ │ │ -1057 */ │ │ │ │ -1058 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_5_9 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1060 { return _M_h.begin(__n); } │ │ │ │ -1061 │ │ │ │ -1062 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_6_3 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1064 { return _M_h.cbegin(__n); } │ │ │ │ -1065 ///@} │ │ │ │ -1066 │ │ │ │ -1067 /** │ │ │ │ -1068 * @brief Returns a read/write iterator pointing to one past the last │ │ │ │ -1069 * bucket elements. │ │ │ │ -1070 * @param __n The bucket index. │ │ │ │ -1071 * @return A read/write local iterator. │ │ │ │ -1072 */ │ │ │ │ -1073 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_7_4 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1075 { return _M_h.end(__n); } │ │ │ │ -1076 │ │ │ │ -1077 ///@{ │ │ │ │ -1078 /** │ │ │ │ -1079 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ -1080 * the last bucket elements. │ │ │ │ -1081 * @param __n The bucket index. │ │ │ │ -1082 * @return A read-only local iterator. │ │ │ │ +1053 * @brief Swaps data with another %forward_list. │ │ │ │ +1054 * @param __list A %forward_list of the same element and allocator │ │ │ │ +1055 * types. │ │ │ │ +1056 * │ │ │ │ +1057 * This exchanges the elements between two lists in constant │ │ │ │ +1058 * time. Note that the global std::swap() function is │ │ │ │ +1059 * specialized such that std::swap(l1,l2) will feed to this │ │ │ │ +1060 * function. │ │ │ │ +1061 * │ │ │ │ +1062 * Whether the allocators are swapped depends on the allocator traits. │ │ │ │ +1063 */ │ │ │ │ +1064 void │ │ │ │ +_1_0_6_5 _s_w_a_p(_f_o_r_w_a_r_d___l_i_s_t& _____l_i_s_t) noexcept │ │ │ │ +1066 { │ │ │ │ +1067 _s_t_d_:_:_s_w_a_p(this->_M_impl._M_head._M_next, │ │ │ │ +1068 _____l_i_s_t._M_impl._M_head._M_next); │ │ │ │ +1069 _Node_alloc_traits::_S_on_swap(this->_M_get_Node_allocator(), │ │ │ │ +1070 _____l_i_s_t._M_get_Node_allocator()); │ │ │ │ +1071 } │ │ │ │ +1072 │ │ │ │ +1073 /** │ │ │ │ +1074 * @brief Resizes the %forward_list to the specified number of │ │ │ │ +1075 * elements. │ │ │ │ +1076 * @param __sz Number of elements the %forward_list should contain. │ │ │ │ +1077 * │ │ │ │ +1078 * This function will %resize the %forward_list to the specified │ │ │ │ +1079 * number of elements. If the number is smaller than the │ │ │ │ +1080 * %forward_list's current number of elements the %forward_list │ │ │ │ +1081 * is truncated, otherwise the %forward_list is extended and the │ │ │ │ +1082 * new elements are default constructed. │ │ │ │ 1083 */ │ │ │ │ -1084 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_8_5 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1086 { return _M_h.end(__n); } │ │ │ │ -1087 │ │ │ │ -1088 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_0_8_9 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1090 { return _M_h.cend(__n); } │ │ │ │ -1091 ///@} │ │ │ │ -1092 │ │ │ │ -1093 // hash policy. │ │ │ │ -1094 │ │ │ │ -1095 /// Returns the average number of elements per bucket. │ │ │ │ -1096 float │ │ │ │ -_1_0_9_7 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1098 { return _M_h.load_factor(); } │ │ │ │ -1099 │ │ │ │ -1100 /// Returns a positive number that the %unordered_map tries to keep the │ │ │ │ -1101 /// load factor less than or equal to. │ │ │ │ -1102 float │ │ │ │ -_1_1_0_3 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1104 { return _M_h.max_load_factor(); } │ │ │ │ -1105 │ │ │ │ -1106 /** │ │ │ │ -1107 * @brief Change the %unordered_map maximum load factor. │ │ │ │ -1108 * @param __z The new maximum load factor. │ │ │ │ +1084 void │ │ │ │ +1085 _r_e_s_i_z_e(size_type _____s_z); │ │ │ │ +1086 │ │ │ │ +1087 /** │ │ │ │ +1088 * @brief Resizes the %forward_list to the specified number of │ │ │ │ +1089 * elements. │ │ │ │ +1090 * @param __sz Number of elements the %forward_list should contain. │ │ │ │ +1091 * @param __val Data with which new elements should be populated. │ │ │ │ +1092 * │ │ │ │ +1093 * This function will %resize the %forward_list to the specified │ │ │ │ +1094 * number of elements. If the number is smaller than the │ │ │ │ +1095 * %forward_list's current number of elements the %forward_list │ │ │ │ +1096 * is truncated, otherwise the %forward_list is extended and new │ │ │ │ +1097 * elements are populated with given data. │ │ │ │ +1098 */ │ │ │ │ +1099 void │ │ │ │ +1100 _r_e_s_i_z_e(size_type _____s_z, const value_type& __val); │ │ │ │ +1101 │ │ │ │ +1102 /** │ │ │ │ +1103 * @brief Erases all the elements. │ │ │ │ +1104 * │ │ │ │ +1105 * Note that this function only erases │ │ │ │ +1106 * the elements, and that if the elements themselves are │ │ │ │ +1107 * pointers, the pointed-to memory is not touched in any way. │ │ │ │ +1108 * Managing the pointer is the user's responsibility. │ │ │ │ 1109 */ │ │ │ │ 1110 void │ │ │ │ -_1_1_1_1 _m_a_x___l_o_a_d___f_a_c_t_o_r(float _____z) │ │ │ │ -1112 { _M_h.max_load_factor(_____z); } │ │ │ │ +_1_1_1_1 _c_l_e_a_r() noexcept │ │ │ │ +1112 { this->_M_erase_after(&this->_M_impl._M_head, nullptr); } │ │ │ │ 1113 │ │ │ │ -1114 /** │ │ │ │ -1115 * @brief May rehash the %unordered_map. │ │ │ │ -1116 * @param __n The new number of buckets. │ │ │ │ -1117 * │ │ │ │ -1118 * Rehash will occur only if the new number of buckets respect the │ │ │ │ -1119 * %unordered_map maximum load factor. │ │ │ │ -1120 */ │ │ │ │ -1121 void │ │ │ │ -_1_1_2_2 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1123 { _M_h.rehash(__n); } │ │ │ │ -1124 │ │ │ │ -1125 /** │ │ │ │ -1126 * @brief Prepare the %unordered_map for a specified number of │ │ │ │ -1127 * elements. │ │ │ │ -1128 * @param __n Number of elements required. │ │ │ │ -1129 * │ │ │ │ -1130 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ -1131 */ │ │ │ │ -1132 void │ │ │ │ -_1_1_3_3 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1134 { _M_h.reserve(__n); } │ │ │ │ -1135 │ │ │ │ -1136 template │ │ │ │ -1138 friend bool │ │ │ │ -1139 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_>&, │ │ │ │ -1140 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_>&); │ │ │ │ -1141 }; │ │ │ │ -1142 │ │ │ │ -1143#if __cpp_deduction_guides >= 201606 │ │ │ │ -1144 │ │ │ │ -1145 template>, │ │ │ │ -1147 typename _Pred = equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ -1148 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, │ │ │ │ -1149 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -1150 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1151 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -1152 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1153 unordered_map(_InputIterator, _InputIterator, │ │ │ │ -1154 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 = {}, │ │ │ │ -1155 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ -1156 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ -1157 __iter_val_t<_InputIterator>, │ │ │ │ -1158 _Hash, _Pred, _Allocator>; │ │ │ │ -1159 │ │ │ │ -1160 template, │ │ │ │ -1161 typename _Pred = equal_to<_Key>, │ │ │ │ -1162 typename _Allocator = allocator>, │ │ │ │ -1163 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1164 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -1165 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1166 unordered_map(initializer_list>, │ │ │ │ -1167 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 = {}, │ │ │ │ -1168 _Hash = _Hash(), _Pred = _Pred(), _Allocator = _Allocator()) │ │ │ │ -1169 -> unordered_map<_Key, _Tp, _Hash, _Pred, _Allocator>; │ │ │ │ -1170 │ │ │ │ -1171 template, │ │ │ │ -1173 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1174 unordered_map(_InputIterator, _InputIterator, │ │ │ │ -1175 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) │ │ │ │ -1176 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ -1177 __iter_val_t<_InputIterator>, │ │ │ │ -1178 hash<__iter_key_t<_InputIterator>>, │ │ │ │ -1179 equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ -1180 _Allocator>; │ │ │ │ +1114 // 23.3.4.6 forward_list operations: │ │ │ │ +1115 │ │ │ │ +1116 /** │ │ │ │ +1117 * @brief Insert contents of another %forward_list. │ │ │ │ +1118 * @param __pos Iterator referencing the element to insert after. │ │ │ │ +1119 * @param __list Source list. │ │ │ │ +1120 * │ │ │ │ +1121 * The elements of @a list are inserted in constant time after │ │ │ │ +1122 * the element referenced by @a pos. @a list becomes an empty │ │ │ │ +1123 * list. │ │ │ │ +1124 * │ │ │ │ +1125 * Requires this != @a x. │ │ │ │ +1126 */ │ │ │ │ +1127 void │ │ │ │ +_1_1_2_8 _s_p_l_i_c_e___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, _f_o_r_w_a_r_d___l_i_s_t&& _____l_i_s_t) noexcept │ │ │ │ +1129 { │ │ │ │ +1130 if (!_____l_i_s_t.empty()) │ │ │ │ +1131 _M_splice_after(_____p_o_s, _____l_i_s_t.before_begin(), _____l_i_s_t.end()); │ │ │ │ +1132 } │ │ │ │ +1133 │ │ │ │ +1134 void │ │ │ │ +1135 _s_p_l_i_c_e___a_f_t_e_r(const_iterator _____p_o_s, _f_o_r_w_a_r_d___l_i_s_t& _____l_i_s_t) noexcept │ │ │ │ +1136 { _s_p_l_i_c_e___a_f_t_e_r(_____p_o_s, _s_t_d_:_:_m_o_v_e(_____l_i_s_t)); } │ │ │ │ +1137 │ │ │ │ +1138 /** │ │ │ │ +1139 * @brief Insert element from another %forward_list. │ │ │ │ +1140 * @param __pos Iterator referencing the element to insert after. │ │ │ │ +1141 * @param __list Source list. │ │ │ │ +1142 * @param __i Iterator referencing the element before the element │ │ │ │ +1143 * to move. │ │ │ │ +1144 * │ │ │ │ +1145 * Removes the element in list @a list referenced by @a i and │ │ │ │ +1146 * inserts it into the current list after @a pos. │ │ │ │ +1147 */ │ │ │ │ +1148 void │ │ │ │ +1149 _s_p_l_i_c_e___a_f_t_e_r(const_iterator __pos, _f_o_r_w_a_r_d___l_i_s_t&& __list, │ │ │ │ +1150 const_iterator __i) noexcept; │ │ │ │ +1151 │ │ │ │ +1152 void │ │ │ │ +1153 _s_p_l_i_c_e___a_f_t_e_r(const_iterator __pos, _f_o_r_w_a_r_d___l_i_s_t& __list, │ │ │ │ +1154 const_iterator __i) noexcept │ │ │ │ +1155 { _s_p_l_i_c_e___a_f_t_e_r(__pos, _s_t_d_:_:_m_o_v_e(__list), __i); } │ │ │ │ +1156 │ │ │ │ +1157 /** │ │ │ │ +1158 * @brief Insert range from another %forward_list. │ │ │ │ +1159 * @param __pos Iterator referencing the element to insert after. │ │ │ │ +1160 * @param __list Source list. │ │ │ │ +1161 * @param __before Iterator referencing before the start of range │ │ │ │ +1162 * in list. │ │ │ │ +1163 * @param __last Iterator referencing the end of range in list. │ │ │ │ +1164 * │ │ │ │ +1165 * Removes elements in the range (__before,__last) and inserts them │ │ │ │ +1166 * after @a __pos in constant time. │ │ │ │ +1167 * │ │ │ │ +1168 * Undefined if @a __pos is in (__before,__last). │ │ │ │ +1169 * @{ │ │ │ │ +1170 */ │ │ │ │ +1171 void │ │ │ │ +_1_1_7_2 _s_p_l_i_c_e___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, _f_o_r_w_a_r_d___l_i_s_t&&, │ │ │ │ +1173 _c_o_n_s_t___i_t_e_r_a_t_o_r _____b_e_f_o_r_e, _c_o_n_s_t___i_t_e_r_a_t_o_r __last) noexcept │ │ │ │ +1174 { _M_splice_after(_____p_o_s, _____b_e_f_o_r_e, __last); } │ │ │ │ +1175 │ │ │ │ +1176 void │ │ │ │ +_1_1_7_7 _s_p_l_i_c_e___a_f_t_e_r(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, _f_o_r_w_a_r_d___l_i_s_t&, │ │ │ │ +1178 _c_o_n_s_t___i_t_e_r_a_t_o_r _____b_e_f_o_r_e, _c_o_n_s_t___i_t_e_r_a_t_o_r __last) noexcept │ │ │ │ +1179 { _M_splice_after(_____p_o_s, _____b_e_f_o_r_e, __last); } │ │ │ │ +1180 /// @} │ │ │ │ 1181 │ │ │ │ -1182 template, │ │ │ │ -1184 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1185 unordered_map(_InputIterator, _InputIterator, _Allocator) │ │ │ │ -1186 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ -1187 __iter_val_t<_InputIterator>, │ │ │ │ -1188 hash<__iter_key_t<_InputIterator>>, │ │ │ │ -1189 equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ -1190 _Allocator>; │ │ │ │ -1191 │ │ │ │ -1192 template, │ │ │ │ -1194 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -1195 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1196 unordered_map(_InputIterator, _InputIterator, │ │ │ │ -1197 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, │ │ │ │ -1198 _Hash, _Allocator) │ │ │ │ -1199 -> unordered_map<__iter_key_t<_InputIterator>, │ │ │ │ -1200 __iter_val_t<_InputIterator>, _Hash, │ │ │ │ -1201 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ -1202 │ │ │ │ -1203 template> │ │ │ │ -1205 unordered_map(initializer_list>, │ │ │ │ -1206 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, │ │ │ │ -1207 _Allocator) │ │ │ │ -1208 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ -1209 │ │ │ │ -1210 template> │ │ │ │ -1212 unordered_map(initializer_list>, _Allocator) │ │ │ │ -1213 -> unordered_map<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ -1214 │ │ │ │ -1215 template, │ │ │ │ -1217 typename = _RequireAllocator<_Allocator>> │ │ │ │ -1218 unordered_map(initializer_list>, │ │ │ │ -1219 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, │ │ │ │ -1220 _Hash, _Allocator) │ │ │ │ -1221 -> unordered_map<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>; │ │ │ │ -1222 │ │ │ │ -1223#endif │ │ │ │ -1224 │ │ │ │ -1225 /** │ │ │ │ -1226 * @brief A standard container composed of equivalent keys │ │ │ │ -1227 * (possibly containing multiple of each key value) that associates │ │ │ │ -1228 * values of another type with the keys. │ │ │ │ -1229 * │ │ │ │ -1230 * @ingroup unordered_associative_containers │ │ │ │ -1231 * @headerfile unordered_map │ │ │ │ -1232 * @since C++11 │ │ │ │ -1233 * │ │ │ │ -1234 * @tparam _Key Type of key objects. │ │ │ │ -1235 * @tparam _Tp Type of mapped objects. │ │ │ │ -1236 * @tparam _Hash Hashing function object type, defaults to hash<_Value>. │ │ │ │ -1237 * @tparam _Pred Predicate function object type, defaults │ │ │ │ -1238 * to equal_to<_Value>. │ │ │ │ -1239 * @tparam _Alloc Allocator type, defaults to │ │ │ │ -1240 * std::allocator>. │ │ │ │ -1241 * │ │ │ │ -1242 * Meets the requirements of a container, and │ │ │ │ -1243 * unordered associative container │ │ │ │ +1182 private: │ │ │ │ +1183#if __cplusplus > 201703L │ │ │ │ +1184# define __cpp_lib_list_remove_return_type 201806L │ │ │ │ +1185 using __remove_return_type = size_type; │ │ │ │ +1186# define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG \ │ │ │ │ +1187 __attribute__((__abi_tag__("__cxx20"))) │ │ │ │ +1188#else │ │ │ │ +1189 using __remove_return_type = _v_o_i_d; │ │ │ │ +1190# define _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +1191#endif │ │ │ │ +1192 public: │ │ │ │ +1193 │ │ │ │ +1194 /** │ │ │ │ +1195 * @brief Remove all elements equal to value. │ │ │ │ +1196 * @param __val The value to remove. │ │ │ │ +1197 * │ │ │ │ +1198 * Removes every element in the list equal to @a __val. │ │ │ │ +1199 * Remaining elements stay in list order. Note that this │ │ │ │ +1200 * function only erases the elements, and that if the elements │ │ │ │ +1201 * themselves are pointers, the pointed-to memory is not │ │ │ │ +1202 * touched in any way. Managing the pointer is the user's │ │ │ │ +1203 * responsibility. │ │ │ │ +1204 */ │ │ │ │ +1205 _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +1206 __remove_return_type │ │ │ │ +1207 _r_e_m_o_v_e(const _Tp& __val); │ │ │ │ +1208 │ │ │ │ +1209 /** │ │ │ │ +1210 * @brief Remove all elements satisfying a predicate. │ │ │ │ +1211 * @param __pred Unary predicate function or object. │ │ │ │ +1212 * │ │ │ │ +1213 * Removes every element in the list for which the predicate │ │ │ │ +1214 * returns true. Remaining elements stay in list order. Note │ │ │ │ +1215 * that this function only erases the elements, and that if the │ │ │ │ +1216 * elements themselves are pointers, the pointed-to memory is │ │ │ │ +1217 * not touched in any way. Managing the pointer is the user's │ │ │ │ +1218 * responsibility. │ │ │ │ +1219 */ │ │ │ │ +1220 template │ │ │ │ +1221 __remove_return_type │ │ │ │ +_1_2_2_2 _r_e_m_o_v_e___i_f(___P_r_e_d _____p_r_e_d); │ │ │ │ +1223 │ │ │ │ +1224 /** │ │ │ │ +1225 * @brief Remove consecutive duplicate elements. │ │ │ │ +1226 * │ │ │ │ +1227 * For each consecutive set of elements with the same value, │ │ │ │ +1228 * remove all but the first one. Remaining elements stay in │ │ │ │ +1229 * list order. Note that this function only erases the │ │ │ │ +1230 * elements, and that if the elements themselves are pointers, │ │ │ │ +1231 * the pointed-to memory is not touched in any way. Managing │ │ │ │ +1232 * the pointer is the user's responsibility. │ │ │ │ +1233 */ │ │ │ │ +1234 _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +1235 __remove_return_type │ │ │ │ +_1_2_3_6 _u_n_i_q_u_e() │ │ │ │ +1237 { return _u_n_i_q_u_e(_s_t_d_:_:_e_q_u_a_l___t_o_<___T_p_>()); } │ │ │ │ +1238 │ │ │ │ +1239#undef _GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG │ │ │ │ +1240 │ │ │ │ +1241 /** │ │ │ │ +1242 * @brief Remove consecutive elements satisfying a predicate. │ │ │ │ +1243 * @param __binary_pred Binary predicate function or object. │ │ │ │ 1244 * │ │ │ │ -1245 * The resulting value type of the container is std::pair. │ │ │ │ -1246 * │ │ │ │ -1247 * Base is _Hashtable, dispatched at compile time via template │ │ │ │ -1248 * alias __ummap_hashtable. │ │ │ │ -1249 */ │ │ │ │ -1250 template, │ │ │ │ -1252 typename _Pred = equal_to<_Key>, │ │ │ │ -1253 typename _Alloc = allocator>> │ │ │ │ -_1_2_5_4 class _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ -1255 { │ │ │ │ -1256 typedef _____u_m_m_a_p___h_a_s_h_t_a_b_l_e_<___K_e_y_,_ ___T_p_,_ ___H_a_s_h_,_ ___P_r_e_d_,_ ___A_l_l_o_c_> ___H_a_s_h_t_a_b_l_e; │ │ │ │ -1257 ___H_a_s_h_t_a_b_l_e _M_h; │ │ │ │ -1258 │ │ │ │ -1259 public: │ │ │ │ -1260 // typedefs: │ │ │ │ -1261 ///@{ │ │ │ │ -1262 /// Public typedefs. │ │ │ │ -_1_2_6_3 typedef typename _Hashtable::key_type _k_e_y___t_y_p_e; │ │ │ │ -_1_2_6_4 typedef typename _Hashtable::value_type _v_a_l_u_e___t_y_p_e; │ │ │ │ -_1_2_6_5 typedef typename _Hashtable::mapped_type _m_a_p_p_e_d___t_y_p_e; │ │ │ │ -_1_2_6_6 typedef typename _Hashtable::hasher _h_a_s_h_e_r; │ │ │ │ -_1_2_6_7 typedef typename _Hashtable::key_equal _k_e_y___e_q_u_a_l; │ │ │ │ -_1_2_6_8 typedef typename _Hashtable::allocator_type _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ -1269 ///@} │ │ │ │ -1270 │ │ │ │ -1271 ///@{ │ │ │ │ -1272 /// Iterator-related typedefs. │ │ │ │ -_1_2_7_3 typedef typename _Hashtable::pointer _p_o_i_n_t_e_r; │ │ │ │ -_1_2_7_4 typedef typename _Hashtable::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ -_1_2_7_5 typedef typename _Hashtable::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_2_7_6 typedef typename _Hashtable::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_2_7_7 typedef typename _Hashtable::iterator _i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_7_8 typedef typename _Hashtable::const_iterator _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_7_9 typedef typename _Hashtable::local_iterator _l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_8_0 typedef typename _Hashtable::const_local_iterator _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r; │ │ │ │ -_1_2_8_1 typedef typename _Hashtable::size_type _s_i_z_e___t_y_p_e; │ │ │ │ -_1_2_8_2 typedef typename _Hashtable::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ -1283 ///@} │ │ │ │ -1284 │ │ │ │ -1285#if __cplusplus > 201402L │ │ │ │ -1286 using node_type = typename _Hashtable::node_type; │ │ │ │ -1287#endif │ │ │ │ +1245 * For each consecutive set of elements [first,last) that │ │ │ │ +1246 * satisfy predicate(first,i) where i is an iterator in │ │ │ │ +1247 * [first,last), remove all but the first one. Remaining │ │ │ │ +1248 * elements stay in list order. Note that this function only │ │ │ │ +1249 * erases the elements, and that if the elements themselves are │ │ │ │ +1250 * pointers, the pointed-to memory is not touched in any way. │ │ │ │ +1251 * Managing the pointer is the user's responsibility. │ │ │ │ +1252 */ │ │ │ │ +1253 template │ │ │ │ +1254 __remove_return_type │ │ │ │ +_1_2_5_5 _u_n_i_q_u_e(___B_i_n_P_r_e_d _____b_i_n_a_r_y___p_r_e_d); │ │ │ │ +1256 │ │ │ │ +1257 /** │ │ │ │ +1258 * @brief Merge sorted lists. │ │ │ │ +1259 * @param __list Sorted list to merge. │ │ │ │ +1260 * │ │ │ │ +1261 * Assumes that both @a list and this list are sorted according to │ │ │ │ +1262 * operator<(). Merges elements of @a __list into this list in │ │ │ │ +1263 * sorted order, leaving @a __list empty when complete. Elements in │ │ │ │ +1264 * this list precede elements in @a __list that are equal. │ │ │ │ +1265 */ │ │ │ │ +1266 void │ │ │ │ +_1_2_6_7 _m_e_r_g_e(_f_o_r_w_a_r_d___l_i_s_t&& _____l_i_s_t) │ │ │ │ +1268 { _m_e_r_g_e(_s_t_d_:_:_m_o_v_e(_____l_i_s_t), _s_t_d_:_:_l_e_s_s_<___T_p_>()); } │ │ │ │ +1269 │ │ │ │ +1270 void │ │ │ │ +1271 _m_e_r_g_e(_f_o_r_w_a_r_d___l_i_s_t& _____l_i_s_t) │ │ │ │ +1272 { _m_e_r_g_e(_s_t_d_:_:_m_o_v_e(_____l_i_s_t)); } │ │ │ │ +1273 │ │ │ │ +1274 /** │ │ │ │ +1275 * @brief Merge sorted lists according to comparison function. │ │ │ │ +1276 * @param __list Sorted list to merge. │ │ │ │ +1277 * @param __comp Comparison function defining sort order. │ │ │ │ +1278 * │ │ │ │ +1279 * Assumes that both @a __list and this list are sorted according to │ │ │ │ +1280 * comp. Merges elements of @a __list into this list │ │ │ │ +1281 * in sorted order, leaving @a __list empty when complete. Elements │ │ │ │ +1282 * in this list precede elements in @a __list that are equivalent │ │ │ │ +1283 * according to comp(). │ │ │ │ +1284 */ │ │ │ │ +1285 template │ │ │ │ +1286 void │ │ │ │ +1287 _m_e_r_g_e(_f_o_r_w_a_r_d___l_i_s_t&& __list, _Comp __comp); │ │ │ │ 1288 │ │ │ │ -1289 //construct/destroy/copy │ │ │ │ -1290 │ │ │ │ -1291 /// Default constructor. │ │ │ │ -_1_2_9_2 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p() = default; │ │ │ │ +1289 template │ │ │ │ +1290 void │ │ │ │ +1291 _m_e_r_g_e(_f_o_r_w_a_r_d___l_i_s_t& __list, _Comp __comp) │ │ │ │ +1292 { _m_e_r_g_e(_s_t_d_:_:_m_o_v_e(__list), __comp); } │ │ │ │ 1293 │ │ │ │ 1294 /** │ │ │ │ -1295 * @brief Default constructor creates no elements. │ │ │ │ -1296 * @param __n Mnimal initial number of buckets. │ │ │ │ -1297 * @param __hf A hash functor. │ │ │ │ -1298 * @param __eql A key equality functor. │ │ │ │ -1299 * @param __a An allocator object. │ │ │ │ -1300 */ │ │ │ │ -1301 explicit │ │ │ │ -_1_3_0_2 _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, │ │ │ │ -1303 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -1304 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -1305 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()) │ │ │ │ -1306 : _M_h(__n, _____h_f, _____e_q_l, __a) │ │ │ │ -1307 { } │ │ │ │ -1308 │ │ │ │ -1309 /** │ │ │ │ -1310 * @brief Builds an %unordered_multimap from a range. │ │ │ │ -1311 * @param __first An input iterator. │ │ │ │ -1312 * @param __last An input iterator. │ │ │ │ -1313 * @param __n Minimal initial number of buckets. │ │ │ │ -1314 * @param __hf A hash functor. │ │ │ │ -1315 * @param __eql A key equality functor. │ │ │ │ -1316 * @param __a An allocator object. │ │ │ │ -1317 * │ │ │ │ -1318 * Create an %unordered_multimap consisting of copies of the elements │ │ │ │ -1319 * from [__first,__last). This is linear in N (where N is │ │ │ │ -1320 * distance(__first,__last)). │ │ │ │ -1321 */ │ │ │ │ -1322 template │ │ │ │ -_1_3_2_3 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ -1324 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -1325 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -1326 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -1327 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()) │ │ │ │ -1328 : _M_h(__first, __last, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -1329 { } │ │ │ │ -1330 │ │ │ │ -1331 /// Copy constructor. │ │ │ │ -_1_3_3_2 _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; │ │ │ │ +1295 * @brief Sort the elements of the list. │ │ │ │ +1296 * │ │ │ │ +1297 * Sorts the elements of this list in NlogN time. Equivalent │ │ │ │ +1298 * elements remain in list order. │ │ │ │ +1299 */ │ │ │ │ +1300 void │ │ │ │ +_1_3_0_1 _s_o_r_t() │ │ │ │ +1302 { _s_o_r_t(_s_t_d_:_:_l_e_s_s_<___T_p_>()); } │ │ │ │ +1303 │ │ │ │ +1304 /** │ │ │ │ +1305 * @brief Sort the forward_list using a comparison function. │ │ │ │ +1306 * │ │ │ │ +1307 * Sorts the elements of this list in NlogN time. Equivalent │ │ │ │ +1308 * elements remain in list order. │ │ │ │ +1309 */ │ │ │ │ +1310 template │ │ │ │ +1311 void │ │ │ │ +1312 _s_o_r_t(___C_o_m_p __comp); │ │ │ │ +1313 │ │ │ │ +1314 /** │ │ │ │ +1315 * @brief Reverse the elements in list. │ │ │ │ +1316 * │ │ │ │ +1317 * Reverse the order of elements in the list in linear time. │ │ │ │ +1318 */ │ │ │ │ +1319 void │ │ │ │ +_1_3_2_0 _r_e_v_e_r_s_e() noexcept │ │ │ │ +1321 { this->_M_impl._M_head._M_reverse_after(); } │ │ │ │ +1322 │ │ │ │ +1323 private: │ │ │ │ +1324 // Called by the range constructor to implement [23.3.4.2]/9 │ │ │ │ +1325 template │ │ │ │ +1326 void │ │ │ │ +1327 _M_range_initialize(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last); │ │ │ │ +1328 │ │ │ │ +1329 // Called by forward_list(n,v,a), and the range constructor when it │ │ │ │ +1330 // turns out to be the same thing. │ │ │ │ +1331 void │ │ │ │ +1332 _M_fill_initialize(size_type __n, const value_type& __value); │ │ │ │ 1333 │ │ │ │ -1334 /// Move constructor. │ │ │ │ -_1_3_3_5 _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; │ │ │ │ -1336 │ │ │ │ -1337 /** │ │ │ │ -1338 * @brief Creates an %unordered_multimap with no elements. │ │ │ │ -1339 * @param __a An allocator object. │ │ │ │ -1340 */ │ │ │ │ -1341 explicit │ │ │ │ -_1_3_4_2 _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) │ │ │ │ -1343 : _M_h(__a) │ │ │ │ -1344 { } │ │ │ │ -1345 │ │ │ │ -1346 /* │ │ │ │ -1347 * @brief Copy constructor with allocator argument. │ │ │ │ -1348 * @param __uset Input %unordered_multimap to copy. │ │ │ │ -1349 * @param __a An allocator object. │ │ │ │ -1350 */ │ │ │ │ -1351 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& _____u_m_m_a_p, │ │ │ │ -1352 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1353 : _M_h(_____u_m_m_a_p._M_h, __a) │ │ │ │ -1354 { } │ │ │ │ -1355 │ │ │ │ -1356 /* │ │ │ │ -1357 * @brief Move constructor with allocator argument. │ │ │ │ -1358 * @param __uset Input %unordered_multimap to move. │ │ │ │ -1359 * @param __a An allocator object. │ │ │ │ -1360 */ │ │ │ │ -1361 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p&& __ummap, │ │ │ │ -1362 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1363 noexcept( noexcept(_Hashtable(_s_t_d_:_:_m_o_v_e(__ummap._M_h), __a)) ) │ │ │ │ -1364 : _M_h(_s_t_d_:_:_m_o_v_e(__ummap._M_h), __a) │ │ │ │ -1365 { } │ │ │ │ -1366 │ │ │ │ -1367 /** │ │ │ │ -1368 * @brief Builds an %unordered_multimap from an initializer_list. │ │ │ │ -1369 * @param __l An initializer_list. │ │ │ │ -1370 * @param __n Minimal initial number of buckets. │ │ │ │ -1371 * @param __hf A hash functor. │ │ │ │ -1372 * @param __eql A key equality functor. │ │ │ │ -1373 * @param __a An allocator object. │ │ │ │ -1374 * │ │ │ │ -1375 * Create an %unordered_multimap consisting of copies of the elements in │ │ │ │ -1376 * the list. This is linear in N (where N is @a __l.size()). │ │ │ │ -1377 */ │ │ │ │ -_1_3_7_8 _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, │ │ │ │ -1379 _s_i_z_e___t_y_p_e __n = 0, │ │ │ │ -1380 const _h_a_s_h_e_r& _____h_f = _h_a_s_h_e_r(), │ │ │ │ -1381 const _k_e_y___e_q_u_a_l& _____e_q_l = _k_e_y___e_q_u_a_l(), │ │ │ │ -1382 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()) │ │ │ │ -1383 : _M_h(_____l, __n, _____h_f, _____e_q_l, __a) │ │ │ │ -1384 { } │ │ │ │ -1385 │ │ │ │ -1386 _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) │ │ │ │ -1387 : _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) │ │ │ │ -1388 { } │ │ │ │ -1389 │ │ │ │ -1390 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1391 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1392 : _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(__n, __hf, _k_e_y___e_q_u_a_l(), __a) │ │ │ │ -1393 { } │ │ │ │ -1394 │ │ │ │ +1334 // Called by splice_after and insert_after. │ │ │ │ +1335 _i_t_e_r_a_t_o_r │ │ │ │ +1336 _M_splice_after(const_iterator _____p_o_s, const_iterator _____b_e_f_o_r_e, │ │ │ │ +1337 const_iterator __last); │ │ │ │ +1338 │ │ │ │ +1339 // Called by forward_list(n). │ │ │ │ +1340 void │ │ │ │ +1341 _M_default_initialize(size_type __n); │ │ │ │ +1342 │ │ │ │ +1343 // Called by resize(sz). │ │ │ │ +1344 void │ │ │ │ +1345 _M_default_insert_after(const_iterator _____p_o_s, size_type __n); │ │ │ │ +1346 │ │ │ │ +1347 // Called by operator=(forward_list&&) │ │ │ │ +1348 void │ │ │ │ +1349 _M_move_assign(_f_o_r_w_a_r_d___l_i_s_t&& _____l_i_s_t, _t_r_u_e___t_y_p_e) noexcept │ │ │ │ +1350 { │ │ │ │ +1351 _c_l_e_a_r(); │ │ │ │ +1352 this->_M_impl._M_head._M_next = _____l_i_s_t._M_impl._M_head._M_next; │ │ │ │ +1353 _____l_i_s_t._M_impl._M_head._M_next = nullptr; │ │ │ │ +1354 _s_t_d_:_:_____a_l_l_o_c___o_n___m_o_v_e(this->_M_get_Node_allocator(), │ │ │ │ +1355 _____l_i_s_t._M_get_Node_allocator()); │ │ │ │ +1356 } │ │ │ │ +1357 │ │ │ │ +1358 // Called by operator=(forward_list&&) │ │ │ │ +1359 void │ │ │ │ +1360 _M_move_assign(_f_o_r_w_a_r_d___l_i_s_t&& __list, _f_a_l_s_e___t_y_p_e) │ │ │ │ +1361 { │ │ │ │ +1362 if (__list._M_get_Node_allocator() == this->_M_get_Node_allocator()) │ │ │ │ +1363 _M_move_assign(_s_t_d_:_:_m_o_v_e(__list), _t_r_u_e___t_y_p_e()); │ │ │ │ +1364 else │ │ │ │ +1365 // The rvalue's allocator cannot be moved, or is not equal, │ │ │ │ +1366 // so we need to individually move each element. │ │ │ │ +1367 this->_a_s_s_i_g_n(std::make_move_iterator(__list.begin()), │ │ │ │ +1368 std::make_move_iterator(__list.end())); │ │ │ │ +1369 } │ │ │ │ +1370 │ │ │ │ +1371 // Called by assign(_InputIterator, _InputIterator) if _Tp is │ │ │ │ +1372 // CopyAssignable. │ │ │ │ +1373 template │ │ │ │ +1374 void │ │ │ │ +1375 _M_assign(_InputIterator __first, _InputIterator __last, _t_r_u_e___t_y_p_e) │ │ │ │ +1376 { │ │ │ │ +1377 auto __prev = _b_e_f_o_r_e___b_e_g_i_n(); │ │ │ │ +1378 auto __curr = _b_e_g_i_n(); │ │ │ │ +1379 auto __end = _e_n_d(); │ │ │ │ +1380 while (__curr != __end && __first != __last) │ │ │ │ +1381 { │ │ │ │ +1382 *__curr = *__first; │ │ │ │ +1383 ++__prev; │ │ │ │ +1384 ++__curr; │ │ │ │ +1385 ++__first; │ │ │ │ +1386 } │ │ │ │ +1387 if (__first != __last) │ │ │ │ +1388 _i_n_s_e_r_t___a_f_t_e_r(__prev, __first, __last); │ │ │ │ +1389 else if (__curr != __end) │ │ │ │ +1390 _e_r_a_s_e___a_f_t_e_r(__prev, __end); │ │ │ │ +1391 } │ │ │ │ +1392 │ │ │ │ +1393 // Called by assign(_InputIterator, _InputIterator) if _Tp is not │ │ │ │ +1394 // CopyAssignable. │ │ │ │ 1395 template │ │ │ │ -1396 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ -1397 _s_i_z_e___t_y_p_e __n, │ │ │ │ -1398 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1399 : _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) │ │ │ │ -1400 { } │ │ │ │ -1401 │ │ │ │ -1402 template │ │ │ │ -1403 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(_InputIterator __first, _InputIterator __last, │ │ │ │ -1404 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1405 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1406 : _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) │ │ │ │ -1407 { } │ │ │ │ -1408 │ │ │ │ -1409 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(initializer_list __l, │ │ │ │ -1410 _s_i_z_e___t_y_p_e __n, │ │ │ │ -1411 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1412 : _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) │ │ │ │ -1413 { } │ │ │ │ -1414 │ │ │ │ -1415 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p(initializer_list __l, │ │ │ │ -1416 _s_i_z_e___t_y_p_e __n, const _h_a_s_h_e_r& __hf, │ │ │ │ -1417 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -1418 : _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) │ │ │ │ -1419 { } │ │ │ │ -1420 │ │ │ │ -1421 /// Copy assignment operator. │ │ │ │ -1422 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ -_1_4_2_3 _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; │ │ │ │ -1424 │ │ │ │ -1425 /// Move assignment operator. │ │ │ │ -1426 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ -_1_4_2_7 _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; │ │ │ │ -1428 │ │ │ │ -1429 /** │ │ │ │ -1430 * @brief %Unordered_multimap list assignment operator. │ │ │ │ -1431 * @param __l An initializer_list. │ │ │ │ -1432 * │ │ │ │ -1433 * This function fills an %unordered_multimap with copies of the │ │ │ │ -1434 * elements in the initializer list @a __l. │ │ │ │ -1435 * │ │ │ │ -1436 * Note that the assignment completely changes the %unordered_multimap │ │ │ │ -1437 * and that the resulting %unordered_multimap's size is the same as the │ │ │ │ -1438 * number of elements assigned. │ │ │ │ -1439 */ │ │ │ │ -1440 _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& │ │ │ │ -_1_4_4_1 _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) │ │ │ │ -1442 { │ │ │ │ -1443 _M_h = _____l; │ │ │ │ -1444 return *this; │ │ │ │ -1445 } │ │ │ │ -1446 │ │ │ │ -1447 /// Returns the allocator object used by the %unordered_multimap. │ │ │ │ -1448 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_1_4_4_9 _g_e_t___a_l_l_o_c_a_t_o_r() const noexcept │ │ │ │ -1450 { return _M_h.get_allocator(); } │ │ │ │ -1451 │ │ │ │ -1452 // size and capacity: │ │ │ │ -1453 │ │ │ │ -1454 /// Returns true if the %unordered_multimap is empty. │ │ │ │ -1455 _GLIBCXX_NODISCARD bool │ │ │ │ -_1_4_5_6 _e_m_p_t_y() const noexcept │ │ │ │ -1457 { return _M_h.empty(); } │ │ │ │ -1458 │ │ │ │ -1459 /// Returns the size of the %unordered_multimap. │ │ │ │ -1460 _s_i_z_e___t_y_p_e │ │ │ │ -_1_4_6_1 _s_i_z_e() const noexcept │ │ │ │ -1462 { return _M_h.size(); } │ │ │ │ -1463 │ │ │ │ -1464 /// Returns the maximum size of the %unordered_multimap. │ │ │ │ -1465 _s_i_z_e___t_y_p_e │ │ │ │ -_1_4_6_6 _m_a_x___s_i_z_e() const noexcept │ │ │ │ -1467 { return _M_h.max_size(); } │ │ │ │ -1468 │ │ │ │ -1469 // iterators. │ │ │ │ -1470 │ │ │ │ -1471 /** │ │ │ │ -1472 * Returns a read/write iterator that points to the first element in the │ │ │ │ -1473 * %unordered_multimap. │ │ │ │ -1474 */ │ │ │ │ -1475 _i_t_e_r_a_t_o_r │ │ │ │ -_1_4_7_6 _b_e_g_i_n() noexcept │ │ │ │ -1477 { return _M_h.begin(); } │ │ │ │ -1478 │ │ │ │ -1479 ///@{ │ │ │ │ -1480 /** │ │ │ │ -1481 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -1482 * element in the %unordered_multimap. │ │ │ │ -1483 */ │ │ │ │ -1484 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_4_8_5 _b_e_g_i_n() const noexcept │ │ │ │ -1486 { return _M_h.begin(); } │ │ │ │ -1487 │ │ │ │ -1488 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_4_8_9 _c_b_e_g_i_n() const noexcept │ │ │ │ -1490 { return _M_h.begin(); } │ │ │ │ -1491 ///@} │ │ │ │ -1492 │ │ │ │ -1493 /** │ │ │ │ -1494 * Returns a read/write iterator that points one past the last element in │ │ │ │ -1495 * the %unordered_multimap. │ │ │ │ -1496 */ │ │ │ │ -1497 _i_t_e_r_a_t_o_r │ │ │ │ -_1_4_9_8 _e_n_d() noexcept │ │ │ │ -1499 { return _M_h.end(); } │ │ │ │ +1396 void │ │ │ │ +1397 _M_assign(_InputIterator __first, _InputIterator __last, _f_a_l_s_e___t_y_p_e) │ │ │ │ +1398 { │ │ │ │ +1399 _c_l_e_a_r(); │ │ │ │ +1400 _i_n_s_e_r_t___a_f_t_e_r(_c_b_e_f_o_r_e___b_e_g_i_n(), __first, __last); │ │ │ │ +1401 } │ │ │ │ +1402 │ │ │ │ +1403 // Called by assign(size_type, const _Tp&) if Tp is CopyAssignable │ │ │ │ +1404 void │ │ │ │ +1405 _M_assign_n(size_type __n, const _Tp& __val, _t_r_u_e___t_y_p_e) │ │ │ │ +1406 { │ │ │ │ +1407 auto __prev = _b_e_f_o_r_e___b_e_g_i_n(); │ │ │ │ +1408 auto __curr = _b_e_g_i_n(); │ │ │ │ +1409 auto __end = _e_n_d(); │ │ │ │ +1410 while (__curr != __end && __n > 0) │ │ │ │ +1411 { │ │ │ │ +1412 *__curr = __val; │ │ │ │ +1413 ++__prev; │ │ │ │ +1414 ++__curr; │ │ │ │ +1415 --__n; │ │ │ │ +1416 } │ │ │ │ +1417 if (__n > 0) │ │ │ │ +1418 _i_n_s_e_r_t___a_f_t_e_r(__prev, __n, __val); │ │ │ │ +1419 else if (__curr != __end) │ │ │ │ +1420 _e_r_a_s_e___a_f_t_e_r(__prev, __end); │ │ │ │ +1421 } │ │ │ │ +1422 │ │ │ │ +1423 // Called by assign(size_type, const _Tp&) if Tp is non-CopyAssignable │ │ │ │ +1424 void │ │ │ │ +1425 _M_assign_n(size_type __n, const _Tp& __val, _f_a_l_s_e___t_y_p_e) │ │ │ │ +1426 { │ │ │ │ +1427 _c_l_e_a_r(); │ │ │ │ +1428 _i_n_s_e_r_t___a_f_t_e_r(_c_b_e_f_o_r_e___b_e_g_i_n(), __n, __val); │ │ │ │ +1429 } │ │ │ │ +1430 }; │ │ │ │ +1431 │ │ │ │ +1432#if __cpp_deduction_guides >= 201606 │ │ │ │ +1433 template::value_type, │ │ │ │ +1435 typename _Allocator = allocator<_ValT>, │ │ │ │ +1436 typename = _RequireInputIter<_InputIterator>, │ │ │ │ +1437 typename = _RequireAllocator<_Allocator>> │ │ │ │ +1438 forward_list(_InputIterator, _InputIterator, _Allocator = _Allocator()) │ │ │ │ +1439 -> forward_list<_ValT, _Allocator>; │ │ │ │ +1440#endif │ │ │ │ +1441 │ │ │ │ +1442 /** │ │ │ │ +1443 * @brief Forward list equality comparison. │ │ │ │ +1444 * @param __lx A %forward_list │ │ │ │ +1445 * @param __ly A %forward_list of the same type as @a __lx. │ │ │ │ +1446 * @return True iff the elements of the forward lists are equal. │ │ │ │ +1447 * │ │ │ │ +1448 * This is an equivalence relation. It is linear in the number of │ │ │ │ +1449 * elements of the forward lists. Deques are considered equivalent │ │ │ │ +1450 * if corresponding elements compare equal. │ │ │ │ +1451 */ │ │ │ │ +1452 template │ │ │ │ +1453 [[__nodiscard__]] │ │ │ │ +1454 bool │ │ │ │ +1455 operator==(const forward_list<_Tp, _Alloc>& __lx, │ │ │ │ +1456 const forward_list<_Tp, _Alloc>& __ly); │ │ │ │ +1457 │ │ │ │ +1458#if __cpp_lib_three_way_comparison │ │ │ │ +1459 /** │ │ │ │ +1460 * @brief Forward list ordering relation. │ │ │ │ +1461 * @param __x A `forward_list`. │ │ │ │ +1462 * @param __y A `forward_list` of the same type as `__x`. │ │ │ │ +1463 * @return A value indicating whether `__x` is less than, equal to, │ │ │ │ +1464 * greater than, or incomparable with `__y`. │ │ │ │ +1465 * │ │ │ │ +1466 * See `std::lexicographical_compare_three_way()` for how the determination │ │ │ │ +1467 * is made. This operator is used to synthesize relational operators like │ │ │ │ +1468 * `<` and `>=` etc. │ │ │ │ +1469 */ │ │ │ │ +1470 template │ │ │ │ +1471 [[nodiscard]] │ │ │ │ +1472 inline __detail::__synth3way_t<_Tp> │ │ │ │ +1473 operator<=>(const forward_list<_Tp, _Alloc>& __x, │ │ │ │ +1474 const forward_list<_Tp, _Alloc>& __y) │ │ │ │ +1475 { │ │ │ │ +1476 return _s_t_d_:_:_l_e_x_i_c_o_g_r_a_p_h_i_c_a_l___c_o_m_p_a_r_e___t_h_r_e_e___w_a_y(__x.begin(), __x.end(), │ │ │ │ +1477 __y.begin(), __y.end(), │ │ │ │ +1478 __detail::__synth3way); │ │ │ │ +1479 } │ │ │ │ +1480#else │ │ │ │ +1481 /** │ │ │ │ +1482 * @brief Forward list ordering relation. │ │ │ │ +1483 * @param __lx A %forward_list. │ │ │ │ +1484 * @param __ly A %forward_list of the same type as @a __lx. │ │ │ │ +1485 * @return True iff @a __lx is lexicographically less than @a __ly. │ │ │ │ +1486 * │ │ │ │ +1487 * This is a total ordering relation. It is linear in the number of │ │ │ │ +1488 * elements of the forward lists. The elements must be comparable │ │ │ │ +1489 * with @c <. │ │ │ │ +1490 * │ │ │ │ +1491 * See std::lexicographical_compare() for how the determination is made. │ │ │ │ +1492 */ │ │ │ │ +1493 template │ │ │ │ +1494 [[__nodiscard__]] │ │ │ │ +_1_4_9_5 inline bool │ │ │ │ +1496 operator<(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_x, │ │ │ │ +1497 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_y) │ │ │ │ +1498 { return std::lexicographical_compare(_____l_x.cbegin(), _____l_x.cend(), │ │ │ │ +1499 _____l_y.cbegin(), _____l_y.cend()); } │ │ │ │ 1500 │ │ │ │ -1501 ///@{ │ │ │ │ -1502 /** │ │ │ │ -1503 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -1504 * element in the %unordered_multimap. │ │ │ │ -1505 */ │ │ │ │ -1506 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_5_0_7 _e_n_d() const noexcept │ │ │ │ -1508 { return _M_h.end(); } │ │ │ │ -1509 │ │ │ │ -1510 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_5_1_1 _c_e_n_d() const noexcept │ │ │ │ -1512 { return _M_h.end(); } │ │ │ │ -1513 ///@} │ │ │ │ -1514 │ │ │ │ -1515 // modifiers. │ │ │ │ +1501 /// Based on operator== │ │ │ │ +1502 template │ │ │ │ +1503 [[__nodiscard__]] │ │ │ │ +1504 inline bool │ │ │ │ +_1_5_0_5 operator!=(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_x, │ │ │ │ +1506 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_y) │ │ │ │ +1507 { return !(_____l_x == _____l_y); } │ │ │ │ +1508 │ │ │ │ +1509 /// Based on operator< │ │ │ │ +1510 template │ │ │ │ +1511 [[__nodiscard__]] │ │ │ │ +1512 inline bool │ │ │ │ +_1_5_1_3 operator>(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_x, │ │ │ │ +1514 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_y) │ │ │ │ +1515 { return (_____l_y < _____l_x); } │ │ │ │ 1516 │ │ │ │ -1517 /** │ │ │ │ -1518 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -1519 * %unordered_multimap. │ │ │ │ -1520 * │ │ │ │ -1521 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ -1522 * std::piecewise_contruct for passing arguments to each │ │ │ │ -1523 * part of the pair constructor). │ │ │ │ -1524 * │ │ │ │ -1525 * @return An iterator that points to the inserted pair. │ │ │ │ -1526 * │ │ │ │ -1527 * This function attempts to build and insert a (key, value) %pair into │ │ │ │ -1528 * the %unordered_multimap. │ │ │ │ -1529 * │ │ │ │ -1530 * Insertion requires amortized constant time. │ │ │ │ -1531 */ │ │ │ │ -1532 template │ │ │ │ -1533 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_3_4 _e_m_p_l_a_c_e(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -1535 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -1536 │ │ │ │ -1537 /** │ │ │ │ -1538 * @brief Attempts to build and insert a std::pair into the │ │ │ │ -1539 * %unordered_multimap. │ │ │ │ -1540 * │ │ │ │ -1541 * @param __pos An iterator that serves as a hint as to where the pair │ │ │ │ -1542 * should be inserted. │ │ │ │ -1543 * @param __args Arguments used to generate a new pair instance (see │ │ │ │ -1544 * std::piecewise_contruct for passing arguments to each │ │ │ │ -1545 * part of the pair constructor). │ │ │ │ -1546 * @return An iterator that points to the element with key of the │ │ │ │ -1547 * std::pair built from @a __args. │ │ │ │ -1548 * │ │ │ │ -1549 * Note that the first parameter is only a hint and can potentially │ │ │ │ -1550 * improve the performance of the insertion process. A bad hint would │ │ │ │ -1551 * cause no gains in efficiency. │ │ │ │ -1552 * │ │ │ │ -1553 * See │ │ │ │ -1554 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -1555 * for more on @a hinting. │ │ │ │ -1556 * │ │ │ │ -1557 * Insertion requires amortized constant time. │ │ │ │ -1558 */ │ │ │ │ -1559 template │ │ │ │ -1560 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_6_1 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -1562 { return _M_h.emplace_hint(_____p_o_s, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -1563 │ │ │ │ -1564 ///@{ │ │ │ │ -1565 /** │ │ │ │ -1566 * @brief Inserts a std::pair into the %unordered_multimap. │ │ │ │ -1567 * @param __x Pair to be inserted (see std::make_pair for easy │ │ │ │ -1568 * creation of pairs). │ │ │ │ -1569 * │ │ │ │ -1570 * @return An iterator that points to the inserted pair. │ │ │ │ -1571 * │ │ │ │ -1572 * Insertion requires amortized constant time. │ │ │ │ -1573 */ │ │ │ │ -1574 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_7_5 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -1576 { return _M_h.insert(__x); } │ │ │ │ -1577 │ │ │ │ -1578 _i_t_e_r_a_t_o_r │ │ │ │ -_1_5_7_9 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -1580 { return _M_h.insert(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -1581 │ │ │ │ -1582 template │ │ │ │ -1583 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, _i_t_e_r_a_t_o_r> │ │ │ │ -_1_5_8_4 _i_n_s_e_r_t(___P_a_i_r&& __x) │ │ │ │ -1585 { return _M_h.emplace(_s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ -1586 ///@} │ │ │ │ -1587 │ │ │ │ -1588 ///@{ │ │ │ │ -1589 /** │ │ │ │ -1590 * @brief Inserts a std::pair into the %unordered_multimap. │ │ │ │ -1591 * @param __hint An iterator that serves as a hint as to where the │ │ │ │ -1592 * pair should be inserted. │ │ │ │ -1593 * @param __x Pair to be inserted (see std::make_pair for easy creation │ │ │ │ -1594 * of pairs). │ │ │ │ -1595 * @return An iterator that points to the element with key of │ │ │ │ -1596 * @a __x (may or may not be the %pair passed in). │ │ │ │ -1597 * │ │ │ │ -1598 * Note that the first parameter is only a hint and can potentially │ │ │ │ -1599 * improve the performance of the insertion process. A bad hint would │ │ │ │ -1600 * cause no gains in efficiency. │ │ │ │ -1601 * │ │ │ │ -1602 * See │ │ │ │ -1603 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -1604 * for more on @a hinting. │ │ │ │ -1605 * │ │ │ │ -1606 * Insertion requires amortized constant time. │ │ │ │ -1607 */ │ │ │ │ -1608 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_0_9 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -1610 { return _M_h.insert(_____h_i_n_t, __x); } │ │ │ │ -1611 │ │ │ │ -1612 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -1613 // 2354. Unnecessary copying when inserting into maps with braced-init │ │ │ │ -1614 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_1_5 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -1616 { return _M_h.insert(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -1617 │ │ │ │ -1618 template │ │ │ │ -1619 _____e_n_a_b_l_e___i_f___t_<_i_s___c_o_n_s_t_r_u_c_t_i_b_l_e_<_v_a_l_u_e___t_y_p_e_,_ ___P_a_i_r_&_&_>_:_:_v_a_l_u_e, _i_t_e_r_a_t_o_r> │ │ │ │ -_1_6_2_0 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, ___P_a_i_r&& __x) │ │ │ │ -1621 { return _M_h.emplace_hint(_____h_i_n_t, _s_t_d_:_:_f_o_r_w_a_r_d_<___P_a_i_r_>(__x)); } │ │ │ │ -1622 ///@} │ │ │ │ -1623 │ │ │ │ -1624 /** │ │ │ │ -1625 * @brief A template function that attempts to insert a range of │ │ │ │ -1626 * elements. │ │ │ │ -1627 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -1628 * inserted. │ │ │ │ -1629 * @param __last Iterator pointing to the end of the range. │ │ │ │ -1630 * │ │ │ │ -1631 * Complexity similar to that of the range constructor. │ │ │ │ -1632 */ │ │ │ │ -1633 template │ │ │ │ -1634 void │ │ │ │ -_1_6_3_5 _i_n_s_e_r_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ -1636 { _M_h.insert(__first, __last); } │ │ │ │ -1637 │ │ │ │ -1638 /** │ │ │ │ -1639 * @brief Attempts to insert a list of elements into the │ │ │ │ -1640 * %unordered_multimap. │ │ │ │ -1641 * @param __l A std::initializer_list of elements │ │ │ │ -1642 * to be inserted. │ │ │ │ -1643 * │ │ │ │ -1644 * Complexity similar to that of the range constructor. │ │ │ │ -1645 */ │ │ │ │ -1646 void │ │ │ │ -_1_6_4_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) │ │ │ │ -1648 { _M_h.insert(_____l); } │ │ │ │ -1649 │ │ │ │ -1650#if __cplusplus > 201402L │ │ │ │ -1651 /// Extract a node. │ │ │ │ -1652 node_type │ │ │ │ -_1_6_5_3 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ -1654 { │ │ │ │ -1655 __glibcxx_assert(_____p_o_s != _e_n_d()); │ │ │ │ -1656 return _M_h.extract(_____p_o_s); │ │ │ │ -1657 } │ │ │ │ -1658 │ │ │ │ -1659 /// Extract a node. │ │ │ │ -1660 node_type │ │ │ │ -_1_6_6_1 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& _____k_e_y) │ │ │ │ -1662 { return _M_h.extract(_____k_e_y); } │ │ │ │ -1663 │ │ │ │ -1664 /// Re-insert an extracted node. │ │ │ │ -1665 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_6_6 _i_n_s_e_r_t(node_type&& _____n_h) │ │ │ │ -1667 { return _M_h._M_reinsert_node_multi(_c_e_n_d(), _s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ -1668 │ │ │ │ -1669 /// Re-insert an extracted node. │ │ │ │ -1670 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_7_1 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, node_type&& _____n_h) │ │ │ │ -1672 { return _M_h._M_reinsert_node_multi(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ -1673#endif // C++17 │ │ │ │ -1674 │ │ │ │ -1675 ///@{ │ │ │ │ -1676 /** │ │ │ │ -1677 * @brief Erases an element from an %unordered_multimap. │ │ │ │ -1678 * @param __position An iterator pointing to the element to be erased. │ │ │ │ -1679 * @return An iterator pointing to the element immediately following │ │ │ │ -1680 * @a __position prior to the element being erased. If no such │ │ │ │ -1681 * element exists, end() is returned. │ │ │ │ -1682 * │ │ │ │ -1683 * This function erases an element, pointed to by the given iterator, │ │ │ │ -1684 * from an %unordered_multimap. │ │ │ │ -1685 * Note that this function only erases the element, and that if the │ │ │ │ -1686 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -1687 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -1688 */ │ │ │ │ -1689 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_9_0 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -1691 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -1692 │ │ │ │ -1693 // LWG 2059. │ │ │ │ -1694 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_9_5 _e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -1696 { return _M_h.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -1697 ///@} │ │ │ │ -1698 │ │ │ │ -1699 /** │ │ │ │ -1700 * @brief Erases elements according to the provided key. │ │ │ │ -1701 * @param __x Key of elements to be erased. │ │ │ │ -1702 * @return The number of elements erased. │ │ │ │ -1703 * │ │ │ │ -1704 * This function erases all the elements located by the given key from │ │ │ │ -1705 * an %unordered_multimap. │ │ │ │ -1706 * Note that this function only erases the element, and that if the │ │ │ │ -1707 * element is itself a pointer, the pointed-to memory is not touched in │ │ │ │ -1708 * any way. Managing the pointer is the user's responsibility. │ │ │ │ -1709 */ │ │ │ │ -1710 _s_i_z_e___t_y_p_e │ │ │ │ -_1_7_1_1 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1712 { return _M_h.erase(__x); } │ │ │ │ -1713 │ │ │ │ -1714 /** │ │ │ │ -1715 * @brief Erases a [__first,__last) range of elements from an │ │ │ │ -1716 * %unordered_multimap. │ │ │ │ -1717 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -1718 * erased. │ │ │ │ -1719 * @param __last Iterator pointing to the end of the range to │ │ │ │ -1720 * be erased. │ │ │ │ -1721 * @return The iterator @a __last. │ │ │ │ -1722 * │ │ │ │ -1723 * This function erases a sequence of elements from an │ │ │ │ -1724 * %unordered_multimap. │ │ │ │ -1725 * Note that this function only erases the elements, and that if │ │ │ │ -1726 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -1727 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -1728 */ │ │ │ │ -1729 _i_t_e_r_a_t_o_r │ │ │ │ -_1_7_3_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) │ │ │ │ -1731 { return _M_h.erase(__first, __last); } │ │ │ │ -1732 │ │ │ │ -1733 /** │ │ │ │ -1734 * Erases all elements in an %unordered_multimap. │ │ │ │ -1735 * Note that this function only erases the elements, and that if the │ │ │ │ -1736 * elements themselves are pointers, the pointed-to memory is not touched │ │ │ │ -1737 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -1738 */ │ │ │ │ -1739 void │ │ │ │ -_1_7_4_0 _c_l_e_a_r() noexcept │ │ │ │ -1741 { _M_h.clear(); } │ │ │ │ -1742 │ │ │ │ -1743 /** │ │ │ │ -1744 * @brief Swaps data with another %unordered_multimap. │ │ │ │ -1745 * @param __x An %unordered_multimap of the same element and allocator │ │ │ │ -1746 * types. │ │ │ │ -1747 * │ │ │ │ -1748 * This exchanges the elements between two %unordered_multimap in │ │ │ │ -1749 * constant time. │ │ │ │ -1750 * Note that the global std::swap() function is specialized such that │ │ │ │ -1751 * std::swap(m1,m2) will feed to this function. │ │ │ │ -1752 */ │ │ │ │ -1753 void │ │ │ │ -_1_7_5_4 _s_w_a_p(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p& __x) │ │ │ │ -1755 noexcept( noexcept(_M_h.swap(__x._M_h)) ) │ │ │ │ -1756 { _M_h.swap(__x._M_h); } │ │ │ │ -1757 │ │ │ │ -1758#if __cplusplus > 201402L │ │ │ │ -1759 template │ │ │ │ -1760 friend class std::_Hash_merge_helper; │ │ │ │ -1761 │ │ │ │ -1762 template │ │ │ │ -1763 void │ │ │ │ -1764 merge(_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_<___K_e_y_,_ ___T_p_,_ ___H_2_,_ ___P_2_,_ ___A_l_l_o_c_>& _____s_o_u_r_c_e) │ │ │ │ -1765 { │ │ │ │ -1766 using ___M_e_r_g_e___h_e_l_p_e_r │ │ │ │ -1767 = ___H_a_s_h___m_e_r_g_e___h_e_l_p_e_r_<_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_,_ ___H_2_,_ ___P_2_>; │ │ │ │ -1768 _M_h._M_merge_multi(_Merge_helper::_S_get_table(_____s_o_u_r_c_e)); │ │ │ │ -1769 } │ │ │ │ -1770 │ │ │ │ -1771 template │ │ │ │ -1772 void │ │ │ │ -1773 merge(unordered_multimap<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ -1774 { merge(__source); } │ │ │ │ -1775 │ │ │ │ -1776 template │ │ │ │ -1777 void │ │ │ │ -1778 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>& __source) │ │ │ │ -1779 { │ │ │ │ -1780 using _Merge_helper │ │ │ │ -1781 = _Hash_merge_helper; │ │ │ │ -1782 _M_h._M_merge_multi(_Merge_helper::_S_get_table(__source)); │ │ │ │ -1783 } │ │ │ │ -1784 │ │ │ │ -1785 template │ │ │ │ -1786 void │ │ │ │ -1787 merge(unordered_map<_Key, _Tp, _H2, _P2, _Alloc>&& __source) │ │ │ │ -1788 { merge(__source); } │ │ │ │ -1789#endif // C++17 │ │ │ │ -1790 │ │ │ │ -1791 // observers. │ │ │ │ -1792 │ │ │ │ -1793 /// Returns the hash functor object with which the %unordered_multimap │ │ │ │ -1794 /// was constructed. │ │ │ │ -1795 _h_a_s_h_e_r │ │ │ │ -_1_7_9_6 _h_a_s_h___f_u_n_c_t_i_o_n() const │ │ │ │ -1797 { return _M_h.hash_function(); } │ │ │ │ -1798 │ │ │ │ -1799 /// Returns the key comparison object with which the %unordered_multimap │ │ │ │ -1800 /// was constructed. │ │ │ │ -1801 _k_e_y___e_q_u_a_l │ │ │ │ -_1_8_0_2 _k_e_y___e_q() const │ │ │ │ -1803 { return _M_h.key_eq(); } │ │ │ │ -1804 │ │ │ │ -1805 // lookup. │ │ │ │ -1806 │ │ │ │ -1807 ///@{ │ │ │ │ -1808 /** │ │ │ │ -1809 * @brief Tries to locate an element in an %unordered_multimap. │ │ │ │ -1810 * @param __x Key to be located. │ │ │ │ -1811 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ -1812 * found. │ │ │ │ -1813 * │ │ │ │ -1814 * This function takes a key and tries to locate the element with which │ │ │ │ -1815 * the key matches. If successful the function returns an iterator │ │ │ │ -1816 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ -1817 * past-the-end ( @c end() ) iterator. │ │ │ │ -1818 */ │ │ │ │ -1819 _i_t_e_r_a_t_o_r │ │ │ │ -_1_8_2_0 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1821 { return _M_h.find(__x); } │ │ │ │ -1822 │ │ │ │ -1823#if __cplusplus > 201703L │ │ │ │ -1824 template │ │ │ │ -1825 auto │ │ │ │ -_1_8_2_6 _f_i_n_d(const ___K_t& __x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -1827 { return _M_h._M_find_tr(__x); } │ │ │ │ -1828#endif │ │ │ │ -1829 │ │ │ │ -1830 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_1_8_3_1 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1832 { return _M_h.find(__x); } │ │ │ │ -1833 │ │ │ │ -1834#if __cplusplus > 201703L │ │ │ │ -1835 template │ │ │ │ -1836 auto │ │ │ │ -_1_8_3_7 _f_i_n_d(const ___K_t& __x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -1838 { return _M_h._M_find_tr(__x); } │ │ │ │ -1839#endif │ │ │ │ -1840 ///@} │ │ │ │ -1841 │ │ │ │ -1842 ///@{ │ │ │ │ -1843 /** │ │ │ │ -1844 * @brief Finds the number of elements. │ │ │ │ -1845 * @param __x Key to count. │ │ │ │ -1846 * @return Number of elements with specified key. │ │ │ │ -1847 */ │ │ │ │ -1848 _s_i_z_e___t_y_p_e │ │ │ │ -_1_8_4_9 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1850 { return _M_h.count(__x); } │ │ │ │ -1851 │ │ │ │ -1852#if __cplusplus > 201703L │ │ │ │ -1853 template │ │ │ │ -1854 auto │ │ │ │ -_1_8_5_5 _c_o_u_n_t(const ___K_t& __x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -1856 { return _M_h._M_count_tr(__x); } │ │ │ │ -1857#endif │ │ │ │ -1858 ///@} │ │ │ │ -1859 │ │ │ │ -1860#if __cplusplus > 201703L │ │ │ │ -1861 ///@{ │ │ │ │ -1862 /** │ │ │ │ -1863 * @brief Finds whether an element with the given key exists. │ │ │ │ -1864 * @param __x Key of elements to be located. │ │ │ │ -1865 * @return True if there is any element with the specified key. │ │ │ │ -1866 */ │ │ │ │ -1867 bool │ │ │ │ -_1_8_6_8 _c_o_n_t_a_i_n_s(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1869 { return _M_h.find(__x) != _M_h.end(); } │ │ │ │ -1870 │ │ │ │ -1871 template │ │ │ │ -1872 auto │ │ │ │ -_1_8_7_3 _c_o_n_t_a_i_n_s(const ___K_t& __x) const │ │ │ │ -1874 -> decltype(_M_h._M_find_tr(__x), _v_o_i_d(), true) │ │ │ │ -1875 { return _M_h._M_find_tr(__x) != _M_h.end(); } │ │ │ │ -1876 ///@} │ │ │ │ -1877#endif │ │ │ │ -1878 │ │ │ │ -1879 ///@{ │ │ │ │ -1880 /** │ │ │ │ -1881 * @brief Finds a subsequence matching given key. │ │ │ │ -1882 * @param __x Key to be located. │ │ │ │ -1883 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ -1884 * matching given key. │ │ │ │ -1885 */ │ │ │ │ -1886 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_> │ │ │ │ -_1_8_8_7 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -1888 { return _M_h.equal_range(__x); } │ │ │ │ -1889 │ │ │ │ -1890#if __cplusplus > 201703L │ │ │ │ -1891 template │ │ │ │ -1892 auto │ │ │ │ -_1_8_9_3 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) │ │ │ │ -1894 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -1895 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -1896#endif │ │ │ │ -1897 │ │ │ │ -1898 _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_9 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -1900 { return _M_h.equal_range(__x); } │ │ │ │ -1901 │ │ │ │ -1902#if __cplusplus > 201703L │ │ │ │ -1903 template │ │ │ │ -1904 auto │ │ │ │ -_1_9_0_5 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) const │ │ │ │ -1906 -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -1907 { return _M_h._M_equal_range_tr(__x); } │ │ │ │ -1908#endif │ │ │ │ -1909 ///@} │ │ │ │ -1910 │ │ │ │ -1911 // bucket interface. │ │ │ │ -1912 │ │ │ │ -1913 /// Returns the number of buckets of the %unordered_multimap. │ │ │ │ -1914 _s_i_z_e___t_y_p_e │ │ │ │ -_1_9_1_5 _b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1916 { return _M_h.bucket_count(); } │ │ │ │ -1917 │ │ │ │ -1918 /// Returns the maximum number of buckets of the %unordered_multimap. │ │ │ │ -1919 _s_i_z_e___t_y_p_e │ │ │ │ -_1_9_2_0 _m_a_x___b_u_c_k_e_t___c_o_u_n_t() const noexcept │ │ │ │ -1921 { return _M_h.max_bucket_count(); } │ │ │ │ -1922 │ │ │ │ -1923 /* │ │ │ │ -1924 * @brief Returns the number of elements in a given bucket. │ │ │ │ -1925 * @param __n A bucket index. │ │ │ │ -1926 * @return The number of elements in the bucket. │ │ │ │ -1927 */ │ │ │ │ -1928 _s_i_z_e___t_y_p_e │ │ │ │ -1929 bucket_size(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1930 { return _M_h.bucket_size(__n); } │ │ │ │ -1931 │ │ │ │ -1932 /* │ │ │ │ -1933 * @brief Returns the bucket index of a given element. │ │ │ │ -1934 * @param __key A key instance. │ │ │ │ -1935 * @return The key bucket index. │ │ │ │ -1936 */ │ │ │ │ -1937 _s_i_z_e___t_y_p_e │ │ │ │ -1938 bucket(const _k_e_y___t_y_p_e& __key) const │ │ │ │ -1939 { return _M_h.bucket(__key); } │ │ │ │ -1940 │ │ │ │ -1941 /** │ │ │ │ -1942 * @brief Returns a read/write iterator pointing to the first bucket │ │ │ │ -1943 * element. │ │ │ │ -1944 * @param __n The bucket index. │ │ │ │ -1945 * @return A read/write local iterator. │ │ │ │ -1946 */ │ │ │ │ -1947 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_4_8 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1949 { return _M_h.begin(__n); } │ │ │ │ -1950 │ │ │ │ -1951 ///@{ │ │ │ │ -1952 /** │ │ │ │ -1953 * @brief Returns a read-only (constant) iterator pointing to the first │ │ │ │ -1954 * bucket element. │ │ │ │ -1955 * @param __n The bucket index. │ │ │ │ -1956 * @return A read-only local iterator. │ │ │ │ -1957 */ │ │ │ │ -1958 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_5_9 _b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1960 { return _M_h.begin(__n); } │ │ │ │ -1961 │ │ │ │ -1962 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_6_3 _c_b_e_g_i_n(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1964 { return _M_h.cbegin(__n); } │ │ │ │ -1965 ///@} │ │ │ │ -1966 │ │ │ │ -1967 /** │ │ │ │ -1968 * @brief Returns a read/write iterator pointing to one past the last │ │ │ │ -1969 * bucket elements. │ │ │ │ -1970 * @param __n The bucket index. │ │ │ │ -1971 * @return A read/write local iterator. │ │ │ │ -1972 */ │ │ │ │ -1973 _l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_7_4 _e_n_d(_s_i_z_e___t_y_p_e __n) │ │ │ │ -1975 { return _M_h.end(__n); } │ │ │ │ -1976 │ │ │ │ -1977 ///@{ │ │ │ │ -1978 /** │ │ │ │ -1979 * @brief Returns a read-only (constant) iterator pointing to one past │ │ │ │ -1980 * the last bucket elements. │ │ │ │ -1981 * @param __n The bucket index. │ │ │ │ -1982 * @return A read-only local iterator. │ │ │ │ -1983 */ │ │ │ │ -1984 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_8_5 _e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1986 { return _M_h.end(__n); } │ │ │ │ -1987 │ │ │ │ -1988 _c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_1_9_8_9 _c_e_n_d(_s_i_z_e___t_y_p_e __n) const │ │ │ │ -1990 { return _M_h.cend(__n); } │ │ │ │ -1991 ///@} │ │ │ │ -1992 │ │ │ │ -1993 // hash policy. │ │ │ │ -1994 │ │ │ │ -1995 /// Returns the average number of elements per bucket. │ │ │ │ -1996 float │ │ │ │ -_1_9_9_7 _l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -1998 { return _M_h.load_factor(); } │ │ │ │ -1999 │ │ │ │ -2000 /// Returns a positive number that the %unordered_multimap tries to keep │ │ │ │ -2001 /// the load factor less than or equal to. │ │ │ │ -2002 float │ │ │ │ -_2_0_0_3 _m_a_x___l_o_a_d___f_a_c_t_o_r() const noexcept │ │ │ │ -2004 { return _M_h.max_load_factor(); } │ │ │ │ -2005 │ │ │ │ -2006 /** │ │ │ │ -2007 * @brief Change the %unordered_multimap maximum load factor. │ │ │ │ -2008 * @param __z The new maximum load factor. │ │ │ │ -2009 */ │ │ │ │ -2010 void │ │ │ │ -_2_0_1_1 _m_a_x___l_o_a_d___f_a_c_t_o_r(float _____z) │ │ │ │ -2012 { _M_h.max_load_factor(_____z); } │ │ │ │ -2013 │ │ │ │ -2014 /** │ │ │ │ -2015 * @brief May rehash the %unordered_multimap. │ │ │ │ -2016 * @param __n The new number of buckets. │ │ │ │ -2017 * │ │ │ │ -2018 * Rehash will occur only if the new number of buckets respect the │ │ │ │ -2019 * %unordered_multimap maximum load factor. │ │ │ │ -2020 */ │ │ │ │ -2021 void │ │ │ │ -_2_0_2_2 _r_e_h_a_s_h(_s_i_z_e___t_y_p_e __n) │ │ │ │ -2023 { _M_h.rehash(__n); } │ │ │ │ -2024 │ │ │ │ -2025 /** │ │ │ │ -2026 * @brief Prepare the %unordered_multimap for a specified number of │ │ │ │ -2027 * elements. │ │ │ │ -2028 * @param __n Number of elements required. │ │ │ │ -2029 * │ │ │ │ -2030 * Same as rehash(ceil(n / max_load_factor())). │ │ │ │ -2031 */ │ │ │ │ -2032 void │ │ │ │ -_2_0_3_3 _r_e_s_e_r_v_e(_s_i_z_e___t_y_p_e __n) │ │ │ │ -2034 { _M_h.reserve(__n); } │ │ │ │ -2035 │ │ │ │ -2036 template │ │ │ │ -2038 friend bool │ │ │ │ -2039 operator==(const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<___K_e_y_1, ___T_p_1, │ │ │ │ -2040 ___H_a_s_h_1, ___P_r_e_d_1, _Alloc1>&, │ │ │ │ -2041 const _u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p<___K_e_y_1, ___T_p_1, │ │ │ │ -2042 ___H_a_s_h_1, ___P_r_e_d_1, _Alloc1>&); │ │ │ │ -2043 }; │ │ │ │ -2044 │ │ │ │ -2045#if __cpp_deduction_guides >= 201606 │ │ │ │ -2046 │ │ │ │ -2047 template>, │ │ │ │ -2049 typename _Pred = equal_to<__iter_key_t<_InputIterator>>, │ │ │ │ -2050 typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, │ │ │ │ -2051 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -2052 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -2053 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -2054 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2055 unordered_multimap(_InputIterator, _InputIterator, │ │ │ │ -2056 _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 = {}, │ │ │ │ -2057 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ -2058 _Allocator = _Allocator()) │ │ │ │ -2059 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ -2060 __iter_val_t<_InputIterator>, _Hash, _Pred, │ │ │ │ -2061 _Allocator>; │ │ │ │ -2062 │ │ │ │ -2063 template, │ │ │ │ -2064 typename _Pred = equal_to<_Key>, │ │ │ │ -2065 typename _Allocator = allocator>, │ │ │ │ -2066 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -2067 typename = _RequireNotAllocator<_Pred>, │ │ │ │ -2068 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2069 unordered_multimap(initializer_list>, │ │ │ │ -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 = {}, │ │ │ │ -2071 _Hash = _Hash(), _Pred = _Pred(), │ │ │ │ -2072 _Allocator = _Allocator()) │ │ │ │ -2073 -> unordered_multimap<_Key, _Tp, _Hash, _Pred, _Allocator>; │ │ │ │ -2074 │ │ │ │ -2075 template, │ │ │ │ -2077 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2078 unordered_multimap(_InputIterator, _InputIterator, │ │ │ │ -2079 _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) │ │ │ │ -2080 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ -2081 __iter_val_t<_InputIterator>, │ │ │ │ -2082 hash<__iter_key_t<_InputIterator>>, │ │ │ │ -2083 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ -2084 │ │ │ │ -2085 template, │ │ │ │ -2087 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2088 unordered_multimap(_InputIterator, _InputIterator, _Allocator) │ │ │ │ -2089 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ -2090 __iter_val_t<_InputIterator>, │ │ │ │ -2091 hash<__iter_key_t<_InputIterator>>, │ │ │ │ -2092 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ -2093 │ │ │ │ -2094 template, │ │ │ │ -2096 typename = _RequireNotAllocatorOrIntegral<_Hash>, │ │ │ │ -2097 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2098 unordered_multimap(_InputIterator, _InputIterator, │ │ │ │ -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, _Hash, │ │ │ │ -2100 _Allocator) │ │ │ │ -2101 -> unordered_multimap<__iter_key_t<_InputIterator>, │ │ │ │ -2102 __iter_val_t<_InputIterator>, _Hash, │ │ │ │ -2103 equal_to<__iter_key_t<_InputIterator>>, _Allocator>; │ │ │ │ -2104 │ │ │ │ -2105 template> │ │ │ │ -2107 unordered_multimap(initializer_list>, │ │ │ │ -2108 _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, │ │ │ │ -2109 _Allocator) │ │ │ │ -2110 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ -2111 │ │ │ │ -2112 template> │ │ │ │ -2114 unordered_multimap(initializer_list>, _Allocator) │ │ │ │ -2115 -> unordered_multimap<_Key, _Tp, hash<_Key>, equal_to<_Key>, _Allocator>; │ │ │ │ -2116 │ │ │ │ -2117 template, │ │ │ │ -2119 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2120 unordered_multimap(initializer_list>, │ │ │ │ -2121 _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, │ │ │ │ -2122 _Hash, _Allocator) │ │ │ │ -2123 -> unordered_multimap<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>; │ │ │ │ -2124 │ │ │ │ -2125#endif │ │ │ │ -2126 │ │ │ │ -2127 template │ │ │ │ -2128 inline void │ │ │ │ -2129 swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -2130 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -2131 noexcept(noexcept(__x.swap(__y))) │ │ │ │ -2132 { __x.swap(__y); } │ │ │ │ -2133 │ │ │ │ -2134 template │ │ │ │ -2135 inline void │ │ │ │ -2136 swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -2137 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -2138 noexcept(noexcept(__x.swap(__y))) │ │ │ │ -2139 { __x.swap(__y); } │ │ │ │ -2140 │ │ │ │ -2141 template │ │ │ │ -2142 inline bool │ │ │ │ -2143 operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -2144 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -2145 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ -2146 │ │ │ │ -2147#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -2148 template │ │ │ │ -2149 inline bool │ │ │ │ -2150 operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -2151 const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -2152 { return !(__x == __y); } │ │ │ │ -2153#endif │ │ │ │ -2154 │ │ │ │ -2155 template │ │ │ │ -2156 inline bool │ │ │ │ -2157 operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -2158 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -2159 { return __x._M_h._M_equal(__y._M_h); } │ │ │ │ -2160 │ │ │ │ -2161#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -2162 template │ │ │ │ -2163 inline bool │ │ │ │ -2164 operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, │ │ │ │ -2165 const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) │ │ │ │ -2166 { return !(__x == __y); } │ │ │ │ -2167#endif │ │ │ │ -2168 │ │ │ │ -2169_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ -2170 │ │ │ │ -2171#if __cplusplus > 201402L │ │ │ │ -2172 // Allow std::unordered_map access to internals of compatible maps. │ │ │ │ -2173 template │ │ │ │ -2175 struct _Hash_merge_helper< │ │ │ │ -2176 _GLIBCXX_STD_C::unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ -2177 _Hash2, _Eq2> │ │ │ │ -2178 { │ │ │ │ -2179 private: │ │ │ │ -2180 template │ │ │ │ -2181 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>; │ │ │ │ -2182 template │ │ │ │ -2183 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>; │ │ │ │ -2184 │ │ │ │ -2185 friend unordered_map<_Key, _Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ -2186 │ │ │ │ -2187 static auto& │ │ │ │ -2188 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ -2189 { return __map._M_h; } │ │ │ │ -2190 │ │ │ │ -2191 static auto& │ │ │ │ -2192 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ -2193 { return __map._M_h; } │ │ │ │ -2194 }; │ │ │ │ -2195 │ │ │ │ -2196 // Allow std::unordered_multimap access to internals of compatible maps. │ │ │ │ -2197 template │ │ │ │ -2199 struct _Hash_merge_helper< │ │ │ │ -2200 _GLIBCXX_STD_C::unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>, │ │ │ │ -2201 _Hash2, _Eq2> │ │ │ │ -2202 { │ │ │ │ -2203 private: │ │ │ │ -2204 template │ │ │ │ -2205 using unordered_map = _GLIBCXX_STD_C::unordered_map<_Tp...>; │ │ │ │ -2206 template │ │ │ │ -2207 using unordered_multimap = _GLIBCXX_STD_C::unordered_multimap<_Tp...>; │ │ │ │ -2208 │ │ │ │ -2209 friend unordered_multimap<_Key, _Val, _Hash1, _Eq1, _Alloc>; │ │ │ │ -2210 │ │ │ │ -2211 static auto& │ │ │ │ -2212 _S_get_table(unordered_map<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ -2213 { return __map._M_h; } │ │ │ │ -2214 │ │ │ │ -2215 static auto& │ │ │ │ -2216 _S_get_table(unordered_multimap<_Key, _Val, _Hash2, _Eq2, _Alloc>& __map) │ │ │ │ -2217 { return __map._M_h; } │ │ │ │ -2218 }; │ │ │ │ -2219#endif // C++17 │ │ │ │ -2220 │ │ │ │ -2221_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -2222} // namespace std │ │ │ │ -2223 │ │ │ │ -2224#endif /* _UNORDERED_MAP_H */ │ │ │ │ +1517 /// Based on operator< │ │ │ │ +1518 template │ │ │ │ +1519 [[__nodiscard__]] │ │ │ │ +1520 inline bool │ │ │ │ +_1_5_2_1 operator>=(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_x, │ │ │ │ +1522 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_y) │ │ │ │ +1523 { return !(_____l_x < _____l_y); } │ │ │ │ +1524 │ │ │ │ +1525 /// Based on operator< │ │ │ │ +1526 template │ │ │ │ +1527 [[__nodiscard__]] │ │ │ │ +_1_5_2_8 inline bool │ │ │ │ +1529 operator<=(const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_x, │ │ │ │ +1530 const _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_y) │ │ │ │ +1531 { return !(_____l_y < _____l_x); } │ │ │ │ +1532#endif // three-way comparison │ │ │ │ +1533 │ │ │ │ +1534 /// See std::forward_list::swap(). │ │ │ │ +1535 template │ │ │ │ +1536 inline void │ │ │ │ +_1_5_3_7 swap(_f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_x, │ │ │ │ +1538 _f_o_r_w_a_r_d___l_i_s_t_<___T_p_,_ ___A_l_l_o_c_>& _____l_y) │ │ │ │ +1539 noexcept(noexcept(_____l_x.swap(_____l_y))) │ │ │ │ +1540 { _____l_x.swap(_____l_y); } │ │ │ │ +1541 │ │ │ │ +1542_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ +1543_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +1544} // namespace std │ │ │ │ +1545 │ │ │ │ +1546#endif // _FORWARD_LIST_H │ │ │ │ +_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t │ │ │ │ _s_t_l___f_u_n_c_t_i_o_n_._h │ │ │ │ -_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h │ │ │ │ +_s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h │ │ │ │ _a_l_l_o_c_a_t_o_r_._h │ │ │ │ +_s_t_l___a_l_g_o_b_a_s_e_._h │ │ │ │ +_a_l_i_g_n_e_d___b_u_f_f_e_r_._h │ │ │ │ +_s_t_d_:_:_t_r_u_e___t_y_p_e │ │ │ │ +integral_constant< bool, true > true_type │ │ │ │ +The type used as a compile-time boolean with true value. │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_8_2 │ │ │ │ +_s_t_d_:_:_f_a_l_s_e___t_y_p_e │ │ │ │ +integral_constant< bool, false > false_type │ │ │ │ +The type used as a compile-time boolean with false value. │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_8_5 │ │ │ │ _s_t_d_:_:_m_o_v_e │ │ │ │ constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ Convert a value to an rvalue. │ │ │ │ DDeeffiinniittiioonn _m_o_v_e_._h_:_9_7 │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ +void swap(any &__x, any &__y) noexcept │ │ │ │ +Exchange the states of two any objects. │ │ │ │ +DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_____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_:_6_2 │ │ │ │ -_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_5 │ │ │ │ -_s_t_d_:_:_i_t_e_r_a_t_o_r │ │ │ │ -Common iterator class. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_2_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p │ │ │ │ -A standard container composed of equivalent keys (possibly containing multiple │ │ │ │ -of each key value) tha... │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_5_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_l_o_a_d___f_a_c_t_o_r │ │ │ │ -float load_factor() const noexcept │ │ │ │ -Returns the average number of elements per bucket. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_9_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::reference reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_r_a_s_e │ │ │ │ -iterator erase(iterator __position) │ │ │ │ -Erases an element from an unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_9_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_n_d │ │ │ │ -const_iterator end() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_0_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 │ │ │ │ -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_1_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -std::pair< iterator, iterator > equal_range(const key_type &__x) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_8_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_b_u_c_k_e_t___c_o_u_n_t │ │ │ │ -size_type bucket_count() const noexcept │ │ │ │ -Returns the number of buckets of the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_1_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::iterator iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_7 │ │ │ │ -_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_2_0 │ │ │ │ -_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 │ │ │ │ +_s_t_d_:_:_i_n_t_e_g_r_a_l___c_o_n_s_t_a_n_t │ │ │ │ +integral_constant │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_6_3 │ │ │ │ +_s_t_d_:_:_i_s___s_a_m_e │ │ │ │ +is_same │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_3_9_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_1_2_4 │ │ │ │ +_s_t_d_:_:_i_s___a_s_s_i_g_n_a_b_l_e │ │ │ │ +is_assignable │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_1_5_6 │ │ │ │ +_s_t_d_:_:___F_w_d___l_i_s_t___n_o_d_e___b_a_s_e │ │ │ │ +A helper basic node class for forward_list. This is just a linked list with │ │ │ │ +nothing inside it.... │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_5 │ │ │ │ +_s_t_d_:_:___F_w_d___l_i_s_t___n_o_d_e │ │ │ │ +A helper node class for forward_list. This is just a linked list with │ │ │ │ +uninitialized storage for a dat... │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_1_5 │ │ │ │ +_s_t_d_:_:___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r │ │ │ │ +A forward_list::iterator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_3_6 │ │ │ │ +_s_t_d_:_:___F_w_d___l_i_s_t___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ +friend bool operator==(const _Self &__x, const _Self &__y) noexcept │ │ │ │ +Forward list iterator equality comparison. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_8_3 │ │ │ │ +_s_t_d_:_:___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ +A forward_list::const_iterator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_2_1_5 │ │ │ │ +_s_t_d_:_:___F_w_d___l_i_s_t___c_o_n_s_t___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ +friend bool operator==(const _Self &__x, const _Self &__y) noexcept │ │ │ │ +Forward list const_iterator equality comparison. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_2_6_6 │ │ │ │ +_s_t_d_:_:___F_w_d___l_i_s_t___b_a_s_e │ │ │ │ +Base class for forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_2_9_6 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +A standard container with linear time access to elements, and fixed time │ │ │ │ +insertion/deletion at any po... │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_4_3_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_u_n_i_q_u_e │ │ │ │ +__remove_return_type unique(_BinPred __binary_pred) │ │ │ │ +Remove consecutive elements satisfying a predicate. │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_b_e_g_i_n │ │ │ │ iterator begin() noexcept │ │ │ │ -DDeeffiinniittiioonn _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_:_:_b_e_g_i_n │ │ │ │ -const_iterator begin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_8_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_h_a_s_h___f_u_n_c_t_i_o_n │ │ │ │ -hasher hash_function() const │ │ │ │ -Returns the hash functor object with which the unordered_multimap was │ │ │ │ -constructed. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_9_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __hint, node_type &&__nh) │ │ │ │ -Re-insert an extracted node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_7_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -__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_2_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_multimap & operator=(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_8_0_2 │ │ │ │ -_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_9 │ │ │ │ -_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_3_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_m_a_p_p_e_d___t_y_p_e │ │ │ │ -_Hashtable::mapped_type mapped_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -Tries to locate an element in an unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_2_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_7_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -void insert(_InputIterator __first, _InputIterator __last) │ │ │ │ -A template function that attempts to insert a range of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_3_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_multimap & operator=(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_4_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(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_3_0_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ -_Hashtable::value_type value_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_4 │ │ │ │ -_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_3_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 key_type &__key) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_6_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ -bool contains(const key_type &__x) const │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_6_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::const_reference const_reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(node_type &&__nh) │ │ │ │ -Re-insert an extracted node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_6_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_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_9_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_n_d │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_3_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_b_e_f_o_r_e___b_e_g_i_n │ │ │ │ +const_iterator before_begin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_2_5 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_r_e_v_e_r_s_e │ │ │ │ +void reverse() noexcept │ │ │ │ +Reverse the elements in list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_3_2_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list()=default │ │ │ │ +Creates a forward_list with no elements. │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_~_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +~forward_list() noexcept │ │ │ │ +The forward_list dtor. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_6_0_2 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_e_r_a_s_e___a_f_t_e_r │ │ │ │ +iterator erase_after(const_iterator __pos) │ │ │ │ +Removes the element pointed to by the iterator following pos. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_0_2_3 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_s_w_a_p │ │ │ │ +void swap(forward_list &__list) noexcept │ │ │ │ +Swaps data with another forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_0_6_5 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_r_o_n_t │ │ │ │ +const_reference front() const │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_8_3_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_m_e_r_g_e │ │ │ │ +void merge(forward_list &&__list) │ │ │ │ +Merge sorted lists. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_2_6_7 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(const _Alloc &__al) noexcept │ │ │ │ +Creates a forward_list with no elements. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_4_7_6 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_s_o_r_t │ │ │ │ +void sort() │ │ │ │ +Sort the elements of the list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_3_0_1 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_b_e_f_o_r_e___b_e_g_i_n │ │ │ │ +iterator before_begin() noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_1_5 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(const forward_list &__list, const __type_identity_t< _Alloc > │ │ │ │ +&__al) │ │ │ │ +Copy constructor with allocator argument. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_4_8_5 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_e_m_p_l_a_c_e___a_f_t_e_r │ │ │ │ +iterator emplace_after(const_iterator __pos, _Args &&... __args) │ │ │ │ +Constructs object in forward_list after the specified iterator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_9_2_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(const forward_list &__list) │ │ │ │ +The forward_list copy constructor. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_7_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_i_n_s_e_r_t___a_f_t_e_r │ │ │ │ +iterator insert_after(const_iterator __pos, const _Tp &__val) │ │ │ │ +Inserts given value into forward_list after specified iterator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_9_3_7 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +forward_list & operator=(forward_list &&__list) noexcept(_Node_alloc_traits:: │ │ │ │ +_S_nothrow_move()) │ │ │ │ +The forward_list move assignment operator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_6_3_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_r_e_s_i_z_e │ │ │ │ +void resize(size_type __sz) │ │ │ │ +Resizes the forward_list to the specified number of elements. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._t_c_c_:_1_8_2 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +forward_list & operator=(const forward_list &__list) │ │ │ │ +The forward_list assignment operator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._t_c_c_:_1_4_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_r_e_m_o_v_e___i_f │ │ │ │ +__remove_return_type remove_if(_Pred __pred) │ │ │ │ +Remove all elements satisfying a predicate. │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_e_n_d │ │ │ │ iterator end() noexcept │ │ │ │ -DDeeffiinniittiioonn _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_:_:_b_e_g_i_n │ │ │ │ -local_iterator begin(size_type __n) │ │ │ │ -Returns a read/write iterator pointing to the first bucket element. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_4_8 │ │ │ │ -_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_:_2_0_0_3 │ │ │ │ -_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_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 │ │ │ │ -iterator insert(const value_type &__x) │ │ │ │ -Inserts a std::pair into the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_7_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -unordered_multimap & operator=(unordered_multimap &&)=default │ │ │ │ -Move assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_h_a_s_h_e_r │ │ │ │ -_Hashtable::hasher hasher │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::local_iterator local_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_9 │ │ │ │ -_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_3_3 │ │ │ │ -_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_9 │ │ │ │ -_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_2_3 │ │ │ │ -_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 │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_5_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(size_type __n, const _Tp &__value, const _Alloc &__al=_Alloc()) │ │ │ │ +Creates a forward_list with copies of an exemplar element. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_4_3 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_a_s_s_i_g_n │ │ │ │ +void assign(size_type __n, const _Tp &__val) │ │ │ │ +Assigns a given value to a forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_6_8_7 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_b_e_g_i_n │ │ │ │ +const_iterator begin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_4_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_s_p_l_i_c_e___a_f_t_e_r │ │ │ │ +void splice_after(const_iterator __pos, forward_list &&__list) noexcept │ │ │ │ +Insert contents of another forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_1_2_8 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_c_b_e_f_o_r_e___b_e_g_i_n │ │ │ │ +const_iterator cbefore_begin() const noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_8_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +forward_list & operator=(std::initializer_list< _Tp > __il) │ │ │ │ +The forward_list initializer list assignment operator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_6_4_9 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(std::initializer_list< _Tp > __il, const _Alloc &__al=_Alloc()) │ │ │ │ +Builds a forward_list from an initializer_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_9_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_e_m_p_l_a_c_e___f_r_o_n_t │ │ │ │ +reference emplace_front(_Args &&... __args) │ │ │ │ +Constructs object in forward_list at the front of the list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_8_5_9 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(size_type __n, const _Alloc &__al=_Alloc()) │ │ │ │ +Creates a forward_list with default constructed elements. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_3_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_i_n_s_e_r_t___a_f_t_e_r │ │ │ │ +iterator insert_after(const_iterator __pos, std::initializer_list< _Tp > __il) │ │ │ │ +Inserts the contents of an initializer_list into forward_list after the │ │ │ │ +specified iterator. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_0_0_2 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_e_n_d │ │ │ │ +const_iterator end() const noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_6_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_s_p_l_i_c_e___a_f_t_e_r │ │ │ │ +void splice_after(const_iterator __pos, forward_list &&, const_iterator │ │ │ │ +__before, const_iterator __last) noexcept │ │ │ │ +Insert range from another forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_1_7_2 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_r_o_n_t │ │ │ │ +reference front() │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_8_2_2 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(forward_list &&__list, const __type_identity_t< _Alloc > &__al) │ │ │ │ +noexcept(_Node_alloc_traits::_S_always_equal()) │ │ │ │ +Move constructor with allocator argument. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_1_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_e_r_a_s_e___a_f_t_e_r │ │ │ │ +iterator erase_after(const_iterator __pos, const_iterator __last) │ │ │ │ +Remove a range of elements. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_0_4_6 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_u_n_i_q_u_e │ │ │ │ +__remove_return_type unique() │ │ │ │ +Remove consecutive duplicate elements. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_2_3_6 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_c_l_e_a_r │ │ │ │ void clear() noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_7_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 │ │ │ │ -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_2_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(initializer_list< value_type > __l, size_type __n=0, const │ │ │ │ -hasher &__hf=hasher(), const key_equal &__eql=key_equal(), const allocator_type │ │ │ │ -&__a=allocator_type()) │ │ │ │ -Builds an unordered_multimap from an initializer_list. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_7_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_u_n_t │ │ │ │ -auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -Finds the number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_5_5 │ │ │ │ -_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_3_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_n_d │ │ │ │ -const_local_iterator end(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ -elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_8_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_p_o_i_n_t_e_r │ │ │ │ -_Hashtable::pointer pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_Hashtable::allocator_type allocator_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_8 │ │ │ │ -_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_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -Tries to locate an element in an unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_3_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_local_iterator const_local_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_8_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(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_4_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -_Hashtable::difference_type difference_type │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_8_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_s_i_z_e___t_y_p_e │ │ │ │ -_Hashtable::size_type size_type │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_8_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ -_Hashtable::const_pointer const_pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -__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_8_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ -auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), │ │ │ │ -true) │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_7_3 │ │ │ │ -_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_5_4 │ │ │ │ -_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_2_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_iterator const_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_7_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -void insert(initializer_list< value_type > __l) │ │ │ │ -Attempts to insert a list of elements into the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_4_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_c_e_n_d │ │ │ │ +Erases all the elements. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_1_1_1 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_r_e_m_o_v_e │ │ │ │ +__remove_return_type remove(const _Tp &__val) │ │ │ │ +Remove all elements equal to value. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._t_c_c_:_2_9_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_c_e_n_d │ │ │ │ const_iterator cend() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_5_1_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_m_a_x___s_i_z_e │ │ │ │ -size_type max_size() const noexcept │ │ │ │ -Returns the maximum size of the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_6_6 │ │ │ │ -_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_6_3 │ │ │ │ -_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 │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_9_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_a_s_s_i_g_n │ │ │ │ +void assign(_InputIterator __first, _InputIterator __last) │ │ │ │ +Assigns a range to a forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_6_7_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_e_m_p_t_y │ │ │ │ bool empty() const noexcept │ │ │ │ -Returns true if the unordered_multimap is empty. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_4_5_6 │ │ │ │ -_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_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_k_e_y___t_y_p_e │ │ │ │ -_Hashtable::key_type key_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_3 │ │ │ │ -_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_5_3 │ │ │ │ -_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_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 │ │ │ │ -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_9 │ │ │ │ -_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_6_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(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_6_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __hint, value_type &&__x) │ │ │ │ -Inserts a std::pair into the unordered_multimap. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_6_1_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_8_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___e_q_u_a_l │ │ │ │ -_Hashtable::key_equal key_equal │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_6_7 │ │ │ │ -_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 │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_8_0_3 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_g_e_t___a_l_l_o_c_a_t_o_r │ │ │ │ allocator_type get_allocator() const noexcept │ │ │ │ -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_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 │ │ │ │ -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_1_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_u_l_t_i_m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_9_0_5 │ │ │ │ -_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_1_0 │ │ │ │ -_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_:_6_0_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::iterator iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_2 │ │ │ │ -_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_1_1 │ │ │ │ -_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_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ -bool contains(const key_type &__x) const │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_2_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_x_t_r_a_c_t │ │ │ │ -node_type extract(const key_type &__key) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_4_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_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_2_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_g_e_t___a_l_l_o_c_a_t_o_r │ │ │ │ -allocator_type get_allocator() const noexcept │ │ │ │ -Returns the allocator object used by the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_0_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__x) -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -Tries to locate an element in an unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_8_1 │ │ │ │ -_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_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ -_Hashtable::const_pointer const_pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x)) │ │ │ │ -Tries to locate an element in an unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_9_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_3_4 │ │ │ │ -_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_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -std::pair< 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_8 │ │ │ │ -_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_:_1_0_0_3 │ │ │ │ -_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_7 │ │ │ │ -_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_2_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_x_t_r_a_c_t │ │ │ │ -node_type extract(const_iterator __pos) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_3_2 │ │ │ │ -_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_8 │ │ │ │ -_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_3_3 │ │ │ │ -_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_6_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -std::pair< 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_6_0 │ │ │ │ -_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_5_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::reference reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_0 │ │ │ │ -_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_7 │ │ │ │ -_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_5_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_Hashtable::allocator_type allocator_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_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 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_8 │ │ │ │ -_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_1_2 │ │ │ │ -_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_9 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ -const_iterator find(const key_type &__x) const │ │ │ │ -Tries to locate an element in an unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_8_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(unordered_map &&)=default │ │ │ │ -Move constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_n_d │ │ │ │ -const_local_iterator end(size_type __n) const │ │ │ │ -Returns a read-only (constant) iterator pointing to one past the last bucket │ │ │ │ -elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_8_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__x) -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_5_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_t_a_i_n_s │ │ │ │ -auto contains(const _Kt &__x) const -> decltype(_M_h._M_find_tr(__x), void(), │ │ │ │ -true) │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_3_2 │ │ │ │ -_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_2_2 │ │ │ │ -_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_6_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()=default │ │ │ │ -Default constructor. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_m_a_p_p_e_d___t_y_p_e │ │ │ │ -_Hashtable::mapped_type mapped_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_0 │ │ │ │ -_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_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(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_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_m_p_l_a_c_e │ │ │ │ -std::pair< iterator, bool > emplace(_Args &&... __args) │ │ │ │ -Attempts to build and insert a std::pair into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_9_5 │ │ │ │ -_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_9 │ │ │ │ -_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_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, 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_7_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[](key_type &&__k) │ │ │ │ -Subscript ( [] ) access to unordered_map data. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_9_0 │ │ │ │ -_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_6_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_h_a_s_h_e_r │ │ │ │ -_Hashtable::hasher hasher │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_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 │ │ │ │ -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_6_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_u_n_o_r_d_e_r_e_d___m_a_p │ │ │ │ -unordered_map(_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_9 │ │ │ │ -_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_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ -mapped_type & operator[](const key_type &__k) │ │ │ │ -Subscript ( [] ) access to unordered_map data. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_8_6 │ │ │ │ -_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_8 │ │ │ │ -_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_4_1 │ │ │ │ -_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_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ -_Hashtable::const_reference const_reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_1 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_k_e_y___e_q_u_a_l │ │ │ │ -_Hashtable::key_equal key_equal │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::local_iterator local_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_4 │ │ │ │ -_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_5_2 │ │ │ │ -_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_7 │ │ │ │ -_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_7_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_p_o_i_n_t_e_r │ │ │ │ -_Hashtable::pointer pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_2_8 │ │ │ │ -_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_1_0 │ │ │ │ -_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_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_k_e_y___t_y_p_e │ │ │ │ -_Hashtable::key_type key_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_8 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_b_u_c_k_e_t___c_o_u_n_t │ │ │ │ -size_type bucket_count() const noexcept │ │ │ │ -Returns the number of buckets of the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_0_1_5 │ │ │ │ -_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_3_2 │ │ │ │ -_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_5_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 │ │ │ │ -auto equal_range(const _Kt &__x) const -> decltype(_M_h._M_equal_range_tr(__x)) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_6_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(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_3_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_iterator const_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_3 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_s_i_z_e___t_y_p_e │ │ │ │ -_Hashtable::size_type size_type │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_f_i_n_d │ │ │ │ -iterator find(const key_type &__x) │ │ │ │ -Tries to locate an element in an unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_8_7_5 │ │ │ │ -_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_7 │ │ │ │ -_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_7 │ │ │ │ -_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_1_1 │ │ │ │ -_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_8 │ │ │ │ -_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_1_0_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=(const unordered_map &)=default │ │ │ │ -Copy assignment operator. │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -_Hashtable::difference_type difference_type │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_7 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_u_n_t │ │ │ │ -auto count(const _Kt &__x) const -> decltype(_M_h._M_count_tr(__x)) │ │ │ │ -Finds the number of elements. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_9_1_4 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_o_n_s_t___l_o_c_a_l___i_t_e_r_a_t_o_r │ │ │ │ -_Hashtable::const_local_iterator const_local_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_3_5 │ │ │ │ -_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_2_0 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_e_m_p_l_a_c_e___h_i_n_t │ │ │ │ -iterator emplace_hint(const_iterator __pos, _Args &&... __args) │ │ │ │ -Attempts to build and insert a std::pair into the unordered_map. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_2_6 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_i_n_s_e_r_t │ │ │ │ -insert_return_type insert(node_type &&__nh) │ │ │ │ -Re-insert an extracted node. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_4_4_5 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ -_Hashtable::value_type value_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_1_1_9 │ │ │ │ -_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_2_2 │ │ │ │ -_s_t_d_:_:_u_n_o_r_d_e_r_e_d___m_a_p_:_:_c_b_e_g_i_n │ │ │ │ +Get a copy of the memory allocation object. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_0_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_p_u_s_h___f_r_o_n_t │ │ │ │ +void push_front(const _Tp &__val) │ │ │ │ +Add data to the front of the forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_8_7_9 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(forward_list &&)=default │ │ │ │ +The forward_list move constructor. │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_f_o_r_w_a_r_d___l_i_s_t │ │ │ │ +forward_list(_InputIterator __first, _InputIterator __last, const _Alloc │ │ │ │ +&__al=_Alloc()) │ │ │ │ +Builds a forward_list from a range. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_5_6_0 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_s_p_l_i_c_e___a_f_t_e_r │ │ │ │ +void splice_after(const_iterator __pos, forward_list &, const_iterator │ │ │ │ +__before, const_iterator __last) noexcept │ │ │ │ +Insert range from another forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_1_1_7_7 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_c_b_e_g_i_n │ │ │ │ const_iterator cbegin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _u_n_o_r_d_e_r_e_d___m_a_p_._h_:_3_4_5 │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_7_7_4 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_p_o_p___f_r_o_n_t │ │ │ │ +void pop_front() │ │ │ │ +Removes first element. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_9_0_2 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_a_s_s_i_g_n │ │ │ │ +void assign(std::initializer_list< _Tp > __il) │ │ │ │ +Assigns an initializer_list to a forward_list. │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_6_9_9 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___l_i_s_t_:_:_m_a_x___s_i_z_e │ │ │ │ +size_type max_size() const noexcept │ │ │ │ +DDeeffiinniittiioonn _f_o_r_w_a_r_d___l_i_s_t_._h_:_8_1_1 │ │ │ │ +_s_t_d_:_:_p_o_i_n_t_e_r___t_r_a_i_t_s │ │ │ │ +Uniform interface to all pointer-like types. │ │ │ │ +DDeeffiinniittiioonn _p_t_r___t_r_a_i_t_s_._h_:_1_8_5 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g │ │ │ │ +Forward iterators support a superset of input iterator operations. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_9_9 │ │ │ │ +_s_t_d_:_:_i_t_e_r_a_t_o_r │ │ │ │ +Common iterator class. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_2_8 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ -_h_a_s_h_t_a_b_l_e_._h │ │ │ │ +_____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_:_4_9 │ │ │ │ +_____g_n_u___c_x_x_:_:_____a_l_l_o_c___t_r_a_i_t_s_:_:_a_l_l_o_c_a_t_e │ │ │ │ +static constexpr pointer allocate(_Alloc &__a, size_type __n) │ │ │ │ +Allocate memory. │ │ │ │ +DDeeffiinniittiioonn _b_i_t_s_/_a_l_l_o_c___t_r_a_i_t_s_._h_:_3_3_2 │ │ │ │ +_____g_n_u___c_x_x_:_:_____a_l_l_o_c___t_r_a_i_t_s_:_:_d_e_a_l_l_o_c_a_t_e │ │ │ │ +static constexpr void deallocate(_Alloc &__a, pointer __p, size_type __n) │ │ │ │ +Deallocate memory. │ │ │ │ +DDeeffiinniittiioonn _b_i_t_s_/_a_l_l_o_c___t_r_a_i_t_s_._h_:_3_5_9 │ │ │ │ +_____g_n_u___c_x_x_:_:_____a_l_l_o_c___t_r_a_i_t_s_:_:_m_a_x___s_i_z_e │ │ │ │ +static constexpr size_type max_size(const _Alloc &__a) noexcept │ │ │ │ +The maximum supported allocation size. │ │ │ │ +DDeeffiinniittiioonn _b_i_t_s_/_a_l_l_o_c___t_r_a_i_t_s_._h_:_4_0_4 │ │ │ │ +_a_l_l_o_c___t_r_a_i_t_s_._h │ │ │ │ +_s_t_l___i_t_e_r_a_t_o_r_._h │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_o_r_d_e_r_e_d___m_a_p_._h │ │ │ │ + * _f_o_r_w_a_r_d___l_i_s_t_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00368.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unique_lock.h File Reference │ │ │ +libstdc++: gslice_array.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -48,38 +48,38 @@ │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces
│ │ │ -
unique_lock.h File Reference
│ │ │ +
gslice_array.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

class  std::unique_lock< _Mutex >
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 <mutex>.

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file unique_lock.h.

│ │ │ +

Definition in file gslice_array.h.

│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,17 +1,17 @@ │ │ │ │ libstdc++ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -unique_lock.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_:_:_u_n_i_q_u_e___l_o_c_k_<_ ___M_u_t_e_x_ _> │ │ │ │ +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_n_i_q_u_e___l_o_c_k_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _g_s_l_i_c_e___a_r_r_a_y_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_i_q_u_e___l_o_c_k_._h │ │ │ │ + * _g_s_l_i_c_e___a_r_r_a_y_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00368_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: unique_lock.h Source File │ │ │ +libstdc++: gslice_array.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
unique_lock.h
│ │ │ +
gslice_array.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// std::unique_lock implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// The template and inlines for the -*- C++ -*- gslice_array class.
│ │ │
2
│ │ │ -
3// Copyright (C) 2008-2023 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 1997-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,265 +72,241 @@ │ │ │
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/gslice_array.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{valarray}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _GLIBCXX_UNIQUE_LOCK_H
│ │ │ -
31#define _GLIBCXX_UNIQUE_LOCK_H 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 < 201103L
│ │ │ -
36# include <bits/c++0x_warning.h>
│ │ │ -
37#else
│ │ │ -
38
│ │ │ -
39#include <bits/chrono.h>
│ │ │ -
40#include <bits/move.h> // for std::swap
│ │ │ -
41#include <bits/std_mutex.h> // for std::defer_lock_t
│ │ │ -
42
│ │ │ -
43namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
44{
│ │ │ -
45_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
46
│ │ │ -
47 /** @brief A movable scoped lock type.
│ │ │ +
35#pragma GCC system_header
│ │ │ +
36
│ │ │ +
37namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
38{
│ │ │ +
39_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
40
│ │ │ +
41 /**
│ │ │ +
42 * @addtogroup numeric_arrays
│ │ │ +
43 * @{
│ │ │ +
44 */
│ │ │ +
45
│ │ │ +
46 /**
│ │ │ +
47 * @brief Reference to multi-dimensional subset of an array.
│ │ │
48 *
│ │ │ -
49 * A unique_lock controls mutex ownership within a scope. Ownership of the
│ │ │ -
50 * mutex can be delayed until after construction and can be transferred
│ │ │ -
51 * to another unique_lock by move construction or move assignment. If a
│ │ │ -
52 * mutex lock is owned when the destructor runs ownership will be released.
│ │ │ -
53 *
│ │ │ -
54 * @headerfile mutex
│ │ │ -
55 * @ingroup mutexes
│ │ │ -
56 * @since C++11
│ │ │ -
57 */
│ │ │ -
58 template<typename _Mutex>
│ │ │ -
│ │ │ - │ │ │ -
60 {
│ │ │ -
61 public:
│ │ │ -
62 typedef _Mutex mutex_type;
│ │ │ -
63
│ │ │ -
64 unique_lock() noexcept
│ │ │ -
65 : _M_device(0), _M_owns(false)
│ │ │ -
66 { }
│ │ │ -
67
│ │ │ -
68 explicit unique_lock(mutex_type& __m)
│ │ │ -
69 : _M_device(std::__addressof(__m)), _M_owns(false)
│ │ │ -
70 {
│ │ │ -
71 lock();
│ │ │ -
72 _M_owns = true;
│ │ │ -
73 }
│ │ │ -
74
│ │ │ -
75 unique_lock(mutex_type& __m, defer_lock_t) noexcept
│ │ │ -
76 : _M_device(std::__addressof(__m)), _M_owns(false)
│ │ │ -
77 { }
│ │ │ -
78
│ │ │ -
79 unique_lock(mutex_type& __m, try_to_lock_t)
│ │ │ -
80 : _M_device(std::__addressof(__m)), _M_owns(_M_device->try_lock())
│ │ │ -
81 { }
│ │ │ -
82
│ │ │ -
83 unique_lock(mutex_type& __m, adopt_lock_t) noexcept
│ │ │ -
84 : _M_device(std::__addressof(__m)), _M_owns(true)
│ │ │ -
85 {
│ │ │ -
86 // XXX calling thread owns mutex
│ │ │ -
87 }
│ │ │ -
88
│ │ │ -
89 template<typename _Clock, typename _Duration>
│ │ │ -
90 unique_lock(mutex_type& __m,
│ │ │ - │ │ │ -
92 : _M_device(std::__addressof(__m)),
│ │ │ -
93 _M_owns(_M_device->try_lock_until(__atime))
│ │ │ -
94 { }
│ │ │ -
95
│ │ │ -
96 template<typename _Rep, typename _Period>
│ │ │ -
97 unique_lock(mutex_type& __m,
│ │ │ - │ │ │ -
99 : _M_device(std::__addressof(__m)),
│ │ │ -
100 _M_owns(_M_device->try_lock_for(__rtime))
│ │ │ -
101 { }
│ │ │ -
102
│ │ │ - │ │ │ -
104 {
│ │ │ -
105 if (_M_owns)
│ │ │ -
106 unlock();
│ │ │ -
107 }
│ │ │ -
108
│ │ │ -
109 unique_lock(const unique_lock&) = delete;
│ │ │ -
110 unique_lock& operator=(const unique_lock&) = delete;
│ │ │ -
111
│ │ │ -
112 unique_lock(unique_lock&& __u) noexcept
│ │ │ -
113 : _M_device(__u._M_device), _M_owns(__u._M_owns)
│ │ │ -
114 {
│ │ │ -
115 __u._M_device = 0;
│ │ │ -
116 __u._M_owns = false;
│ │ │ -
117 }
│ │ │ -
118
│ │ │ -
119 unique_lock& operator=(unique_lock&& __u) noexcept
│ │ │ -
120 {
│ │ │ -
121 if(_M_owns)
│ │ │ -
122 unlock();
│ │ │ -
123
│ │ │ -
124 unique_lock(std::move(__u)).swap(*this);
│ │ │ -
125
│ │ │ -
126 __u._M_device = 0;
│ │ │ -
127 __u._M_owns = false;
│ │ │ +
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 return *this;
│ │ │ -
130 }
│ │ │ -
131
│ │ │ -
132 void
│ │ │ -
133 lock()
│ │ │ -
134 {
│ │ │ -
135 if (!_M_device)
│ │ │ -
136 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
137 else if (_M_owns)
│ │ │ -
138 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ -
139 else
│ │ │ -
140 {
│ │ │ -
141 _M_device->lock();
│ │ │ -
142 _M_owns = true;
│ │ │ -
143 }
│ │ │ -
144 }
│ │ │ + │ │ │ +
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
│ │ │ + │ │ │ +
143 const valarray<size_t>& __i)
│ │ │ +
144 : _M_array(__a), _M_index(__i) {}
│ │ │
145
│ │ │ -
146 _GLIBCXX_NODISCARD
│ │ │ -
147 bool
│ │ │ -
148 try_lock()
│ │ │ -
149 {
│ │ │ -
150 if (!_M_device)
│ │ │ -
151 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
152 else if (_M_owns)
│ │ │ -
153 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ -
154 else
│ │ │ -
155 {
│ │ │ -
156 _M_owns = _M_device->try_lock();
│ │ │ -
157 return _M_owns;
│ │ │ -
158 }
│ │ │ -
159 }
│ │ │ +
146 template<typename _Tp>
│ │ │ +
147 inline
│ │ │ +
148 gslice_array<_Tp>::gslice_array(const gslice_array<_Tp>& __a)
│ │ │ +
149 : _M_array(__a._M_array), _M_index(__a._M_index) {}
│ │ │ +
150
│ │ │ +
151 template<typename _Tp>
│ │ │ +
152 inline gslice_array<_Tp>&
│ │ │ +
153 gslice_array<_Tp>::operator=(const gslice_array<_Tp>& __a)
│ │ │ +
154 {
│ │ │ +
155 std::__valarray_copy(_Array<_Tp>(__a._M_array),
│ │ │ +
156 _Array<size_t>(__a._M_index), _M_index.size(),
│ │ │ +
157 _M_array, _Array<size_t>(_M_index));
│ │ │ +
158 return *this;
│ │ │ +
159 }
│ │ │
160
│ │ │ -
161 template<typename _Clock, typename _Duration>
│ │ │ -
162 _GLIBCXX_NODISCARD
│ │ │ -
163 bool
│ │ │ - │ │ │ -
165 {
│ │ │ -
166 if (!_M_device)
│ │ │ -
167 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
168 else if (_M_owns)
│ │ │ -
169 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ -
170 else
│ │ │ -
171 {
│ │ │ -
172 _M_owns = _M_device->try_lock_until(__atime);
│ │ │ -
173 return _M_owns;
│ │ │ -
174 }
│ │ │ -
175 }
│ │ │ -
176
│ │ │ -
177 template<typename _Rep, typename _Period>
│ │ │ -
178 _GLIBCXX_NODISCARD
│ │ │ -
179 bool
│ │ │ -
180 try_lock_for(const chrono::duration<_Rep, _Period>& __rtime)
│ │ │ -
181 {
│ │ │ -
182 if (!_M_device)
│ │ │ -
183 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
184 else if (_M_owns)
│ │ │ -
185 __throw_system_error(int(errc::resource_deadlock_would_occur));
│ │ │ -
186 else
│ │ │ -
187 {
│ │ │ -
188 _M_owns = _M_device->try_lock_for(__rtime);
│ │ │ -
189 return _M_owns;
│ │ │ -
190 }
│ │ │ -
191 }
│ │ │ -
192
│ │ │ -
193 void
│ │ │ -
194 unlock()
│ │ │ -
195 {
│ │ │ -
196 if (!_M_owns)
│ │ │ -
197 __throw_system_error(int(errc::operation_not_permitted));
│ │ │ -
198 else if (_M_device)
│ │ │ -
199 {
│ │ │ -
200 _M_device->unlock();
│ │ │ -
201 _M_owns = false;
│ │ │ -
202 }
│ │ │ -
203 }
│ │ │ -
204
│ │ │ -
205 void
│ │ │ -
206 swap(unique_lock& __u) noexcept
│ │ │ -
207 {
│ │ │ -
208 std::swap(_M_device, __u._M_device);
│ │ │ -
209 std::swap(_M_owns, __u._M_owns);
│ │ │ -
210 }
│ │ │ -
211
│ │ │ -
212 mutex_type*
│ │ │ -
213 release() noexcept
│ │ │ -
214 {
│ │ │ -
215 mutex_type* __ret = _M_device;
│ │ │ -
216 _M_device = 0;
│ │ │ -
217 _M_owns = false;
│ │ │ -
218 return __ret;
│ │ │ -
219 }
│ │ │ -
220
│ │ │ -
221 _GLIBCXX_NODISCARD
│ │ │ -
222 bool
│ │ │ -
223 owns_lock() const noexcept
│ │ │ -
224 { return _M_owns; }
│ │ │ -
225
│ │ │ -
226 explicit operator bool() const noexcept
│ │ │ -
227 { return owns_lock(); }
│ │ │ -
228
│ │ │ -
229 _GLIBCXX_NODISCARD
│ │ │ -
230 mutex_type*
│ │ │ -
231 mutex() const noexcept
│ │ │ -
232 { return _M_device; }
│ │ │ -
233
│ │ │ -
234 private:
│ │ │ -
235 mutex_type* _M_device;
│ │ │ -
236 bool _M_owns;
│ │ │ -
237 };
│ │ │ +
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 }
│ │ │
│ │ │ -
238
│ │ │ -
239 /// Swap overload for unique_lock objects.
│ │ │ -
240 /// @relates unique_lock
│ │ │ -
241 template<typename _Mutex>
│ │ │ -
242 inline void
│ │ │ -
│ │ │ - │ │ │ -
244 { __x.swap(__y); }
│ │ │ +
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 }
│ │ │
│ │ │ -
245
│ │ │ -
246_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
247} // namespace
│ │ │ -
248
│ │ │ -
249#endif // C++11
│ │ │ -
250#endif // _GLIBCXX_UNIQUE_LOCK_H
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:97
│ │ │ -
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ -
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:51
│ │ │ +
176
│ │ │ +
177 template<typename _Tp>
│ │ │ +
178 template<class _Dom>
│ │ │ +
179 inline void
│ │ │ + │ │ │ +
181 {
│ │ │ +
182 std::__valarray_copy (__e, _M_index.size(), _M_array,
│ │ │ +
183 _Array<size_t>(_M_index));
│ │ │ +
184 }
│ │ │ +
185
│ │ │ +
186 /// @cond undocumented
│ │ │ +
187#undef _DEFINE_VALARRAY_OPERATOR
│ │ │ +
188#define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \
│ │ │ +
189 template<typename _Tp> \
│ │ │ +
190 inline void \
│ │ │ +
191 gslice_array<_Tp>::operator _Op##=(const valarray<_Tp>& __v) const \
│ │ │ +
192 { \
│ │ │ +
193 _Array_augmented_##_Name(_M_array, _Array<size_t>(_M_index), \
│ │ │ +
194 _Array<_Tp>(__v), __v.size()); \
│ │ │ +
195 } \
│ │ │ +
196 \
│ │ │ +
197 template<typename _Tp> \
│ │ │ +
198 template<class _Dom> \
│ │ │ +
199 inline void \
│ │ │ +
200 gslice_array<_Tp>::operator _Op##= (const _Expr<_Dom, _Tp>& __e) const\
│ │ │ +
201 { \
│ │ │ +
202 _Array_augmented_##_Name(_M_array, _Array<size_t>(_M_index), __e,\
│ │ │ +
203 _M_index.size()); \
│ │ │ +
204 }
│ │ │ +
205
│ │ │ +
206_DEFINE_VALARRAY_OPERATOR(*, __multiplies)
│ │ │ +
207_DEFINE_VALARRAY_OPERATOR(/, __divides)
│ │ │ +
208_DEFINE_VALARRAY_OPERATOR(%, __modulus)
│ │ │ +
209_DEFINE_VALARRAY_OPERATOR(+, __plus)
│ │ │ +
210_DEFINE_VALARRAY_OPERATOR(-, __minus)
│ │ │ +
211_DEFINE_VALARRAY_OPERATOR(^, __bitwise_xor)
│ │ │ +
212_DEFINE_VALARRAY_OPERATOR(&, __bitwise_and)
│ │ │ +
213_DEFINE_VALARRAY_OPERATOR(|, __bitwise_or)
│ │ │ +
214_DEFINE_VALARRAY_OPERATOR(<<, __shift_left)
│ │ │ +
215_DEFINE_VALARRAY_OPERATOR(>>, __shift_right)
│ │ │ +
216
│ │ │ +
217#undef _DEFINE_VALARRAY_OPERATOR
│ │ │ +
218 /// @endcond
│ │ │ +
219
│ │ │ +
220 /// @} group numeric_arrays
│ │ │ +
221
│ │ │ +
222_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
223} // namespace
│ │ │ +
224
│ │ │ +
225#endif /* _GSLICE_ARRAY_H */
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
chrono::duration represents a distance between two points in time
Definition chrono.h:512
│ │ │ -
chrono::time_point represents a point in time as measured by a clock
Definition chrono.h:923
│ │ │ - │ │ │ -
Do not acquire ownership of the mutex.
Definition std_mutex.h:216
│ │ │ -
Try to acquire ownership of the mutex without blocking.
Definition std_mutex.h:219
│ │ │ -
Assume the calling thread has already obtained mutex ownership and manage it.
Definition std_mutex.h:223
│ │ │ -
A movable scoped lock type.
Definition unique_lock.h:60
│ │ │ -
void swap(unique_lock< _Mutex > &__x, unique_lock< _Mutex > &__y) noexcept
Swap overload for unique_lock objects.
│ │ │ - │ │ │ +
Smart array designed to support numeric processing.
Definition valarray:130
│ │ │ +
Reference to multi-dimensional subset of an array.
│ │ │ +
void operator<<=(const valarray< _Tp > &) const
Left shift slice elements by corresponding elements of v.
│ │ │ +
void operator/=(const valarray< _Tp > &) const
Divide slice elements by corresponding elements of v.
│ │ │ +
gslice_array & operator=(const gslice_array &)
Assignment operator. Assigns slice elements to corresponding elements of a.
│ │ │ +
void operator%=(const valarray< _Tp > &) const
Modulo slice elements by corresponding elements of v.
│ │ │ +
void operator>>=(const valarray< _Tp > &) const
Right shift slice elements by corresponding elements of v.
│ │ │ +
void operator*=(const valarray< _Tp > &) const
Multiply slice elements by corresponding elements of v.
│ │ │ +
void operator|=(const valarray< _Tp > &) const
Logical or slice elements with corresponding elements of v.
│ │ │ +
void operator^=(const valarray< _Tp > &) const
Logical xor slice elements with corresponding elements of v.
│ │ │ +
gslice_array(const gslice_array &)
Copy constructor. Both slices refer to the same underlying array.
│ │ │ +
void operator-=(const valarray< _Tp > &) const
Subtract corresponding elements of v from slice elements.
│ │ │ +
void operator+=(const valarray< _Tp > &) const
Add corresponding elements of v to slice elements.
│ │ │ +
void operator&=(const valarray< _Tp > &) const
Logical and slice elements with corresponding elements of v.
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -unique_lock.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// std::unique_lock implementation -*- C++ -*- │ │ │ │ +1// The template and inlines for the -*- C++ -*- gslice_array class. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2008-2023 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 1997-2023 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,280 +21,257 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/unique_lock.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{mutex} │ │ │ │ +27 * Do not attempt to use it directly. @headername{valarray} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _GLIBCXX_UNIQUE_LOCK_H │ │ │ │ -31#define _GLIBCXX_UNIQUE_LOCK_H 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 < 201103L │ │ │ │ -36# include <_b_i_t_s_/_c_+_+_0_x___w_a_r_n_i_n_g_._h> │ │ │ │ -37#else │ │ │ │ -38 │ │ │ │ -39#include <_b_i_t_s_/_c_h_r_o_n_o_._h> │ │ │ │ -40#include <_b_i_t_s_/_m_o_v_e_._h> // for std::swap │ │ │ │ -41#include <_b_i_t_s_/_s_t_d___m_u_t_e_x_._h> // for std::defer_lock_t │ │ │ │ -42 │ │ │ │ -43namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -44{ │ │ │ │ -45_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -46 │ │ │ │ -47 /** @brief A movable scoped lock type. │ │ │ │ +35#pragma GCC system_header │ │ │ │ +36 │ │ │ │ +37namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +38{ │ │ │ │ +39_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +40 │ │ │ │ +41 /** │ │ │ │ +42 * @addtogroup numeric_arrays │ │ │ │ +43 * @{ │ │ │ │ +44 */ │ │ │ │ +45 │ │ │ │ +46 /** │ │ │ │ +47 * @brief Reference to multi-dimensional subset of an array. │ │ │ │ 48 * │ │ │ │ -49 * A unique_lock controls mutex ownership within a scope. Ownership of the │ │ │ │ -50 * mutex can be delayed until after construction and can be transferred │ │ │ │ -51 * to another unique_lock by move construction or move assignment. If a │ │ │ │ -52 * mutex lock is owned when the destructor runs ownership will be released. │ │ │ │ -53 * │ │ │ │ -54 * @headerfile mutex │ │ │ │ -55 * @ingroup mutexes │ │ │ │ -56 * @since C++11 │ │ │ │ -57 */ │ │ │ │ -58 template │ │ │ │ -_5_9 class _u_n_i_q_u_e___l_o_c_k │ │ │ │ -60 { │ │ │ │ -61 public: │ │ │ │ -62 typedef ___M_u_t_e_x mutex_type; │ │ │ │ -63 │ │ │ │ -64 _u_n_i_q_u_e___l_o_c_k() noexcept │ │ │ │ -65 : _M_device(0), _M_owns(false) │ │ │ │ -66 { } │ │ │ │ +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 explicit _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m) │ │ │ │ -69 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), _M_owns(false) │ │ │ │ -70 { │ │ │ │ -71 lock(); │ │ │ │ -72 _M_owns = true; │ │ │ │ -73 } │ │ │ │ +68 /// Copy constructor. Both slices refer to the same underlying array. │ │ │ │ +_6_9 _g_s_l_i_c_e___a_r_r_a_y(const _g_s_l_i_c_e___a_r_r_a_y&); │ │ │ │ +70 │ │ │ │ +71 /// Assignment operator. Assigns slice elements to corresponding │ │ │ │ +72 /// elements of @a a. │ │ │ │ +_7_3 _g_s_l_i_c_e___a_r_r_a_y& _o_p_e_r_a_t_o_r_=(const _g_s_l_i_c_e___a_r_r_a_y&); │ │ │ │ 74 │ │ │ │ -75 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, _d_e_f_e_r___l_o_c_k___t) noexcept │ │ │ │ -76 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), _M_owns(false) │ │ │ │ -77 { } │ │ │ │ -78 │ │ │ │ -79 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, _t_r_y___t_o___l_o_c_k___t) │ │ │ │ -80 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), _M_owns(_M_device->try_lock()) │ │ │ │ -81 { } │ │ │ │ -82 │ │ │ │ -83 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, _a_d_o_p_t___l_o_c_k___t) noexcept │ │ │ │ -84 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), _M_owns(true) │ │ │ │ -85 { │ │ │ │ -86 // XXX calling thread owns mutex │ │ │ │ -87 } │ │ │ │ -88 │ │ │ │ -89 template │ │ │ │ -90 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, │ │ │ │ -91 const _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_>& _____a_t_i_m_e) │ │ │ │ -92 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), │ │ │ │ -93 _M_owns(_M_device->try_lock_until(_____a_t_i_m_e)) │ │ │ │ -94 { } │ │ │ │ -95 │ │ │ │ -96 template │ │ │ │ -97 _u_n_i_q_u_e___l_o_c_k(mutex_type& _____m, │ │ │ │ -98 const _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& _____r_t_i_m_e) │ │ │ │ -99 : _M_device(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____m)), │ │ │ │ -100 _M_owns(_M_device->try_lock_for(_____r_t_i_m_e)) │ │ │ │ -101 { } │ │ │ │ -102 │ │ │ │ -103 _~_u_n_i_q_u_e___l_o_c_k() │ │ │ │ -104 { │ │ │ │ -105 if (_M_owns) │ │ │ │ -106 unlock(); │ │ │ │ -107 } │ │ │ │ -108 │ │ │ │ -109 _u_n_i_q_u_e___l_o_c_k(const _u_n_i_q_u_e___l_o_c_k&) = delete; │ │ │ │ -110 _u_n_i_q_u_e___l_o_c_k& operator=(const _u_n_i_q_u_e___l_o_c_k&) = delete; │ │ │ │ -111 │ │ │ │ -112 _u_n_i_q_u_e___l_o_c_k(_u_n_i_q_u_e___l_o_c_k&& _____u) noexcept │ │ │ │ -113 : _M_device(_____u._M_device), _M_owns(_____u._M_owns) │ │ │ │ -114 { │ │ │ │ -115 _____u._M_device = 0; │ │ │ │ -116 _____u._M_owns = false; │ │ │ │ -117 } │ │ │ │ -118 │ │ │ │ -119 _u_n_i_q_u_e___l_o_c_k& operator=(_u_n_i_q_u_e___l_o_c_k&& _____u) noexcept │ │ │ │ -120 { │ │ │ │ -121 if(_M_owns) │ │ │ │ -122 unlock(); │ │ │ │ -123 │ │ │ │ -124 _u_n_i_q_u_e___l_o_c_k(_s_t_d_:_:_m_o_v_e(_____u)).swap(*this); │ │ │ │ -125 │ │ │ │ -126 _____u._M_device = 0; │ │ │ │ -127 _____u._M_owns = false; │ │ │ │ +75 /// Assign slice elements to corresponding elements of @a v. │ │ │ │ +76 void _o_p_e_r_a_t_o_r_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +77 /// Multiply slice elements by corresponding elements of @a v. │ │ │ │ +_7_8 void _o_p_e_r_a_t_o_r_*_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +79 /// Divide slice elements by corresponding elements of @a v. │ │ │ │ +_8_0 void _o_p_e_r_a_t_o_r_/_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +81 /// Modulo slice elements by corresponding elements of @a v. │ │ │ │ +_8_2 void _o_p_e_r_a_t_o_r_%_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +83 /// Add corresponding elements of @a v to slice elements. │ │ │ │ +_8_4 void _o_p_e_r_a_t_o_r_+_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +85 /// Subtract corresponding elements of @a v from slice elements. │ │ │ │ +_8_6 void _o_p_e_r_a_t_o_r_-_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +87 /// Logical xor slice elements with corresponding elements of @a v. │ │ │ │ +_8_8 void _o_p_e_r_a_t_o_r_^_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +89 /// Logical and slice elements with corresponding elements of @a v. │ │ │ │ +_9_0 void _o_p_e_r_a_t_o_r_&_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +91 /// Logical or slice elements with corresponding elements of @a v. │ │ │ │ +_9_2 void _o_p_e_r_a_t_o_r_|_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +93 /// Left shift slice elements by corresponding elements of @a v. │ │ │ │ +_9_4 void _o_p_e_r_a_t_o_r_<_<_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +95 /// Right shift slice elements by corresponding elements of @a v. │ │ │ │ +_9_6 void _o_p_e_r_a_t_o_r_>_>_=(const _v_a_l_a_r_r_a_y_<___T_p_>&) const; │ │ │ │ +97 /// Assign all slice elements to @a t. │ │ │ │ +98 void _o_p_e_r_a_t_o_r_=(const _Tp&) const; │ │ │ │ +99 │ │ │ │ +100 template │ │ │ │ +101 void _o_p_e_r_a_t_o_r_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +102 template │ │ │ │ +103 void _o_p_e_r_a_t_o_r_*_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +104 template │ │ │ │ +105 void _o_p_e_r_a_t_o_r_/_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +106 template │ │ │ │ +107 void _o_p_e_r_a_t_o_r_%_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +108 template │ │ │ │ +109 void _o_p_e_r_a_t_o_r_+_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +110 template │ │ │ │ +111 void _o_p_e_r_a_t_o_r_-_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +112 template │ │ │ │ +113 void _o_p_e_r_a_t_o_r_^_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +114 template │ │ │ │ +115 void _o_p_e_r_a_t_o_r_&_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +116 template │ │ │ │ +117 void _o_p_e_r_a_t_o_r_|_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +118 template │ │ │ │ +119 void _o_p_e_r_a_t_o_r_<_<_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +120 template │ │ │ │ +121 void _o_p_e_r_a_t_o_r_>_>_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>&) const; │ │ │ │ +122 │ │ │ │ +123 private: │ │ │ │ +124 ___A_r_r_a_y_<___T_p_> _M_array; │ │ │ │ +125 const _v_a_l_a_r_r_a_y_<_s_i_z_e___t_>& _M_index; │ │ │ │ +126 │ │ │ │ +127 friend class _v_a_l_a_r_r_a_y<_Tp>; │ │ │ │ 128 │ │ │ │ -129 return *this; │ │ │ │ -130 } │ │ │ │ -131 │ │ │ │ -132 void │ │ │ │ -133 lock() │ │ │ │ -134 { │ │ │ │ -135 if (!_M_device) │ │ │ │ -136 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -137 else if (_M_owns) │ │ │ │ -138 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ -139 else │ │ │ │ -140 { │ │ │ │ -141 _M_device->lock(); │ │ │ │ -142 _M_owns = true; │ │ │ │ -143 } │ │ │ │ -144 } │ │ │ │ +129 _g_s_l_i_c_e___a_r_r_a_y(___A_r_r_a_y_<___T_p_>, const _v_a_l_a_r_r_a_y_<_s_i_z_e___t_>&); │ │ │ │ +130 │ │ │ │ +131#if __cplusplus < 201103L │ │ │ │ +132 // not implemented │ │ │ │ +133 _g_s_l_i_c_e___a_r_r_a_y(); │ │ │ │ +134#else │ │ │ │ +135 public: │ │ │ │ +136 _g_s_l_i_c_e___a_r_r_a_y() = delete; │ │ │ │ +137#endif │ │ │ │ +138 }; │ │ │ │ +139 │ │ │ │ +140 template │ │ │ │ +141 inline │ │ │ │ +142 _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>_:_:_g_s_l_i_c_e___a_r_r_a_y(___A_r_r_a_y_<___T_p_> __a, │ │ │ │ +143 const _v_a_l_a_r_r_a_y_<_s_i_z_e___t_>& __i) │ │ │ │ +144 : _M_array(__a), _M_index(__i) {} │ │ │ │ 145 │ │ │ │ -146 _GLIBCXX_NODISCARD │ │ │ │ -147 bool │ │ │ │ -148 try_lock() │ │ │ │ -149 { │ │ │ │ -150 if (!_M_device) │ │ │ │ -151 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -152 else if (_M_owns) │ │ │ │ -153 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ -154 else │ │ │ │ -155 { │ │ │ │ -156 _M_owns = _M_device->try_lock(); │ │ │ │ -157 return _M_owns; │ │ │ │ -158 } │ │ │ │ +146 template │ │ │ │ +147 inline │ │ │ │ +148 gslice_array<_Tp>::gslice_array(const gslice_array<_Tp>& __a) │ │ │ │ +149 : _M_array(__a._M_array), _M_index(__a._M_index) {} │ │ │ │ +150 │ │ │ │ +151 template │ │ │ │ +152 inline gslice_array<_Tp>& │ │ │ │ +153 _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>_:_:_o_p_e_r_a_t_o_r_=(const gslice_array<_Tp>& __a) │ │ │ │ +154 { │ │ │ │ +155 std::__valarray_copy(_Array<_Tp>(__a._M_array), │ │ │ │ +156 _Array(__a._M_index), _M_index.size(), │ │ │ │ +157 _M_array, _Array(_M_index)); │ │ │ │ +158 return *this; │ │ │ │ 159 } │ │ │ │ 160 │ │ │ │ -161 template │ │ │ │ -162 _GLIBCXX_NODISCARD │ │ │ │ -163 bool │ │ │ │ -164 try_lock_until(const _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_>& _____a_t_i_m_e) │ │ │ │ -165 { │ │ │ │ -166 if (!_M_device) │ │ │ │ -167 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -168 else if (_M_owns) │ │ │ │ -169 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ -170 else │ │ │ │ -171 { │ │ │ │ -172 _M_owns = _M_device->try_lock_until(_____a_t_i_m_e); │ │ │ │ -173 return _M_owns; │ │ │ │ -174 } │ │ │ │ +161 template │ │ │ │ +162 inline void │ │ │ │ +_1_6_3 _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>_:_:_o_p_e_r_a_t_o_r_=(const _Tp& __t) const │ │ │ │ +164 { │ │ │ │ +165 std::__valarray_fill(_M_array, ___A_r_r_a_y_<_s_i_z_e___t_>(_M_index), │ │ │ │ +166 _M_index.size(), __t); │ │ │ │ +167 } │ │ │ │ +168 │ │ │ │ +169 template │ │ │ │ +170 inline void │ │ │ │ +_1_7_1 _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>_:_:_o_p_e_r_a_t_o_r_=(const _v_a_l_a_r_r_a_y_<___T_p_>& _____v) const │ │ │ │ +172 { │ │ │ │ +173 std::__valarray_copy(___A_r_r_a_y_<___T_p_>(_____v), _____v.size(), │ │ │ │ +174 _M_array, ___A_r_r_a_y_<_s_i_z_e___t_>(_M_index)); │ │ │ │ 175 } │ │ │ │ 176 │ │ │ │ -177 template │ │ │ │ -178 _GLIBCXX_NODISCARD │ │ │ │ -179 bool │ │ │ │ -180 try_lock_for(const _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& _____r_t_i_m_e) │ │ │ │ +177 template │ │ │ │ +178 template │ │ │ │ +179 inline void │ │ │ │ +180 _g_s_l_i_c_e___a_r_r_a_y_<___T_p_>_:_:_o_p_e_r_a_t_o_r_=(const ___E_x_p_r_<___D_o_m_,_ ___T_p_>& __e) const │ │ │ │ 181 { │ │ │ │ -182 if (!_M_device) │ │ │ │ -183 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -184 else if (_M_owns) │ │ │ │ -185 __throw_system_error(int(errc::resource_deadlock_would_occur)); │ │ │ │ -186 else │ │ │ │ -187 { │ │ │ │ -188 _M_owns = _M_device->try_lock_for(_____r_t_i_m_e); │ │ │ │ -189 return _M_owns; │ │ │ │ -190 } │ │ │ │ -191 } │ │ │ │ -192 │ │ │ │ -193 void │ │ │ │ -194 unlock() │ │ │ │ -195 { │ │ │ │ -196 if (!_M_owns) │ │ │ │ -197 __throw_system_error(int(errc::operation_not_permitted)); │ │ │ │ -198 else if (_M_device) │ │ │ │ -199 { │ │ │ │ -200 _M_device->unlock(); │ │ │ │ -201 _M_owns = false; │ │ │ │ -202 } │ │ │ │ -203 } │ │ │ │ -204 │ │ │ │ -205 void │ │ │ │ -206 swap(_u_n_i_q_u_e___l_o_c_k& _____u) noexcept │ │ │ │ -207 { │ │ │ │ -208 _s_t_d_:_:_s_w_a_p(_M_device, _____u._M_device); │ │ │ │ -209 _s_t_d_:_:_s_w_a_p(_M_owns, _____u._M_owns); │ │ │ │ -210 } │ │ │ │ -211 │ │ │ │ -212 mutex_type* │ │ │ │ -213 release() noexcept │ │ │ │ -214 { │ │ │ │ -215 mutex_type* _____r_e_t = _M_device; │ │ │ │ -216 _M_device = 0; │ │ │ │ -217 _M_owns = false; │ │ │ │ -218 return _____r_e_t; │ │ │ │ -219 } │ │ │ │ -220 │ │ │ │ -221 _GLIBCXX_NODISCARD │ │ │ │ -222 bool │ │ │ │ -223 owns_lock() const noexcept │ │ │ │ -224 { return _M_owns; } │ │ │ │ -225 │ │ │ │ -226 explicit operator bool() const noexcept │ │ │ │ -227 { return owns_lock(); } │ │ │ │ -228 │ │ │ │ -229 _GLIBCXX_NODISCARD │ │ │ │ -230 mutex_type* │ │ │ │ -231 _m_u_t_e_x() const noexcept │ │ │ │ -232 { return _M_device; } │ │ │ │ -233 │ │ │ │ -234 private: │ │ │ │ -235 mutex_type* _M_device; │ │ │ │ -236 bool _M_owns; │ │ │ │ -237 }; │ │ │ │ -238 │ │ │ │ -239 /// Swap overload for unique_lock objects. │ │ │ │ -240 /// @relates unique_lock │ │ │ │ -241 template │ │ │ │ -242 inline void │ │ │ │ -_2_4_3 _s_w_a_p(_u_n_i_q_u_e___l_o_c_k_<___M_u_t_e_x_>& __x, _u_n_i_q_u_e___l_o_c_k_<___M_u_t_e_x_>& __y) noexcept │ │ │ │ -244 { __x.swap(__y); } │ │ │ │ -245 │ │ │ │ -246_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -247} // namespace │ │ │ │ -248 │ │ │ │ -249#endif // C++11 │ │ │ │ -250#endif // _GLIBCXX_UNIQUE_LOCK_H │ │ │ │ -_s_t_d___m_u_t_e_x_._h │ │ │ │ -_c_h_r_o_n_o_._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_:_9_7 │ │ │ │ -_s_t_d_:_:_s_w_a_p │ │ │ │ -void swap(any &__x, any &__y) noexcept │ │ │ │ -Exchange the states of two any objects. │ │ │ │ -DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ -_s_t_d_:_:_____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_:_5_1 │ │ │ │ +182 std::__valarray_copy (__e, _M_index.size(), _M_array, │ │ │ │ +183 ___A_r_r_a_y_<_s_i_z_e___t_>(_M_index)); │ │ │ │ +184 } │ │ │ │ +185 │ │ │ │ +186 /// @cond undocumented │ │ │ │ +187#undef _DEFINE_VALARRAY_OPERATOR │ │ │ │ +188#define _DEFINE_VALARRAY_OPERATOR(_Op, _Name) \ │ │ │ │ +189 template \ │ │ │ │ +190 inline void \ │ │ │ │ +191 gslice_array<_Tp>::operator _Op##=(const valarray<_Tp>& __v) const \ │ │ │ │ +192 { \ │ │ │ │ +193 _Array_augmented_##_Name(_M_array, _Array(_M_index), \ │ │ │ │ +194 _Array<_Tp>(__v), __v.size()); \ │ │ │ │ +195 } \ │ │ │ │ +196 \ │ │ │ │ +197 template \ │ │ │ │ +198 template \ │ │ │ │ +199 inline void \ │ │ │ │ +200 gslice_array<_Tp>::operator _Op##= (const _Expr<_Dom, _Tp>& __e) const\ │ │ │ │ +201 { \ │ │ │ │ +202 _Array_augmented_##_Name(_M_array, _Array(_M_index), __e,\ │ │ │ │ +203 _M_index.size()); \ │ │ │ │ +204 } │ │ │ │ +205 │ │ │ │ +206_DEFINE_VALARRAY_OPERATOR(*, __multiplies) │ │ │ │ +207_DEFINE_VALARRAY_OPERATOR(/, __divides) │ │ │ │ +208_DEFINE_VALARRAY_OPERATOR(%, __modulus) │ │ │ │ +209_DEFINE_VALARRAY_OPERATOR(+, __plus) │ │ │ │ +210_DEFINE_VALARRAY_OPERATOR(-, __minus) │ │ │ │ +211_DEFINE_VALARRAY_OPERATOR(^, __bitwise_xor) │ │ │ │ +212_DEFINE_VALARRAY_OPERATOR(&, __bitwise_and) │ │ │ │ +213_DEFINE_VALARRAY_OPERATOR(|, __bitwise_or) │ │ │ │ +214_DEFINE_VALARRAY_OPERATOR(<<, __shift_left) │ │ │ │ +215_DEFINE_VALARRAY_OPERATOR(>>, __shift_right) │ │ │ │ +216 │ │ │ │ +217#undef _DEFINE_VALARRAY_OPERATOR │ │ │ │ +218 /// @endcond │ │ │ │ +219 │ │ │ │ +220 /// @} group numeric_arrays │ │ │ │ +221 │ │ │ │ +222_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +223} // namespace │ │ │ │ +224 │ │ │ │ +225#endif /* _GSLICE_ARRAY_H */ │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n │ │ │ │ -chrono::duration represents a distance between two points in time │ │ │ │ -DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_5_1_2 │ │ │ │ -_s_t_d_:_:_c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t │ │ │ │ -chrono::time_point represents a point in time as measured by a clock │ │ │ │ -DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_9_2_3 │ │ │ │ -_s_t_d_:_:_m_u_t_e_x │ │ │ │ -DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_9_7 │ │ │ │ -_s_t_d_:_:_d_e_f_e_r___l_o_c_k___t │ │ │ │ -Do not acquire ownership of the mutex. │ │ │ │ -DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_1_6 │ │ │ │ -_s_t_d_:_:_t_r_y___t_o___l_o_c_k___t │ │ │ │ -Try to acquire ownership of the mutex without blocking. │ │ │ │ -DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_1_9 │ │ │ │ -_s_t_d_:_:_a_d_o_p_t___l_o_c_k___t │ │ │ │ -Assume the calling thread has already obtained mutex ownership and manage it. │ │ │ │ -DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_2_3 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___l_o_c_k │ │ │ │ -A movable scoped lock type. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___l_o_c_k_._h_:_6_0 │ │ │ │ -_s_t_d_:_:_u_n_i_q_u_e___l_o_c_k_:_:_s_w_a_p │ │ │ │ -void swap(unique_lock< _Mutex > &__x, unique_lock< _Mutex > &__y) noexcept │ │ │ │ -Swap overload for unique_lock objects. │ │ │ │ -DDeeffiinniittiioonn _u_n_i_q_u_e___l_o_c_k_._h_:_2_4_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_3_0 │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y │ │ │ │ +Reference to multi-dimensional subset of an array. │ │ │ │ +DDeeffiinniittiioonn _g_s_l_i_c_e___a_r_r_a_y_._h_:_6_1 │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_<_<_= │ │ │ │ +void operator<<=(const valarray< _Tp > &) const │ │ │ │ +Left shift slice elements by corresponding elements of v. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_/_= │ │ │ │ +void operator/=(const valarray< _Tp > &) const │ │ │ │ +Divide slice elements by corresponding elements of v. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +gslice_array & operator=(const gslice_array &) │ │ │ │ +Assignment operator. Assigns slice elements to corresponding elements of a. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_%_= │ │ │ │ +void operator%=(const valarray< _Tp > &) const │ │ │ │ +Modulo slice elements by corresponding elements of v. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_>_>_= │ │ │ │ +void operator>>=(const valarray< _Tp > &) const │ │ │ │ +Right shift slice elements by corresponding elements of v. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_*_= │ │ │ │ +void operator*=(const valarray< _Tp > &) const │ │ │ │ +Multiply slice elements by corresponding elements of v. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_|_= │ │ │ │ +void operator|=(const valarray< _Tp > &) const │ │ │ │ +Logical or slice elements with corresponding elements of v. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_^_= │ │ │ │ +void operator^=(const valarray< _Tp > &) const │ │ │ │ +Logical xor slice elements with corresponding elements of v. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_g_s_l_i_c_e___a_r_r_a_y │ │ │ │ +gslice_array(const gslice_array &) │ │ │ │ +Copy constructor. Both slices refer to the same underlying array. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_-_= │ │ │ │ +void operator-=(const valarray< _Tp > &) const │ │ │ │ +Subtract corresponding elements of v from slice elements. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_+_= │ │ │ │ +void operator+=(const valarray< _Tp > &) const │ │ │ │ +Add corresponding elements of v to slice elements. │ │ │ │ +_s_t_d_:_:_g_s_l_i_c_e___a_r_r_a_y_:_:_o_p_e_r_a_t_o_r_&_= │ │ │ │ +void operator&=(const valarray< _Tp > &) const │ │ │ │ +Logical and slice elements with corresponding elements of v. │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _u_n_i_q_u_e___l_o_c_k_._h │ │ │ │ + * _g_s_l_i_c_e___a_r_r_a_y_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00371.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: this_thread_sleep.h File Reference │ │ │ +libstdc++: stream_iterator.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,46 +46,42 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00371.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
this_thread_sleep.h File Reference
│ │ │ +Classes | │ │ │ +Namespaces
│ │ │ +
stream_iterator.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 >
 
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │ -

│ │ │ Namespaces

namespace  std
 
namespace  std::this_thread
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │

│ │ │ -Functions

template<typename _Rep , typename _Period >
void std::this_thread::sleep_for (const chrono::duration< _Rep, _Period > &__rtime)
 
template<typename _Clock , typename _Duration >
void std::this_thread::sleep_until (const chrono::time_point< _Clock, _Duration > &__atime)
 
│ │ │

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file this_thread_sleep.h.

│ │ │ +

Definition in file stream_iterator.h.

│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,25 +1,19 @@ │ │ │ │ libstdc++ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -this_thread_sleep.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ +stream_iterator.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _s_t_d │ │ │ │ -  │ │ │ │ -namespace   _s_t_d_:_:_t_h_i_s___t_h_r_e_a_d │ │ │ │ +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_ _> │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e _Rep , _t_y_p_e_n_a_m_e ___P_e_r_i_o_d > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_t_h_i_s___t_h_r_e_a_d_:_:_s_l_e_e_p___f_o_r (const _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n< _Rep, ___P_e_r_i_o_d > │ │ │ │ - &_____r_t_i_m_e) │ │ │ │ +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_ _> │ │ │ │   │ │ │ │ -template<_t_y_p_e_n_a_m_e ___C_l_o_c_k , _t_y_p_e_n_a_m_e ___D_u_r_a_t_i_o_n > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_t_h_i_s___t_h_r_e_a_d_:_:_s_l_e_e_p___u_n_t_i_l (const _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t< ___C_l_o_c_k, │ │ │ │ - ___D_u_r_a_t_i_o_n > &_____a_t_i_m_e) │ │ │ │ +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 _t_h_i_s___t_h_r_e_a_d___s_l_e_e_p_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _t_h_i_s___t_h_r_e_a_d___s_l_e_e_p_._h │ │ │ │ + * _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00371_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: this_thread_sleep.h Source File │ │ │ +libstdc++: stream_iterator.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
this_thread_sleep.h
│ │ │ +
stream_iterator.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// std::this_thread::sleep_for/until declarations -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// Stream iterators
│ │ │
2
│ │ │ -
3// Copyright (C) 2008-2023 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2001-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,125 +72,309 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/this_thread_sleep.h
│ │ │ +
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{thread}
│ │ │ +
27 * Do not attempt to use it directly. @headername{iterator}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _GLIBCXX_THIS_THREAD_SLEEP_H
│ │ │ -
31#define _GLIBCXX_THIS_THREAD_SLEEP_H 1
│ │ │ +
30#ifndef _STREAM_ITERATOR_H
│ │ │ +
31#define _STREAM_ITERATOR_H 1
│ │ │
32
│ │ │
33#pragma GCC system_header
│ │ │
34
│ │ │ -
35#if __cplusplus >= 201103L
│ │ │ -
36#include <bits/chrono.h> // std::chrono::*
│ │ │ -
37
│ │ │ -
38#ifdef _GLIBCXX_USE_NANOSLEEP
│ │ │ -
39# include <cerrno> // errno, EINTR
│ │ │ -
40# include <time.h> // nanosleep
│ │ │ -
41#endif
│ │ │ -
42
│ │ │ -
43namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
44{
│ │ │ -
45_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
46
│ │ │ -
47 /** @addtogroup threads
│ │ │ -
48 * @{
│ │ │ -
49 */
│ │ │ -
50
│ │ │ -
51 /** @namespace std::this_thread
│ │ │ -
52 * @brief ISO C++ 2011 namespace for interacting with the current thread
│ │ │ -
53 *
│ │ │ -
54 * C++11 30.3.2 [thread.thread.this] Namespace this_thread.
│ │ │ -
55 */
│ │ │ -
56 namespace this_thread
│ │ │ -
57 {
│ │ │ -
58#ifndef _GLIBCXX_NO_SLEEP
│ │ │ -
59
│ │ │ -
60#ifndef _GLIBCXX_USE_NANOSLEEP
│ │ │ -
61 void
│ │ │ - │ │ │ -
63#endif
│ │ │ -
64
│ │ │ -
65 /// this_thread::sleep_for
│ │ │ -
66 template<typename _Rep, typename _Period>
│ │ │ -
67 inline void
│ │ │ -
│ │ │ - │ │ │ -
69 {
│ │ │ -
70 if (__rtime <= __rtime.zero())
│ │ │ -
71 return;
│ │ │ -
72 auto __s = chrono::duration_cast<chrono::seconds>(__rtime);
│ │ │ -
73 auto __ns = chrono::duration_cast<chrono::nanoseconds>(__rtime - __s);
│ │ │ -
74#ifdef _GLIBCXX_USE_NANOSLEEP
│ │ │ -
75 struct ::timespec __ts =
│ │ │ -
76 {
│ │ │ -
77 static_cast<std::time_t>(__s.count()),
│ │ │ -
78 static_cast<long>(__ns.count())
│ │ │ -
79 };
│ │ │ -
80 while (::nanosleep(&__ts, &__ts) == -1 && errno == EINTR)
│ │ │ -
81 { }
│ │ │ -
82#else
│ │ │ - │ │ │ -
84#endif
│ │ │ -
85 }
│ │ │ -
│ │ │ -
86
│ │ │ -
87 /// this_thread::sleep_until
│ │ │ -
88 template<typename _Clock, typename _Duration>
│ │ │ -
89 inline void
│ │ │ -
│ │ │ - │ │ │ -
91 {
│ │ │ -
92#if __cplusplus > 201703L
│ │ │ -
93 static_assert(chrono::is_clock_v<_Clock>);
│ │ │ -
94#endif
│ │ │ -
95 auto __now = _Clock::now();
│ │ │ -
96 if (_Clock::is_steady)
│ │ │ -
97 {
│ │ │ -
98 if (__now < __atime)
│ │ │ - │ │ │ -
100 return;
│ │ │ -
101 }
│ │ │ -
102 while (__now < __atime)
│ │ │ -
103 {
│ │ │ - │ │ │ -
105 __now = _Clock::now();
│ │ │ -
106 }
│ │ │ -
107 }
│ │ │ -
│ │ │ -
108#endif // ! NO_SLEEP
│ │ │ -
109 } // namespace this_thread
│ │ │ -
110
│ │ │ -
111 /// @}
│ │ │ -
112
│ │ │ -
113_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
114} // namespace
│ │ │ -
115#endif // C++11
│ │ │ +
35#include <iosfwd>
│ │ │ +
36#include <bits/move.h>
│ │ │ + │ │ │ +
38#include <debug/debug.h>
│ │ │ +
39
│ │ │ +
40namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
41{
│ │ │ +
42_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
43
│ │ │ +
44 /**
│ │ │ +
45 * @addtogroup iterators
│ │ │ +
46 * @{
│ │ │ +
47 */
│ │ │ +
48
│ │ │ +
49// Ignore warnings about std::iterator.
│ │ │ +
50#pragma GCC diagnostic push
│ │ │ +
51#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
52
│ │ │ +
53 /// Provides input iterator semantics for streams.
│ │ │ +
54 template<typename _Tp, typename _CharT = char,
│ │ │ +
55 typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t>
│ │ │ +
│ │ │ + │ │ │ +
57 : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&>
│ │ │ +
58 {
│ │ │ +
59 public:
│ │ │ +
60 typedef _CharT char_type;
│ │ │ +
61 typedef _Traits traits_type;
│ │ │ + │ │ │ +
63
│ │ │ +
64 private:
│ │ │ +
65 istream_type* _M_stream;
│ │ │ +
66 _Tp _M_value;
│ │ │ +
67 // This bool becomes false at end-of-stream. It should be sufficient to
│ │ │ +
68 // check _M_stream != nullptr instead, but historically we did not set
│ │ │ +
69 // _M_stream to null when reaching the end, so we need to keep this flag.
│ │ │ +
70 bool _M_ok;
│ │ │ +
71
│ │ │ +
72 public:
│ │ │ +
73 /// Construct end of input stream iterator.
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
76 : _M_stream(0), _M_value(), _M_ok(false) {}
│ │ │ +
│ │ │ +
77
│ │ │ +
78 /// Construct start of input stream iterator.
│ │ │ +
│ │ │ + │ │ │ +
80 : _M_stream(std::__addressof(__s)), _M_ok(true)
│ │ │ +
81 { _M_read(); }
│ │ │ +
│ │ │ +
82
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
86 : _M_stream(__obj._M_stream), _M_value(__obj._M_value),
│ │ │ +
87 _M_ok(__obj._M_ok)
│ │ │ +
88 { }
│ │ │ +
89
│ │ │ +
90#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ +
91 constexpr
│ │ │ +
92 istream_iterator(default_sentinel_t)
│ │ │ +
93 noexcept(is_nothrow_default_constructible_v<_Tp>)
│ │ │ +
94 : istream_iterator() { }
│ │ │ +
95#endif
│ │ │ +
96
│ │ │ +
97#if __cplusplus >= 201103L
│ │ │ +
98 istream_iterator& operator=(const istream_iterator&) = default;
│ │ │ +
99 ~istream_iterator() = default;
│ │ │ +
100#endif
│ │ │ +
101
│ │ │ +
102 _GLIBCXX_NODISCARD
│ │ │ +
103 const _Tp&
│ │ │ +
104 operator*() const _GLIBCXX_NOEXCEPT
│ │ │ +
105 {
│ │ │ +
106 __glibcxx_requires_cond(_M_ok,
│ │ │ +
107 _M_message(__gnu_debug::__msg_deref_istream)
│ │ │ +
108 ._M_iterator(*this));
│ │ │ +
109 return _M_value;
│ │ │ +
110 }
│ │ │ +
111
│ │ │ +
112 _GLIBCXX_NODISCARD
│ │ │ +
113 const _Tp*
│ │ │ +
114 operator->() const _GLIBCXX_NOEXCEPT
│ │ │ +
115 { return std::__addressof((operator*())); }
│ │ │
116
│ │ │ -
117#endif // _GLIBCXX_THIS_THREAD_SLEEP_H
│ │ │ - │ │ │ - │ │ │ -
duration< int64_t > seconds
seconds
Definition chrono.h:897
│ │ │ -
duration< int64_t, nano > nanoseconds
nanoseconds
Definition chrono.h:888
│ │ │ + │ │ │ +
118 operator++()
│ │ │ +
119 {
│ │ │ +
120 __glibcxx_requires_cond(_M_ok,
│ │ │ +
121 _M_message(__gnu_debug::__msg_inc_istream)
│ │ │ +
122 ._M_iterator(*this));
│ │ │ +
123 _M_read();
│ │ │ +
124 return *this;
│ │ │ +
125 }
│ │ │ +
126
│ │ │ + │ │ │ +
128 operator++(int)
│ │ │ +
129 {
│ │ │ +
130 __glibcxx_requires_cond(_M_ok,
│ │ │ +
131 _M_message(__gnu_debug::__msg_inc_istream)
│ │ │ +
132 ._M_iterator(*this));
│ │ │ +
133 istream_iterator __tmp = *this;
│ │ │ +
134 _M_read();
│ │ │ +
135 return __tmp;
│ │ │ +
136 }
│ │ │ +
137
│ │ │ +
138 private:
│ │ │ +
139 bool
│ │ │ +
140 _M_equal(const istream_iterator& __x) const _GLIBCXX_NOEXCEPT
│ │ │ +
141 {
│ │ │ +
142 // Ideally this would just return _M_stream == __x._M_stream,
│ │ │ +
143 // but code compiled with old versions never sets _M_stream to null.
│ │ │ +
144 return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream);
│ │ │ +
145 }
│ │ │ +
146
│ │ │ +
147 void
│ │ │ +
148 _M_read()
│ │ │ +
149 {
│ │ │ +
150 if (_M_stream && !(*_M_stream >> _M_value))
│ │ │ +
151 {
│ │ │ +
152 _M_stream = 0;
│ │ │ +
153 _M_ok = false;
│ │ │ +
154 }
│ │ │ +
155 }
│ │ │ +
156
│ │ │ +
157 /// Return true if the iterators refer to the same stream,
│ │ │ +
158 /// or are both at end-of-stream.
│ │ │ +
159 _GLIBCXX_NODISCARD
│ │ │ +
160 friend bool
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
163 { return __x._M_equal(__y); }
│ │ │ +
│ │ │ +
164
│ │ │ +
165#if __cpp_impl_three_way_comparison < 201907L
│ │ │ +
166 /// Return true if the iterators refer to different streams,
│ │ │ +
167 /// or if one is at end-of-stream and the other is not.
│ │ │ +
168 _GLIBCXX_NODISCARD
│ │ │ +
169 friend bool
│ │ │ +
170 operator!=(const istream_iterator& __x, const istream_iterator& __y)
│ │ │ + │ │ │ +
172 { return !__x._M_equal(__y); }
│ │ │ +
173#endif
│ │ │ +
174
│ │ │ +
175#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ +
176 [[nodiscard]]
│ │ │ +
177 friend bool
│ │ │ +
178 operator==(const istream_iterator& __i, default_sentinel_t) noexcept
│ │ │ +
179 { return !__i._M_stream; }
│ │ │ +
180#endif
│ │ │ +
181 };
│ │ │ +
│ │ │ +
182
│ │ │ +
183 /**
│ │ │ +
184 * @brief Provides output iterator semantics for streams.
│ │ │ +
185 *
│ │ │ +
186 * This class provides an iterator to write to an ostream. The type Tp is
│ │ │ +
187 * the only type written by this iterator and there must be an
│ │ │ +
188 * operator<<(Tp) defined.
│ │ │ +
189 *
│ │ │ +
190 * @tparam _Tp The type to write to the ostream.
│ │ │ +
191 * @tparam _CharT The ostream char_type.
│ │ │ +
192 * @tparam _Traits The ostream char_traits.
│ │ │ +
193 */
│ │ │ +
194 template<typename _Tp, typename _CharT = char,
│ │ │ +
195 typename _Traits = char_traits<_CharT> >
│ │ │ +
│ │ │ + │ │ │ +
197 : public iterator<output_iterator_tag, void, void, void, void>
│ │ │ +
198 {
│ │ │ +
199 public:
│ │ │ +
200 ///@{
│ │ │ +
201 /// Public typedef
│ │ │ +
202#if __cplusplus > 201703L
│ │ │ +
203 using difference_type = ptrdiff_t;
│ │ │ +
204#endif
│ │ │ +
205 typedef _CharT char_type;
│ │ │ +
206 typedef _Traits traits_type;
│ │ │ + │ │ │ +
208 ///@}
│ │ │ +
209
│ │ │ +
210 private:
│ │ │ +
211 ostream_type* _M_stream;
│ │ │ +
212 const _CharT* _M_string;
│ │ │ +
213
│ │ │ +
214 public:
│ │ │ +
215 /// Construct from an ostream.
│ │ │ +
│ │ │ + │ │ │ +
217 : _M_stream(std::__addressof(__s)), _M_string(0) {}
│ │ │ +
│ │ │ +
218
│ │ │ +
219 /**
│ │ │ +
220 * Construct from an ostream.
│ │ │ +
221 *
│ │ │ +
222 * The delimiter string @a c is written to the stream after every Tp
│ │ │ +
223 * written to the stream. The delimiter is not copied, and thus must
│ │ │ +
224 * not be destroyed while this iterator is in use.
│ │ │ +
225 *
│ │ │ +
226 * @param __s Underlying ostream to write to.
│ │ │ +
227 * @param __c CharT delimiter string to insert.
│ │ │ +
228 */
│ │ │ +
│ │ │ + │ │ │ +
230 : _M_stream(std::__addressof(__s)), _M_string(__c) { }
│ │ │ +
│ │ │ +
231
│ │ │ +
232 /// Copy constructor.
│ │ │ +
│ │ │ + │ │ │ +
234 : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { }
│ │ │ +
│ │ │ +
235
│ │ │ +
236#if __cplusplus >= 201103L
│ │ │ +
237 ostream_iterator& operator=(const ostream_iterator&) = default;
│ │ │ +
238#endif
│ │ │ +
239
│ │ │ +
240 /// Writes @a value to underlying ostream using operator<<. If
│ │ │ +
241 /// constructed with delimiter string, writes delimiter to ostream.
│ │ │ + │ │ │ +
│ │ │ +
243 operator=(const _Tp& __value)
│ │ │ +
244 {
│ │ │ +
245 __glibcxx_requires_cond(_M_stream != 0,
│ │ │ +
246 _M_message(__gnu_debug::__msg_output_ostream)
│ │ │ +
247 ._M_iterator(*this));
│ │ │ +
248 *_M_stream << __value;
│ │ │ +
249 if (_M_string)
│ │ │ +
250 *_M_stream << _M_string;
│ │ │ +
251 return *this;
│ │ │ +
252 }
│ │ │ +
│ │ │ +
253
│ │ │ +
254 _GLIBCXX_NODISCARD
│ │ │ + │ │ │ +
256 operator*() _GLIBCXX_NOEXCEPT
│ │ │ +
257 { return *this; }
│ │ │ +
258
│ │ │ +
259 ostream_iterator&
│ │ │ +
260 operator++() _GLIBCXX_NOEXCEPT
│ │ │ +
261 { return *this; }
│ │ │ +
262
│ │ │ + │ │ │ +
264 operator++(int) _GLIBCXX_NOEXCEPT
│ │ │ +
265 { return *this; }
│ │ │ +
266 };
│ │ │ +
│ │ │ +
267#pragma GCC diagnostic pop
│ │ │ +
268
│ │ │ +
269 /// @} group iterators
│ │ │ +
270
│ │ │ +
271_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
272} // namespace
│ │ │ +
273
│ │ │ +
274#endif
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:51
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
void sleep_until(const chrono::time_point< _Clock, _Duration > &__atime)
this_thread::sleep_until
│ │ │ -
void sleep_for(const chrono::duration< _Rep, _Period > &__rtime)
this_thread::sleep_for
│ │ │ -
chrono::duration represents a distance between two points in time
Definition chrono.h:512
│ │ │ -
chrono::time_point represents a point in time as measured by a clock
Definition chrono.h:923
│ │ │ - │ │ │ +
is_nothrow_default_constructible
Definition type_traits:1124
│ │ │ +
is_nothrow_copy_constructible
Definition type_traits:1133
│ │ │ +
Common iterator class.
│ │ │ +
Provides input iterator semantics for streams.
│ │ │ +
istream_iterator(istream_type &__s)
Construct start of input stream iterator.
│ │ │ +
constexpr istream_iterator() noexcept(/*conditional */)
Construct end of input stream iterator.
│ │ │ +
friend bool operator==(const istream_iterator &__x, const istream_iterator &__y) noexcept
Return true if the iterators refer to the same stream, or are both at end-of-stream.
│ │ │ +
Provides output iterator semantics for streams.
│ │ │ +
_CharT char_type
Public typedef.
│ │ │ +
ostream_iterator(ostream_type &__s) noexcept
Construct from an ostream.
│ │ │ +
ostream_iterator(ostream_type &__s, const _CharT *__c) noexcept
│ │ │ +
_Traits traits_type
Public typedef.
│ │ │ +
ostream_iterator & operator=(const _Tp &__value)
Writes value to underlying ostream using operator<<. If constructed with delimiter string,...
│ │ │ +
ptrdiff_t difference_type
Public typedef.
│ │ │ +
basic_ostream< _CharT, _Traits > ostream_type
Public typedef.
│ │ │ +
ostream_iterator(const ostream_iterator &__obj) noexcept
Copy constructor.
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -this_thread_sleep.h │ │ │ │ +stream_iterator.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// std::this_thread::sleep_for/until declarations -*- C++ -*- │ │ │ │ +1// Stream iterators │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2008-2023 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2001-2023 Free Software Foundation, Inc. │ │ │ │ 4// │ │ │ │ 5// This file is part of the GNU ISO C++ Library. This library is free │ │ │ │ 6// software; you can redistribute it and/or modify it under the │ │ │ │ 7// terms of the GNU General Public License as published by the │ │ │ │ 8// Free Software Foundation; either version 3, or (at your option) │ │ │ │ 9// any later version. │ │ │ │ 10 │ │ │ │ @@ -21,131 +21,333 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/this_thread_sleep.h │ │ │ │ +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{thread} │ │ │ │ +27 * Do not attempt to use it directly. @headername{iterator} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _GLIBCXX_THIS_THREAD_SLEEP_H │ │ │ │ -31#define _GLIBCXX_THIS_THREAD_SLEEP_H 1 │ │ │ │ +30#ifndef _STREAM_ITERATOR_H │ │ │ │ +31#define _STREAM_ITERATOR_H 1 │ │ │ │ 32 │ │ │ │ 33#pragma GCC system_header │ │ │ │ 34 │ │ │ │ -35#if __cplusplus >= 201103L │ │ │ │ -36#include <_b_i_t_s_/_c_h_r_o_n_o_._h> // std::chrono::* │ │ │ │ -37 │ │ │ │ -38#ifdef _GLIBCXX_USE_NANOSLEEP │ │ │ │ -39# include <_c_e_r_r_n_o> // errno, EINTR │ │ │ │ -40# include // nanosleep │ │ │ │ -41#endif │ │ │ │ -42 │ │ │ │ -43namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -44{ │ │ │ │ -45_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -46 │ │ │ │ -47 /** @addtogroup threads │ │ │ │ -48 * @{ │ │ │ │ -49 */ │ │ │ │ -50 │ │ │ │ -51 /** @namespace std::this_thread │ │ │ │ -52 * @brief ISO C++ 2011 namespace for interacting with the current thread │ │ │ │ -53 * │ │ │ │ -54 * C++11 30.3.2 [thread.thread.this] Namespace this_thread. │ │ │ │ -55 */ │ │ │ │ -56 namespace this_thread │ │ │ │ -57 { │ │ │ │ -58#ifndef _GLIBCXX_NO_SLEEP │ │ │ │ -59 │ │ │ │ -60#ifndef _GLIBCXX_USE_NANOSLEEP │ │ │ │ -61 void │ │ │ │ -62 __sleep_for(_c_h_r_o_n_o_:_:_s_e_c_o_n_d_s, _c_h_r_o_n_o_:_:_n_a_n_o_s_e_c_o_n_d_s); │ │ │ │ -63#endif │ │ │ │ -64 │ │ │ │ -65 /// this_thread::sleep_for │ │ │ │ -66 template │ │ │ │ -67 inline void │ │ │ │ -_6_8 _s_l_e_e_p___f_o_r(const _c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n_<___R_e_p_,_ ___P_e_r_i_o_d_>& _____r_t_i_m_e) │ │ │ │ -69 { │ │ │ │ -70 if (_____r_t_i_m_e <= _____r_t_i_m_e.zero()) │ │ │ │ -71 return; │ │ │ │ -72 auto _____s = chrono::duration_cast(_____r_t_i_m_e); │ │ │ │ -73 auto _____n_s = chrono::duration_cast(_____r_t_i_m_e - _____s); │ │ │ │ -74#ifdef _GLIBCXX_USE_NANOSLEEP │ │ │ │ -75 struct ::timespec _____t_s = │ │ │ │ -76 { │ │ │ │ -77 static_cast<_s_t_d_:_:_t_i_m_e___t>(_____s.count()), │ │ │ │ -78 static_cast(_____n_s.count()) │ │ │ │ -79 }; │ │ │ │ -80 while (::nanosleep(&_____t_s, &_____t_s) == -1 && errno == _E_I_N_T_R) │ │ │ │ -81 { } │ │ │ │ -82#else │ │ │ │ -83 _____s_l_e_e_p___f_o_r(_____s, _____n_s); │ │ │ │ -84#endif │ │ │ │ -85 } │ │ │ │ -86 │ │ │ │ -87 /// this_thread::sleep_until │ │ │ │ -88 template │ │ │ │ -89 inline void │ │ │ │ -_9_0 _s_l_e_e_p___u_n_t_i_l(const _c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t_<___C_l_o_c_k_,_ ___D_u_r_a_t_i_o_n_>& _____a_t_i_m_e) │ │ │ │ -91 { │ │ │ │ -92#if __cplusplus > 201703L │ │ │ │ -93 static_assert(chrono::is_clock_v<_Clock>); │ │ │ │ -94#endif │ │ │ │ -95 auto _____n_o_w = _Clock::now(); │ │ │ │ -96 if (_Clock::is_steady) │ │ │ │ -97 { │ │ │ │ -98 if (_____n_o_w < _____a_t_i_m_e) │ │ │ │ -99 _s_l_e_e_p___f_o_r(_____a_t_i_m_e - _____n_o_w); │ │ │ │ -100 return; │ │ │ │ -101 } │ │ │ │ -102 while (_____n_o_w < _____a_t_i_m_e) │ │ │ │ -103 { │ │ │ │ -104 _s_l_e_e_p___f_o_r(_____a_t_i_m_e - _____n_o_w); │ │ │ │ -105 _____n_o_w = _Clock::now(); │ │ │ │ -106 } │ │ │ │ -107 } │ │ │ │ -108#endif // ! NO_SLEEP │ │ │ │ -109 } // namespace this_thread │ │ │ │ -110 │ │ │ │ -111 /// @} │ │ │ │ -112 │ │ │ │ -113_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -114} // namespace │ │ │ │ -115#endif // C++11 │ │ │ │ +35#include <_i_o_s_f_w_d> │ │ │ │ +36#include <_b_i_t_s_/_m_o_v_e_._h> │ │ │ │ +37#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> │ │ │ │ +38#include <_d_e_b_u_g_/_d_e_b_u_g_._h> │ │ │ │ +39 │ │ │ │ +40namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +41{ │ │ │ │ +42_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +43 │ │ │ │ +44 /** │ │ │ │ +45 * @addtogroup iterators │ │ │ │ +46 * @{ │ │ │ │ +47 */ │ │ │ │ +48 │ │ │ │ +49// Ignore warnings about std::iterator. │ │ │ │ +50#pragma GCC diagnostic push │ │ │ │ +51#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +52 │ │ │ │ +53 /// Provides input iterator semantics for streams. │ │ │ │ +54 template, typename _Dist = ptrdiff_t> │ │ │ │ +_5_6 class _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +57 : public _i_t_e_r_a_t_o_r │ │ │ │ +58 { │ │ │ │ +59 public: │ │ │ │ +60 typedef _CharT char_type; │ │ │ │ +61 typedef _Traits traits_type; │ │ │ │ +62 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; │ │ │ │ +63 │ │ │ │ +64 private: │ │ │ │ +65 _i_s_t_r_e_a_m___t_y_p_e* _M_stream; │ │ │ │ +66 _Tp _M_value; │ │ │ │ +67 // This bool becomes false at end-of-stream. It should be sufficient to │ │ │ │ +68 // check _M_stream != nullptr instead, but historically we did not set │ │ │ │ +69 // _M_stream to null when reaching the end, so we need to keep this flag. │ │ │ │ +70 bool _M_ok; │ │ │ │ +71 │ │ │ │ +72 public: │ │ │ │ +73 /// Construct end of input stream iterator. │ │ │ │ +_7_4 ___G_L_I_B_C_X_X___C_O_N_S_T_E_X_P_R _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r() │ │ │ │ +75 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T___I_F(_i_s___n_o_t_h_r_o_w___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t_i_b_l_e<_Tp>::value) │ │ │ │ +76 : _M_stream(0), _M_value(), _M_ok(_f_a_l_s_e) {} │ │ │ │ +77 │ │ │ │ +78 /// Construct start of input stream iterator. │ │ │ │ +_7_9 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(_i_s_t_r_e_a_m___t_y_p_e& _____s) │ │ │ │ +80 : _M_stream(_s_t_d::_____a_d_d_r_e_s_s_o_f(_____s)), _M_ok(_t_r_u_e) │ │ │ │ +81 { _M_read(); } │ │ │ │ +82 │ │ │ │ +83 ___G_L_I_B_C_X_X___C_O_N_S_T_E_X_P_R │ │ │ │ +84 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& _____o_b_j) │ │ │ │ +85 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T___I_F(_i_s___n_o_t_h_r_o_w___c_o_p_y___c_o_n_s_t_r_u_c_t_i_b_l_e_<___T_p_>_:_:_v_a_l_u_e) │ │ │ │ +86 : _M_stream(_____o_b_j._M_stream), _M_value(_____o_b_j._M_value), │ │ │ │ +87 _M_ok(_____o_b_j._M_ok) │ │ │ │ +88 { } │ │ │ │ +89 │ │ │ │ +90#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ +91 constexpr │ │ │ │ +92 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(default_sentinel_t) │ │ │ │ +93 noexcept(is_nothrow_default_constructible_v<_Tp>) │ │ │ │ +94 : _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r() { } │ │ │ │ +95#endif │ │ │ │ +96 │ │ │ │ +97#if __cplusplus >= 201103L │ │ │ │ +98 _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; │ │ │ │ +99 ~istream_iterator() = default; │ │ │ │ +100#endif │ │ │ │ +101 │ │ │ │ +102 _GLIBCXX_NODISCARD │ │ │ │ +103 const _Tp& │ │ │ │ +104 operator*() const _GLIBCXX_NOEXCEPT │ │ │ │ +105 { │ │ │ │ +106 __glibcxx_requires_cond(_M_ok, │ │ │ │ +107 _M_message(__gnu_debug::__msg_deref_istream) │ │ │ │ +108 ._M_iterator(*this)); │ │ │ │ +109 return _M_value; │ │ │ │ +110 } │ │ │ │ +111 │ │ │ │ +112 _GLIBCXX_NODISCARD │ │ │ │ +113 const _Tp* │ │ │ │ +114 operator->() const _GLIBCXX_NOEXCEPT │ │ │ │ +115 { return _s_t_d_:_:_____a_d_d_r_e_s_s_o_f((operator*())); } │ │ │ │ 116 │ │ │ │ -117#endif // _GLIBCXX_THIS_THREAD_SLEEP_H │ │ │ │ -_c_e_r_r_n_o │ │ │ │ -_c_h_r_o_n_o_._h │ │ │ │ -_s_t_d_:_:_c_h_r_o_n_o_:_:_s_e_c_o_n_d_s │ │ │ │ -duration< int64_t > seconds │ │ │ │ -seconds │ │ │ │ -DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_9_7 │ │ │ │ -_s_t_d_:_:_c_h_r_o_n_o_:_:_n_a_n_o_s_e_c_o_n_d_s │ │ │ │ -duration< int64_t, nano > nanoseconds │ │ │ │ -nanoseconds │ │ │ │ -DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_8_8_8 │ │ │ │ +117 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ +118 operator++() │ │ │ │ +119 { │ │ │ │ +120 __glibcxx_requires_cond(_M_ok, │ │ │ │ +121 _M_message(__gnu_debug::__msg_inc_istream) │ │ │ │ +122 ._M_iterator(*this)); │ │ │ │ +123 _M_read(); │ │ │ │ +124 return *this; │ │ │ │ +125 } │ │ │ │ +126 │ │ │ │ +127 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +128 operator++(int) │ │ │ │ +129 { │ │ │ │ +130 __glibcxx_requires_cond(_M_ok, │ │ │ │ +131 _M_message(__gnu_debug::__msg_inc_istream) │ │ │ │ +132 ._M_iterator(*this)); │ │ │ │ +133 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r __tmp = *this; │ │ │ │ +134 _M_read(); │ │ │ │ +135 return __tmp; │ │ │ │ +136 } │ │ │ │ +137 │ │ │ │ +138 private: │ │ │ │ +139 bool │ │ │ │ +140 _M_equal(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __x) const _GLIBCXX_NOEXCEPT │ │ │ │ +141 { │ │ │ │ +142 // Ideally this would just return _M_stream == __x._M_stream, │ │ │ │ +143 // but code compiled with old versions never sets _M_stream to null. │ │ │ │ +144 return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); │ │ │ │ +145 } │ │ │ │ +146 │ │ │ │ +147 void │ │ │ │ +148 _M_read() │ │ │ │ +149 { │ │ │ │ +150 if (_M_stream && !(*_M_stream >> _M_value)) │ │ │ │ +151 { │ │ │ │ +152 _M_stream = 0; │ │ │ │ +153 _M_ok = false; │ │ │ │ +154 } │ │ │ │ +155 } │ │ │ │ +156 │ │ │ │ +157 /// Return true if the iterators refer to the same stream, │ │ │ │ +158 /// or are both at end-of-stream. │ │ │ │ +159 _GLIBCXX_NODISCARD │ │ │ │ +160 friend bool │ │ │ │ +_1_6_1 _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) │ │ │ │ +162 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ +163 { return __x._M_equal(__y); } │ │ │ │ +164 │ │ │ │ +165#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ +166 /// Return true if the iterators refer to different streams, │ │ │ │ +167 /// or if one is at end-of-stream and the other is not. │ │ │ │ +168 _GLIBCXX_NODISCARD │ │ │ │ +169 friend bool │ │ │ │ +170 operator!=(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __x, const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __y) │ │ │ │ +171 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ +172 { return !__x._M_equal(__y); } │ │ │ │ +173#endif │ │ │ │ +174 │ │ │ │ +175#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ +176 [[nodiscard]] │ │ │ │ +177 friend bool │ │ │ │ +178 _o_p_e_r_a_t_o_r_=_=(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __i, default_sentinel_t) noexcept │ │ │ │ +179 { return !__i._M_stream; } │ │ │ │ +180#endif │ │ │ │ +181 }; │ │ │ │ +182 │ │ │ │ +183 /** │ │ │ │ +184 * @brief Provides output iterator semantics for streams. │ │ │ │ +185 * │ │ │ │ +186 * This class provides an iterator to write to an ostream. The type Tp is │ │ │ │ +187 * the only type written by this iterator and there must be an │ │ │ │ +188 * operator<<(Tp) defined. │ │ │ │ +189 * │ │ │ │ +190 * @tparam _Tp The type to write to the ostream. │ │ │ │ +191 * @tparam _CharT The ostream char_type. │ │ │ │ +192 * @tparam _Traits The ostream char_traits. │ │ │ │ +193 */ │ │ │ │ +194 template > │ │ │ │ +_1_9_6 class _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +197 : public _i_t_e_r_a_t_o_r │ │ │ │ +198 { │ │ │ │ +199 public: │ │ │ │ +200 ///@{ │ │ │ │ +201 /// Public typedef │ │ │ │ +202#if __cplusplus > 201703L │ │ │ │ +_2_0_3 using _d_i_f_f_e_r_e_n_c_e___t_y_p_e = ptrdiff_t; │ │ │ │ +204#endif │ │ │ │ +_2_0_5 typedef _CharT _c_h_a_r___t_y_p_e; │ │ │ │ +_2_0_6 typedef _Traits _t_r_a_i_t_s___t_y_p_e; │ │ │ │ +_2_0_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; │ │ │ │ +208 ///@} │ │ │ │ +209 │ │ │ │ +210 private: │ │ │ │ +211 _o_s_t_r_e_a_m___t_y_p_e* _M_stream; │ │ │ │ +212 const _CharT* _M_string; │ │ │ │ +213 │ │ │ │ +214 public: │ │ │ │ +215 /// Construct from an ostream. │ │ │ │ +_2_1_6 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r(_o_s_t_r_e_a_m___t_y_p_e& _____s) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ +217 : _M_stream(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____s)), _M_string(0) {} │ │ │ │ +218 │ │ │ │ +219 /** │ │ │ │ +220 * Construct from an ostream. │ │ │ │ +221 * │ │ │ │ +222 * The delimiter string @a c is written to the stream after every Tp │ │ │ │ +223 * written to the stream. The delimiter is not copied, and thus must │ │ │ │ +224 * not be destroyed while this iterator is in use. │ │ │ │ +225 * │ │ │ │ +226 * @param __s Underlying ostream to write to. │ │ │ │ +227 * @param __c CharT delimiter string to insert. │ │ │ │ +228 */ │ │ │ │ +_2_2_9 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r(_o_s_t_r_e_a_m___t_y_p_e& _____s, const _CharT* __c) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ +230 : _M_stream(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____s)), _M_string(__c) { } │ │ │ │ +231 │ │ │ │ +232 /// Copy constructor. │ │ │ │ +_2_3_3 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r(const _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& _____o_b_j) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ +234 : _M_stream(_____o_b_j._M_stream), _M_string(_____o_b_j._M_string) { } │ │ │ │ +235 │ │ │ │ +236#if __cplusplus >= 201103L │ │ │ │ +237 _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; │ │ │ │ +238#endif │ │ │ │ +239 │ │ │ │ +240 /// Writes @a value to underlying ostream using operator<<. If │ │ │ │ +241 /// constructed with delimiter string, writes delimiter to ostream. │ │ │ │ +242 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ +_2_4_3 _o_p_e_r_a_t_o_r_=(const _Tp& __value) │ │ │ │ +244 { │ │ │ │ +245 __glibcxx_requires_cond(_M_stream != 0, │ │ │ │ +246 _M_message(__gnu_debug::__msg_output_ostream) │ │ │ │ +247 ._M_iterator(*this)); │ │ │ │ +248 *_M_stream << __value; │ │ │ │ +249 if (_M_string) │ │ │ │ +250 *_M_stream << _M_string; │ │ │ │ +251 return *this; │ │ │ │ +252 } │ │ │ │ +253 │ │ │ │ +254 _GLIBCXX_NODISCARD │ │ │ │ +255 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ +256 operator*() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ +257 { return *this; } │ │ │ │ +258 │ │ │ │ +259 ostream_iterator& │ │ │ │ +260 operator++() _GLIBCXX_NOEXCEPT │ │ │ │ +261 { return *this; } │ │ │ │ +262 │ │ │ │ +263 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ +264 operator++(int) _GLIBCXX_NOEXCEPT │ │ │ │ +265 { return *this; } │ │ │ │ +266 }; │ │ │ │ +267#pragma GCC diagnostic pop │ │ │ │ +268 │ │ │ │ +269 /// @} group iterators │ │ │ │ +270 │ │ │ │ +271_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +272} // namespace │ │ │ │ +273 │ │ │ │ +274#endif │ │ │ │ +_i_o_s_f_w_d │ │ │ │ +_m_o_v_e_._h │ │ │ │ +_s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h │ │ │ │ +_d_e_b_u_g_._h │ │ │ │ +_s_t_d_:_:_____a_d_d_r_e_s_s_o_f │ │ │ │ +constexpr _Tp * __addressof(_Tp &__r) noexcept │ │ │ │ +Same as C++11 std::addressof. │ │ │ │ +DDeeffiinniittiioonn _m_o_v_e_._h_:_5_1 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_t_h_i_s___t_h_r_e_a_d_:_:_s_l_e_e_p___u_n_t_i_l │ │ │ │ -void sleep_until(const chrono::time_point< _Clock, _Duration > &__atime) │ │ │ │ -this_thread::sleep_until │ │ │ │ -DDeeffiinniittiioonn _t_h_i_s___t_h_r_e_a_d___s_l_e_e_p_._h_:_9_0 │ │ │ │ -_s_t_d_:_:_t_h_i_s___t_h_r_e_a_d_:_:_s_l_e_e_p___f_o_r │ │ │ │ -void sleep_for(const chrono::duration< _Rep, _Period > &__rtime) │ │ │ │ -this_thread::sleep_for │ │ │ │ -DDeeffiinniittiioonn _t_h_i_s___t_h_r_e_a_d___s_l_e_e_p_._h_:_6_8 │ │ │ │ -_s_t_d_:_:_c_h_r_o_n_o_:_:_d_u_r_a_t_i_o_n │ │ │ │ -chrono::duration represents a distance between two points in time │ │ │ │ -DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_5_1_2 │ │ │ │ -_s_t_d_:_:_c_h_r_o_n_o_:_:_t_i_m_e___p_o_i_n_t │ │ │ │ -chrono::time_point represents a point in time as measured by a clock │ │ │ │ -DDeeffiinniittiioonn _c_h_r_o_n_o_._h_:_9_2_3 │ │ │ │ +_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_1_2_4 │ │ │ │ +_s_t_d_:_:_i_s___n_o_t_h_r_o_w___c_o_p_y___c_o_n_s_t_r_u_c_t_i_b_l_e │ │ │ │ +is_nothrow_copy_constructible │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_1_3_3 │ │ │ │ +_s_t_d_:_:_i_t_e_r_a_t_o_r │ │ │ │ +Common iterator class. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_2_8 │ │ │ │ +_s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +Provides input iterator semantics for streams. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_5_8 │ │ │ │ +_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_9 │ │ │ │ +_s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +constexpr istream_iterator() noexcept(/*conditional */) │ │ │ │ +Construct end of input stream iterator. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_7_4 │ │ │ │ +_s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ +friend bool operator==(const istream_iterator &__x, const istream_iterator │ │ │ │ +&__y) noexcept │ │ │ │ +Return true if the iterators refer to the same stream, or are both at end-of- │ │ │ │ +stream. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_1_6_1 │ │ │ │ +_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ +Provides output iterator semantics for streams. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_1_9_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_:_2_0_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) noexcept │ │ │ │ +Construct from an ostream. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_1_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(ostream_type &__s, const _CharT *__c) noexcept │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_2_9 │ │ │ │ +_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_t_r_a_i_t_s___t_y_p_e │ │ │ │ +_Traits traits_type │ │ │ │ +Public typedef. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_6 │ │ │ │ +_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +ostream_iterator & operator=(const _Tp &__value) │ │ │ │ +Writes value to underlying ostream using operator<<. If constructed with │ │ │ │ +delimiter string,... │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_4_3 │ │ │ │ +_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ +ptrdiff_t difference_type │ │ │ │ +Public typedef. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_3 │ │ │ │ +_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m___t_y_p_e │ │ │ │ +basic_ostream< _CharT, _Traits > ostream_type │ │ │ │ +Public typedef. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_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(const ostream_iterator &__obj) noexcept │ │ │ │ +Copy constructor. │ │ │ │ +DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_3_3 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _t_h_i_s___t_h_r_e_a_d___s_l_e_e_p_._h │ │ │ │ + * _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00374.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stringfwd.h File Reference │ │ │ +libstdc++: std_mutex.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,46 +46,58 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00374.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ +Classes | │ │ │ Namespaces | │ │ │ -Typedefs
│ │ │ -
stringfwd.h File Reference
│ │ │ +Variables
│ │ │ +
std_mutex.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ +Classes

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

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

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

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file stringfwd.h.

│ │ │ +

Definition in file std_mutex.h.

│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,23 +1,32 @@ │ │ │ │ libstdc++ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ -stringfwd.h File Reference │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +std_mutex.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ +CCllaasssseess │ │ │ │ +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 │ │ │ │ - _t_y_p_e_d_e_f _b_a_s_i_c___s_t_r_i_n_g< char >  _s_t_d_:_:_s_t_r_i_n_g │ │ │ │ -  │ │ │ │ -_t_y_p_e_d_e_f _b_a_s_i_c___s_t_r_i_n_g< _c_h_a_r_1_6___t >  _s_t_d_:_:_u_1_6_s_t_r_i_n_g │ │ │ │ +VVaarriiaabblleess │ │ │ │ + constexpr _a_d_o_p_t___l_o_c_k___t  _s_t_d_:_:_a_d_o_p_t___l_o_c_k │ │ │ │   │ │ │ │ -_t_y_p_e_d_e_f _b_a_s_i_c___s_t_r_i_n_g< _c_h_a_r_3_2___t >  _s_t_d_:_:_u_3_2_s_t_r_i_n_g │ │ │ │ + constexpr _d_e_f_e_r___l_o_c_k___t  _s_t_d_:_:_d_e_f_e_r___l_o_c_k │ │ │ │   │ │ │ │ - _t_y_p_e_d_e_f _b_a_s_i_c___s_t_r_i_n_g< wchar_t >  _s_t_d_:_:_w_s_t_r_i_n_g │ │ │ │ +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 _s_t_r_i_n_g_f_w_d_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_t_d___m_u_t_e_x_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_i_n_g_f_w_d_._h │ │ │ │ + * _s_t_d___m_u_t_e_x_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00374.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,6 +1,5 @@ │ │ │ │ var a00374 = [ │ │ │ │ - ["string", "a00374.html#ga32db3d9898c44d3b3a578b560f7758cc", null], │ │ │ │ - ["u16string", "a00374.html#ga957ec6dee9435a81e37f7f70e711bf09", null], │ │ │ │ - ["u32string", "a00374.html#ga83ce9bd7fd0896013d6ef39113119bf5", null], │ │ │ │ - ["wstring", "a00374.html#gacc5a707e71ec50089cb9f653282f22f7", null] │ │ │ │ + ["adopt_lock", "a00374.html#gad21e19f3b9b1166718c228219723e130", null], │ │ │ │ + ["defer_lock", "a00374.html#gaef1e52b34e2d2d6e3850bbd28ff7546a", null], │ │ │ │ + ["try_to_lock", "a00374.html#ga845da3c3459b8dc4c6f690039b797dfc", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00374_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stringfwd.h Source File │ │ │ +libstdc++: std_mutex.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stringfwd.h
│ │ │ +
std_mutex.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// <string> Forward declarations -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// std::mutex implementation -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2001-2023 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2003-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,102 +72,278 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/stringfwd.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{string}
│ │ │ +
27 * Do not attempt to use it directly. @headername{mutex}
│ │ │
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
│ │ │ +
30#ifndef _GLIBCXX_MUTEX_H
│ │ │ +
31#define _GLIBCXX_MUTEX_H 1
│ │ │ +
32
│ │ │ +
33#pragma GCC system_header
│ │ │ +
34
│ │ │ +
35#if __cplusplus < 201103L
│ │ │ +
36# include <bits/c++0x_warning.h>
│ │ │ +
37#else
│ │ │
38
│ │ │ -
39#include <bits/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;
│ │ │ +
39#include <errno.h> // EBUSY
│ │ │ +
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 template<> struct char_traits<char>;
│ │ │ -
56
│ │ │ -
57 template<> struct char_traits<wchar_t>;
│ │ │ -
58
│ │ │ -
59#ifdef _GLIBCXX_USE_CHAR8_T
│ │ │ -
60 template<> struct char_traits<char8_t>;
│ │ │ -
61#endif
│ │ │ -
62
│ │ │ -
63#if __cplusplus >= 201103L
│ │ │ -
64 template<> struct char_traits<char16_t>;
│ │ │ -
65 template<> struct char_traits<char32_t>;
│ │ │ -
66#endif
│ │ │ -
67
│ │ │ -
68_GLIBCXX_BEGIN_NAMESPACE_CXX11
│ │ │ -
69
│ │ │ -
70 template<typename _CharT, typename _Traits = char_traits<_CharT>,
│ │ │ -
71 typename _Alloc = allocator<_CharT> >
│ │ │ -
72 class basic_string;
│ │ │ -
73
│ │ │ -
74_GLIBCXX_END_NAMESPACE_CXX11
│ │ │ -
75
│ │ │ -
76 /// A string of @c char
│ │ │ - │ │ │ -
78
│ │ │ -
79 /// A string of @c wchar_t
│ │ │ - │ │ │ -
81
│ │ │ -
82#ifdef _GLIBCXX_USE_CHAR8_T
│ │ │ -
83 /// A string of @c char8_t
│ │ │ -
84 typedef basic_string<char8_t> u8string;
│ │ │ -
85#endif
│ │ │ -
86
│ │ │ -
87#if __cplusplus >= 201103L
│ │ │ -
88 /// A string of @c char16_t
│ │ │ - │ │ │ -
90
│ │ │ -
91 /// A string of @c char32_t
│ │ │ - │ │ │ -
93#endif
│ │ │ -
94
│ │ │ -
95 /** @} */
│ │ │ -
96
│ │ │ -
97_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
98} // namespace std
│ │ │ -
99
│ │ │ -
100#endif // _STRINGFWD_H
│ │ │ - │ │ │ - │ │ │ -
basic_string< char > string
A string of char.
Definition stringfwd.h:77
│ │ │ -
basic_string< char32_t > u32string
A string of char32_t.
Definition stringfwd.h:92
│ │ │ -
basic_string< char16_t > u16string
A string of char16_t.
Definition stringfwd.h:89
│ │ │ -
basic_string< wchar_t > wstring
A string of wchar_t.
Definition stringfwd.h:80
│ │ │ +
55#ifdef _GLIBCXX_HAS_GTHREADS
│ │ │ +
56 /// @cond undocumented
│ │ │ +
57
│ │ │ +
58 // Common base class for std::mutex and std::timed_mutex
│ │ │ +
59 class __mutex_base
│ │ │ +
60 {
│ │ │ +
61 protected:
│ │ │ +
62 typedef __gthread_mutex_t __native_type;
│ │ │ +
63
│ │ │ +
64#ifdef __GTHREAD_MUTEX_INIT
│ │ │ +
65 __native_type _M_mutex = __GTHREAD_MUTEX_INIT;
│ │ │ +
66
│ │ │ +
67 constexpr __mutex_base() noexcept = default;
│ │ │ +
68#else
│ │ │ +
69 __native_type _M_mutex;
│ │ │ +
70
│ │ │ +
71 __mutex_base() noexcept
│ │ │ +
72 {
│ │ │ +
73 // XXX EAGAIN, ENOMEM, EPERM, EBUSY(may), EINVAL(may)
│ │ │ +
74 __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex);
│ │ │ +
75 }
│ │ │ +
76
│ │ │ +
77 ~__mutex_base() noexcept { __gthread_mutex_destroy(&_M_mutex); }
│ │ │ +
78#endif
│ │ │ +
79
│ │ │ +
80 __mutex_base(const __mutex_base&) = delete;
│ │ │ +
81 __mutex_base& operator=(const __mutex_base&) = delete;
│ │ │ +
82 };
│ │ │ +
83 /// @endcond
│ │ │ +
84
│ │ │ +
85 /** The standard mutex type.
│ │ │ +
86 *
│ │ │ +
87 * A simple, non-recursive, non-timed mutex.
│ │ │ +
88 *
│ │ │ +
89 * Do not call `lock()` and `unlock()` directly, use a scoped lock type
│ │ │ +
90 * such as `std::unique_lock`, `std::lock_guard`, or (since C++17)
│ │ │ +
91 * `std::scoped_lock`.
│ │ │ +
92 *
│ │ │ +
93 * @headerfile mutex
│ │ │ +
94 * @since C++11
│ │ │ +
95 */
│ │ │ +
│ │ │ +
96 class mutex : private __mutex_base
│ │ │ +
97 {
│ │ │ +
98 public:
│ │ │ + │ │ │ +
100
│ │ │ +
101#ifdef __GTHREAD_MUTEX_INIT
│ │ │ +
102 constexpr
│ │ │ +
103#endif
│ │ │ +
104 mutex() noexcept = default;
│ │ │ +
105 ~mutex() = default;
│ │ │ +
106
│ │ │ +
107 mutex(const mutex&) = delete;
│ │ │ +
108 mutex& operator=(const mutex&) = delete;
│ │ │ +
109
│ │ │ +
110 void
│ │ │ +
111 lock()
│ │ │ +
112 {
│ │ │ +
113 int __e = __gthread_mutex_lock(&_M_mutex);
│ │ │ +
114
│ │ │ +
115 // EINVAL, EAGAIN, EBUSY, EINVAL, EDEADLK(may)
│ │ │ +
116 if (__e)
│ │ │ +
117 __throw_system_error(__e);
│ │ │ +
118 }
│ │ │ +
119
│ │ │ +
120 _GLIBCXX_NODISCARD
│ │ │ +
121 bool
│ │ │ +
122 try_lock() noexcept
│ │ │ +
123 {
│ │ │ +
124 // XXX EINVAL, EAGAIN, EBUSY
│ │ │ +
125 return !__gthread_mutex_trylock(&_M_mutex);
│ │ │ +
126 }
│ │ │ +
127
│ │ │ +
128 void
│ │ │ +
129 unlock()
│ │ │ +
130 {
│ │ │ +
131 // XXX EINVAL, EAGAIN, EPERM
│ │ │ +
132 __gthread_mutex_unlock(&_M_mutex);
│ │ │ +
133 }
│ │ │ +
134
│ │ │ + │ │ │ +
136 native_handle() noexcept
│ │ │ +
137 { return &_M_mutex; }
│ │ │ +
138 };
│ │ │ +
│ │ │ +
139
│ │ │ +
140 /// @cond undocumented
│ │ │ +
141
│ │ │ +
142 // Implementation details for std::condition_variable
│ │ │ +
143 class __condvar
│ │ │ +
144 {
│ │ │ +
145 using timespec = __gthread_time_t;
│ │ │ +
146
│ │ │ +
147 public:
│ │ │ +
148 __condvar() noexcept
│ │ │ +
149 {
│ │ │ +
150#ifndef __GTHREAD_COND_INIT
│ │ │ + │ │ │ +
152#endif
│ │ │ +
153 }
│ │ │ +
154
│ │ │ +
155 ~__condvar()
│ │ │ +
156 {
│ │ │ +
157 int __e __attribute__((__unused__)) = __gthread_cond_destroy(&_M_cond);
│ │ │ +
158 __glibcxx_assert(__e != EBUSY); // threads are still blocked
│ │ │ +
159 }
│ │ │ +
160
│ │ │ +
161 __condvar(const __condvar&) = delete;
│ │ │ +
162 __condvar& operator=(const __condvar&) = delete;
│ │ │ +
163
│ │ │ +
164 __gthread_cond_t* native_handle() noexcept { return &_M_cond; }
│ │ │ +
165
│ │ │ +
166 // Expects: Calling thread has locked __m.
│ │ │ +
167 void
│ │ │ +
168 wait(mutex& __m)
│ │ │ +
169 {
│ │ │ +
170 int __e __attribute__((__unused__))
│ │ │ +
171 = __gthread_cond_wait(&_M_cond, __m.native_handle());
│ │ │ +
172 __glibcxx_assert(__e == 0);
│ │ │ +
173 }
│ │ │ +
174
│ │ │ +
175 void
│ │ │ +
176 wait_until(mutex& __m, timespec& __abs_time)
│ │ │ +
177 {
│ │ │ +
178 __gthread_cond_timedwait(&_M_cond, __m.native_handle(), &__abs_time);
│ │ │ +
179 }
│ │ │ +
180
│ │ │ +
181#ifdef _GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT
│ │ │ +
182 void
│ │ │ +
183 wait_until(mutex& __m, clockid_t __clock, timespec& __abs_time)
│ │ │ +
184 {
│ │ │ +
185 pthread_cond_clockwait(&_M_cond, __m.native_handle(), __clock,
│ │ │ +
186 &__abs_time);
│ │ │ +
187 }
│ │ │ +
188#endif
│ │ │ +
189
│ │ │ +
190 void
│ │ │ +
191 notify_one() noexcept
│ │ │ +
192 {
│ │ │ +
193 int __e __attribute__((__unused__)) = __gthread_cond_signal(&_M_cond);
│ │ │ +
194 __glibcxx_assert(__e == 0);
│ │ │ +
195 }
│ │ │ +
196
│ │ │ +
197 void
│ │ │ +
198 notify_all() noexcept
│ │ │ +
199 {
│ │ │ +
200 int __e __attribute__((__unused__)) = __gthread_cond_broadcast(&_M_cond);
│ │ │ +
201 __glibcxx_assert(__e == 0);
│ │ │ +
202 }
│ │ │ +
203
│ │ │ +
204 protected:
│ │ │ +
205#ifdef __GTHREAD_COND_INIT
│ │ │ +
206 __gthread_cond_t _M_cond = __GTHREAD_COND_INIT;
│ │ │ +
207#else
│ │ │ +
208 __gthread_cond_t _M_cond;
│ │ │ +
209#endif
│ │ │ +
210 };
│ │ │ +
211 /// @endcond
│ │ │ +
212
│ │ │ +
213#endif // _GLIBCXX_HAS_GTHREADS
│ │ │ +
214
│ │ │ +
215 /// Do not acquire ownership of the mutex.
│ │ │ +
216 struct defer_lock_t { explicit defer_lock_t() = default; };
│ │ │ +
217
│ │ │ +
218 /// Try to acquire ownership of the mutex without blocking.
│ │ │ +
219 struct try_to_lock_t { explicit try_to_lock_t() = default; };
│ │ │ +
220
│ │ │ +
221 /// Assume the calling thread has already obtained mutex ownership
│ │ │ +
222 /// and manage it.
│ │ │ +
223 struct adopt_lock_t { explicit adopt_lock_t() = default; };
│ │ │ +
224
│ │ │ +
225 /// Tag used to prevent a scoped lock from acquiring ownership of a mutex.
│ │ │ + │ │ │ +
227
│ │ │ +
228 /// Tag used to prevent a scoped lock from blocking if a mutex is locked.
│ │ │ + │ │ │ +
230
│ │ │ +
231 /// Tag used to make a scoped lock take ownership of a locked mutex.
│ │ │ + │ │ │ +
233
│ │ │ +
234 /** @brief A simple scoped lock type.
│ │ │ +
235 *
│ │ │ +
236 * A lock_guard controls mutex ownership within a scope, releasing
│ │ │ +
237 * ownership in the destructor.
│ │ │ +
238 *
│ │ │ +
239 * @headerfile mutex
│ │ │ +
240 * @since C++11
│ │ │ +
241 */
│ │ │ +
242 template<typename _Mutex>
│ │ │ +
│ │ │ + │ │ │ +
244 {
│ │ │ +
245 public:
│ │ │ +
246 typedef _Mutex mutex_type;
│ │ │ +
247
│ │ │ +
248 explicit lock_guard(mutex_type& __m) : _M_device(__m)
│ │ │ +
249 { _M_device.lock(); }
│ │ │ +
250
│ │ │ +
251 lock_guard(mutex_type& __m, adopt_lock_t) noexcept : _M_device(__m)
│ │ │ +
252 { } // calling thread owns mutex
│ │ │ +
253
│ │ │ + │ │ │ +
255 { _M_device.unlock(); }
│ │ │ +
256
│ │ │ +
257 lock_guard(const lock_guard&) = delete;
│ │ │ +
258 lock_guard& operator=(const lock_guard&) = delete;
│ │ │ +
259
│ │ │ +
260 private:
│ │ │ +
261 mutex_type& _M_device;
│ │ │ +
262 };
│ │ │ +
│ │ │ +
263
│ │ │ +
264 /// @} group mutexes
│ │ │ +
265_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
266} // namespace
│ │ │ +
267#endif // C++11
│ │ │ +
268#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:229
│ │ │ +
constexpr adopt_lock_t adopt_lock
Tag used to make a scoped lock take ownership of a locked mutex.
Definition std_mutex.h:232
│ │ │ +
constexpr defer_lock_t defer_lock
Tag used to prevent a scoped lock from acquiring ownership of a mutex.
Definition std_mutex.h:226
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ - │ │ │ + │ │ │ +
Do not acquire ownership of the mutex.
Definition std_mutex.h:216
│ │ │ +
Try to acquire ownership of the mutex without blocking.
Definition std_mutex.h:219
│ │ │ +
Assume the calling thread has already obtained mutex ownership and manage it.
Definition std_mutex.h:223
│ │ │ +
A simple scoped lock type.
Definition std_mutex.h:244
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -stringfwd.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// Forward declarations -*- C++ -*- │ │ │ │ +1// std::mutex implementation -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2001-2023 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2003-2023 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,108 +21,286 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/stringfwd.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{string} │ │ │ │ +27 * Do not attempt to use it directly. @headername{mutex} │ │ │ │ 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 │ │ │ │ +30#ifndef _GLIBCXX_MUTEX_H │ │ │ │ +31#define _GLIBCXX_MUTEX_H 1 │ │ │ │ +32 │ │ │ │ +33#pragma GCC system_header │ │ │ │ +34 │ │ │ │ +35#if __cplusplus < 201103L │ │ │ │ +36# include <_b_i_t_s_/_c_+_+_0_x___w_a_r_n_i_n_g_._h> │ │ │ │ +37#else │ │ │ │ 38 │ │ │ │ -39#include <_b_i_t_s_/_c_+_+_c_o_n_f_i_g_._h> │ │ │ │ -40#include <_b_i_t_s_/_m_e_m_o_r_y_f_w_d_._h> │ │ │ │ -41 │ │ │ │ -42namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -43{ │ │ │ │ -44_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -45 │ │ │ │ -46 /** │ │ │ │ -47 * @defgroup strings Strings │ │ │ │ -48 * │ │ │ │ -49 * @{ │ │ │ │ -50 */ │ │ │ │ -51 │ │ │ │ -52 template │ │ │ │ -53 struct char_traits; │ │ │ │ +39#include // EBUSY │ │ │ │ +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 template<> struct char_traits; │ │ │ │ -56 │ │ │ │ -57 template<> struct char_traits; │ │ │ │ -58 │ │ │ │ -59#ifdef _GLIBCXX_USE_CHAR8_T │ │ │ │ -60 template<> struct char_traits; │ │ │ │ -61#endif │ │ │ │ -62 │ │ │ │ -63#if __cplusplus >= 201103L │ │ │ │ -64 template<> struct char_traits; │ │ │ │ -65 template<> struct char_traits; │ │ │ │ -66#endif │ │ │ │ -67 │ │ │ │ -68_GLIBCXX_BEGIN_NAMESPACE_CXX11 │ │ │ │ -69 │ │ │ │ -70 template, │ │ │ │ -71 typename _Alloc = allocator<_CharT> > │ │ │ │ -72 class basic_string; │ │ │ │ -73 │ │ │ │ -74_GLIBCXX_END_NAMESPACE_CXX11 │ │ │ │ -75 │ │ │ │ -76 /// A string of @c char │ │ │ │ -_7_7 typedef _b_a_s_i_c___s_t_r_i_n_g_<_c_h_a_r_> _s_t_r_i_n_g; │ │ │ │ -78 │ │ │ │ -79 /// A string of @c wchar_t │ │ │ │ -_8_0 typedef _b_a_s_i_c___s_t_r_i_n_g_<_w_c_h_a_r___t_> _w_s_t_r_i_n_g; │ │ │ │ -81 │ │ │ │ -82#ifdef _GLIBCXX_USE_CHAR8_T │ │ │ │ -83 /// A string of @c char8_t │ │ │ │ -84 typedef _b_a_s_i_c___s_t_r_i_n_g_<_c_h_a_r_8___t_> u8string; │ │ │ │ -85#endif │ │ │ │ -86 │ │ │ │ -87#if __cplusplus >= 201103L │ │ │ │ -88 /// A string of @c char16_t │ │ │ │ -_8_9 typedef _b_a_s_i_c___s_t_r_i_n_g_<_c_h_a_r_1_6___t_> _u_1_6_s_t_r_i_n_g; │ │ │ │ -90 │ │ │ │ -91 /// A string of @c char32_t │ │ │ │ -_9_2 typedef _b_a_s_i_c___s_t_r_i_n_g_<_c_h_a_r_3_2___t_> _u_3_2_s_t_r_i_n_g; │ │ │ │ -93#endif │ │ │ │ -94 │ │ │ │ -95 /** @} */ │ │ │ │ -96 │ │ │ │ -97_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -98} // namespace std │ │ │ │ -99 │ │ │ │ -100#endif // _STRINGFWD_H │ │ │ │ -_m_e_m_o_r_y_f_w_d_._h │ │ │ │ -_c_+_+_c_o_n_f_i_g_._h │ │ │ │ -_s_t_d_:_:_s_t_r_i_n_g │ │ │ │ -basic_string< char > string │ │ │ │ -A string of char. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_i_n_g_f_w_d_._h_:_7_7 │ │ │ │ -_s_t_d_:_:_u_3_2_s_t_r_i_n_g │ │ │ │ -basic_string< char32_t > u32string │ │ │ │ -A string of char32_t. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_i_n_g_f_w_d_._h_:_9_2 │ │ │ │ -_s_t_d_:_:_u_1_6_s_t_r_i_n_g │ │ │ │ -basic_string< char16_t > u16string │ │ │ │ -A string of char16_t. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_i_n_g_f_w_d_._h_:_8_9 │ │ │ │ -_s_t_d_:_:_w_s_t_r_i_n_g │ │ │ │ -basic_string< wchar_t > wstring │ │ │ │ -A string of wchar_t. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_i_n_g_f_w_d_._h_:_8_0 │ │ │ │ +55#ifdef _GLIBCXX_HAS_GTHREADS │ │ │ │ +56 /// @cond undocumented │ │ │ │ +57 │ │ │ │ +58 // Common base class for std::mutex and std::timed_mutex │ │ │ │ +59 class __mutex_base │ │ │ │ +60 { │ │ │ │ +61 protected: │ │ │ │ +62 typedef __gthread_mutex_t __native_type; │ │ │ │ +63 │ │ │ │ +64#ifdef __GTHREAD_MUTEX_INIT │ │ │ │ +65 __native_type _M_mutex = __GTHREAD_MUTEX_INIT; │ │ │ │ +66 │ │ │ │ +67 constexpr __mutex_base() noexcept = default; │ │ │ │ +68#else │ │ │ │ +69 __native_type _M_mutex; │ │ │ │ +70 │ │ │ │ +71 __mutex_base() noexcept │ │ │ │ +72 { │ │ │ │ +73 // XXX EAGAIN, ENOMEM, EPERM, EBUSY(may), EINVAL(may) │ │ │ │ +74 __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex); │ │ │ │ +75 } │ │ │ │ +76 │ │ │ │ +77 ~__mutex_base() noexcept { __gthread_mutex_destroy(&_M_mutex); } │ │ │ │ +78#endif │ │ │ │ +79 │ │ │ │ +80 __mutex_base(const __mutex_base&) = delete; │ │ │ │ +81 __mutex_base& operator=(const __mutex_base&) = delete; │ │ │ │ +82 }; │ │ │ │ +83 /// @endcond │ │ │ │ +84 │ │ │ │ +85 /** The standard mutex type. │ │ │ │ +86 * │ │ │ │ +87 * A simple, non-recursive, non-timed mutex. │ │ │ │ +88 * │ │ │ │ +89 * Do not call `lock()` and `unlock()` directly, use a scoped lock type │ │ │ │ +90 * such as `std::unique_lock`, `std::lock_guard`, or (since C++17) │ │ │ │ +91 * `std::scoped_lock`. │ │ │ │ +92 * │ │ │ │ +93 * @headerfile mutex │ │ │ │ +94 * @since C++11 │ │ │ │ +95 */ │ │ │ │ +_9_6 class _m_u_t_e_x : private __mutex_base │ │ │ │ +97 { │ │ │ │ +98 public: │ │ │ │ +99 typedef _____n_a_t_i_v_e___t_y_p_e* _n_a_t_i_v_e___h_a_n_d_l_e___t_y_p_e; │ │ │ │ +100 │ │ │ │ +101#ifdef __GTHREAD_MUTEX_INIT │ │ │ │ +102 constexpr │ │ │ │ +103#endif │ │ │ │ +104 _m_u_t_e_x() noexcept = default; │ │ │ │ +105 _~_m_u_t_e_x() = default; │ │ │ │ +106 │ │ │ │ +107 _m_u_t_e_x(const _m_u_t_e_x&) = delete; │ │ │ │ +108 _m_u_t_e_x& operator=(const _m_u_t_e_x&) = delete; │ │ │ │ +109 │ │ │ │ +110 void │ │ │ │ +111 lock() │ │ │ │ +112 { │ │ │ │ +113 int __e = __gthread_mutex_lock(&_M_mutex); │ │ │ │ +114 │ │ │ │ +115 // EINVAL, EAGAIN, EBUSY, EINVAL, EDEADLK(may) │ │ │ │ +116 if (__e) │ │ │ │ +117 __throw_system_error(__e); │ │ │ │ +118 } │ │ │ │ +119 │ │ │ │ +120 _GLIBCXX_NODISCARD │ │ │ │ +121 bool │ │ │ │ +122 try_lock() noexcept │ │ │ │ +123 { │ │ │ │ +124 // XXX EINVAL, EAGAIN, EBUSY │ │ │ │ +125 return !__gthread_mutex_trylock(&_M_mutex); │ │ │ │ +126 } │ │ │ │ +127 │ │ │ │ +128 void │ │ │ │ +129 unlock() │ │ │ │ +130 { │ │ │ │ +131 // XXX EINVAL, EAGAIN, EPERM │ │ │ │ +132 __gthread_mutex_unlock(&_M_mutex); │ │ │ │ +133 } │ │ │ │ +134 │ │ │ │ +135 _n_a_t_i_v_e___h_a_n_d_l_e___t_y_p_e │ │ │ │ +136 native_handle() noexcept │ │ │ │ +137 { return &_M_mutex; } │ │ │ │ +138 }; │ │ │ │ +139 │ │ │ │ +140 /// @cond undocumented │ │ │ │ +141 │ │ │ │ +142 // Implementation details for std::condition_variable │ │ │ │ +143 class __condvar │ │ │ │ +144 { │ │ │ │ +145 using _t_i_m_e_s_p_e_c = __gthread_time_t; │ │ │ │ +146 │ │ │ │ +147 public: │ │ │ │ +148 __condvar() noexcept │ │ │ │ +149 { │ │ │ │ +150#ifndef __GTHREAD_COND_INIT │ │ │ │ +151 _____G_T_H_R_E_A_D___C_O_N_D___I_N_I_T___F_U_N_C_T_I_O_N(&_M_cond); │ │ │ │ +152#endif │ │ │ │ +153 } │ │ │ │ +154 │ │ │ │ +155 ~__condvar() │ │ │ │ +156 { │ │ │ │ +157 int __e __attribute__((__unused__)) = __gthread_cond_destroy(&_M_cond); │ │ │ │ +158 __glibcxx_assert(__e != EBUSY); // threads are still blocked │ │ │ │ +159 } │ │ │ │ +160 │ │ │ │ +161 __condvar(const __condvar&) = delete; │ │ │ │ +162 __condvar& operator=(const __condvar&) = delete; │ │ │ │ +163 │ │ │ │ +164 __gthread_cond_t* native_handle() noexcept { return &_M_cond; } │ │ │ │ +165 │ │ │ │ +166 // Expects: Calling thread has locked __m. │ │ │ │ +167 void │ │ │ │ +168 wait(mutex& __m) │ │ │ │ +169 { │ │ │ │ +170 int __e __attribute__((__unused__)) │ │ │ │ +171 = __gthread_cond_wait(&_M_cond, __m.native_handle()); │ │ │ │ +172 __glibcxx_assert(__e == 0); │ │ │ │ +173 } │ │ │ │ +174 │ │ │ │ +175 void │ │ │ │ +176 wait_until(mutex& __m, timespec& __abs_time) │ │ │ │ +177 { │ │ │ │ +178 __gthread_cond_timedwait(&_M_cond, __m.native_handle(), &__abs_time); │ │ │ │ +179 } │ │ │ │ +180 │ │ │ │ +181#ifdef _GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT │ │ │ │ +182 void │ │ │ │ +183 wait_until(mutex& __m, clockid_t __clock, timespec& __abs_time) │ │ │ │ +184 { │ │ │ │ +185 pthread_cond_clockwait(&_M_cond, __m.native_handle(), __clock, │ │ │ │ +186 &__abs_time); │ │ │ │ +187 } │ │ │ │ +188#endif │ │ │ │ +189 │ │ │ │ +190 void │ │ │ │ +191 notify_one() noexcept │ │ │ │ +192 { │ │ │ │ +193 int __e __attribute__((__unused__)) = __gthread_cond_signal(&_M_cond); │ │ │ │ +194 __glibcxx_assert(__e == 0); │ │ │ │ +195 } │ │ │ │ +196 │ │ │ │ +197 void │ │ │ │ +198 notify_all() noexcept │ │ │ │ +199 { │ │ │ │ +200 int __e __attribute__((__unused__)) = __gthread_cond_broadcast(&_M_cond); │ │ │ │ +201 __glibcxx_assert(__e == 0); │ │ │ │ +202 } │ │ │ │ +203 │ │ │ │ +204 protected: │ │ │ │ +205#ifdef __GTHREAD_COND_INIT │ │ │ │ +206 __gthread_cond_t _M_cond = __GTHREAD_COND_INIT; │ │ │ │ +207#else │ │ │ │ +208 __gthread_cond_t _M_cond; │ │ │ │ +209#endif │ │ │ │ +210 }; │ │ │ │ +211 /// @endcond │ │ │ │ +212 │ │ │ │ +213#endif // _GLIBCXX_HAS_GTHREADS │ │ │ │ +214 │ │ │ │ +215 /// Do not acquire ownership of the mutex. │ │ │ │ +_2_1_6 struct _d_e_f_e_r___l_o_c_k___t { explicit _d_e_f_e_r___l_o_c_k___t() = default; }; │ │ │ │ +217 │ │ │ │ +218 /// Try to acquire ownership of the mutex without blocking. │ │ │ │ +_2_1_9 struct _t_r_y___t_o___l_o_c_k___t { explicit _t_r_y___t_o___l_o_c_k___t() = default; }; │ │ │ │ +220 │ │ │ │ +221 /// Assume the calling thread has already obtained mutex ownership │ │ │ │ +222 /// and manage it. │ │ │ │ +_2_2_3 struct _a_d_o_p_t___l_o_c_k___t { explicit _a_d_o_p_t___l_o_c_k___t() = default; }; │ │ │ │ +224 │ │ │ │ +225 /// Tag used to prevent a scoped lock from acquiring ownership of a mutex. │ │ │ │ +_2_2_6 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _d_e_f_e_r___l_o_c_k___t _d_e_f_e_r___l_o_c_k { }; │ │ │ │ +227 │ │ │ │ +228 /// Tag used to prevent a scoped lock from blocking if a mutex is locked. │ │ │ │ +_2_2_9 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _t_r_y___t_o___l_o_c_k___t _t_r_y___t_o___l_o_c_k { }; │ │ │ │ +230 │ │ │ │ +231 /// Tag used to make a scoped lock take ownership of a locked mutex. │ │ │ │ +_2_3_2 ___G_L_I_B_C_X_X_1_7___I_N_L_I_N_E constexpr _a_d_o_p_t___l_o_c_k___t _a_d_o_p_t___l_o_c_k { }; │ │ │ │ +233 │ │ │ │ +234 /** @brief A simple scoped lock type. │ │ │ │ +235 * │ │ │ │ +236 * A lock_guard controls mutex ownership within a scope, releasing │ │ │ │ +237 * ownership in the destructor. │ │ │ │ +238 * │ │ │ │ +239 * @headerfile mutex │ │ │ │ +240 * @since C++11 │ │ │ │ +241 */ │ │ │ │ +242 template │ │ │ │ +_2_4_3 class _l_o_c_k___g_u_a_r_d │ │ │ │ +244 { │ │ │ │ +245 public: │ │ │ │ +246 typedef ___M_u_t_e_x mutex_type; │ │ │ │ +247 │ │ │ │ +248 explicit _l_o_c_k___g_u_a_r_d(mutex_type& _____m) : _M_device(_____m) │ │ │ │ +249 { _M_device.lock(); } │ │ │ │ +250 │ │ │ │ +251 _l_o_c_k___g_u_a_r_d(mutex_type& _____m, _a_d_o_p_t___l_o_c_k___t) noexcept : _M_device(_____m) │ │ │ │ +252 { } // calling thread owns mutex │ │ │ │ +253 │ │ │ │ +254 _~_l_o_c_k___g_u_a_r_d() │ │ │ │ +255 { _M_device.unlock(); } │ │ │ │ +256 │ │ │ │ +257 _l_o_c_k___g_u_a_r_d(const _l_o_c_k___g_u_a_r_d&) = delete; │ │ │ │ +258 _l_o_c_k___g_u_a_r_d& operator=(const _l_o_c_k___g_u_a_r_d&) = delete; │ │ │ │ +259 │ │ │ │ +260 private: │ │ │ │ +261 mutex_type& _M_device; │ │ │ │ +262 }; │ │ │ │ +263 │ │ │ │ +264 /// @} group mutexes │ │ │ │ +265_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +266} // namespace │ │ │ │ +267#endif // C++11 │ │ │ │ +268#endif // _GLIBCXX_MUTEX_H │ │ │ │ +_c_+_+_0_x___w_a_r_n_i_n_g_._h │ │ │ │ +_f_u_n_c_t_e_x_c_e_p_t_._h │ │ │ │ +_s_t_d_:_:_t_r_y___t_o___l_o_c_k │ │ │ │ +constexpr try_to_lock_t try_to_lock │ │ │ │ +Tag used to prevent a scoped lock from blocking if a mutex is locked. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_2_9 │ │ │ │ +_s_t_d_:_:_a_d_o_p_t___l_o_c_k │ │ │ │ +constexpr adopt_lock_t adopt_lock │ │ │ │ +Tag used to make a scoped lock take ownership of a locked mutex. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_3_2 │ │ │ │ +_s_t_d_:_:_d_e_f_e_r___l_o_c_k │ │ │ │ +constexpr defer_lock_t defer_lock │ │ │ │ +Tag used to prevent a scoped lock from acquiring ownership of a mutex. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_2_6 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ +_s_t_d_:_:_m_u_t_e_x │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_9_7 │ │ │ │ +_s_t_d_:_:_d_e_f_e_r___l_o_c_k___t │ │ │ │ +Do not acquire ownership of the mutex. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_1_6 │ │ │ │ +_s_t_d_:_:_t_r_y___t_o___l_o_c_k___t │ │ │ │ +Try to acquire ownership of the mutex without blocking. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_1_9 │ │ │ │ +_s_t_d_:_:_a_d_o_p_t___l_o_c_k___t │ │ │ │ +Assume the calling thread has already obtained mutex ownership and manage it. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_2_3 │ │ │ │ +_s_t_d_:_:_l_o_c_k___g_u_a_r_d │ │ │ │ +A simple scoped lock type. │ │ │ │ +DDeeffiinniittiioonn _s_t_d___m_u_t_e_x_._h_:_2_4_4 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_i_n_g_f_w_d_._h │ │ │ │ + * _s_t_d___m_u_t_e_x_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00377.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: streambuf.tcc File Reference │ │ │ +libstdc++: fstream.tcc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -47,66 +47,56 @@ │ │ │ $(document).ready(function(){initNavTree('a00377.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ Namespaces | │ │ │ -Macros | │ │ │ -Functions
│ │ │ -
streambuf.tcc File Reference
│ │ │ +Macros
│ │ │ +
fstream.tcc 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 > *, basic_streambuf< _CharT, _Traits > *, bool &)
 
#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 <streambuf>.

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file streambuf.tcc.

│ │ │ +

Definition in file fstream.tcc.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ _STREAMBUF_TCC

│ │ │ + │ │ │ +

◆ _FSTREAM_TCC

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

Definition at line 35 of file streambuf.tcc.

│ │ │ +

Definition at line 35 of file fstream.tcc.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,30 +1,21 @@ │ │ │ │ libstdc++ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -streambuf.tcc File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ +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_. │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ MMaaccrrooss │ │ │ │ -#define  ___S_T_R_E_A_M_B_U_F___T_C_C │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e _CharT , _t_y_p_e_n_a_m_e _Traits > │ │ │ │ -_s_t_r_e_a_m_s_i_z_e  _s_t_d_:_:_____c_o_p_y___s_t_r_e_a_m_b_u_f_s (_b_a_s_i_c___s_t_r_e_a_m_b_u_f< _CharT, _Traits > *_____s_b_i_n, │ │ │ │ - _b_a_s_i_c___s_t_r_e_a_m_b_u_f< _CharT, _Traits > *_____s_b_o_u_t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _CharT , _t_y_p_e_n_a_m_e _Traits > │ │ │ │ -_s_t_r_e_a_m_s_i_z_e  _s_t_d_:_:_____c_o_p_y___s_t_r_e_a_m_b_u_f_s___e_o_f (_b_a_s_i_c___s_t_r_e_a_m_b_u_f< _CharT, _Traits > *, │ │ │ │ - _b_a_s_i_c___s_t_r_e_a_m_b_u_f< _CharT, _Traits > *, bool &) │ │ │ │ +#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 _s_t_r_e_a_m_b_u_f_._t_c_c. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _f_s_t_r_e_a_m_._t_c_c. │ │ │ │ ********** 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. │ │ │ │ +********** _?◆_? __FFSSTTRREEAAMM__TTCCCC ********** │ │ │ │ +#define _FSTREAM_TCC │ │ │ │ +Definition at line _3_5 of file _f_s_t_r_e_a_m_._t_c_c. │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_e_a_m_b_u_f_._t_c_c │ │ │ │ + * _f_s_t_r_e_a_m_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00377_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: streambuf.tcc Source File │ │ │ +libstdc++: fstream.tcc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,18 +45,18 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
streambuf.tcc
│ │ │ +
fstream.tcc
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Stream buffer classes -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// File based streams -*- C++ -*-
│ │ │
2
│ │ │
3// Copyright (C) 1997-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │ @@ -72,175 +72,1184 @@ │ │ │
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/fstream.tcc
│ │ │
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{fstream}
│ │ │
28 */
│ │ │
29
│ │ │
30//
│ │ │ -
31// ISO C++ 14882: 27.5 Stream buffers
│ │ │ +
31// ISO C++ 14882: 27.8 File-based streams
│ │ │
32//
│ │ │
33
│ │ │ -
34#ifndef _STREAMBUF_TCC
│ │ │ -
35#define _STREAMBUF_TCC 1
│ │ │ +
34#ifndef _FSTREAM_TCC
│ │ │ +
35#define _FSTREAM_TCC 1
│ │ │
36
│ │ │
37#pragma GCC system_header
│ │ │
38
│ │ │ -
39namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
40{
│ │ │ -
41_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
39#include <bits/cxxabi_forced.h>
│ │ │ +
40#include <bits/move.h> // for swap
│ │ │ +
41#include <cerrno>
│ │ │
42
│ │ │ -
43 template<typename _CharT, typename _Traits>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ -
47 {
│ │ │ -
48 streamsize __ret = 0;
│ │ │ -
49 while (__ret < __n)
│ │ │ -
50 {
│ │ │ -
51 const streamsize __buf_len = this->egptr() - this->gptr();
│ │ │ -
52 if (__buf_len)
│ │ │ -
53 {
│ │ │ -
54 const streamsize __remaining = __n - __ret;
│ │ │ - │ │ │ -
56 traits_type::copy(__s, this->gptr(), __len);
│ │ │ -
57 __ret += __len;
│ │ │ -
58 __s += __len;
│ │ │ -
59 this->__safe_gbump(__len);
│ │ │ -
60 }
│ │ │ -
61
│ │ │ -
62 if (__ret < __n)
│ │ │ -
63 {
│ │ │ -
64 const int_type __c = this->uflow();
│ │ │ -
65 if (!traits_type::eq_int_type(__c, traits_type::eof()))
│ │ │ -
66 {
│ │ │ -
67 traits_type::assign(*__s++, traits_type::to_char_type(__c));
│ │ │ -
68 ++__ret;
│ │ │ -
69 }
│ │ │ -
70 else
│ │ │ -
71 break;
│ │ │ -
72 }
│ │ │ -
73 }
│ │ │ -
74 return __ret;
│ │ │ -
75 }
│ │ │ -
│ │ │ -
76
│ │ │ -
77 template<typename _CharT, typename _Traits>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ - │ │ │ -
81 {
│ │ │ -
82 streamsize __ret = 0;
│ │ │ -
83 while (__ret < __n)
│ │ │ -
84 {
│ │ │ -
85 const streamsize __buf_len = this->epptr() - this->pptr();
│ │ │ -
86 if (__buf_len)
│ │ │ -
87 {
│ │ │ -
88 const streamsize __remaining = __n - __ret;
│ │ │ - │ │ │ -
90 traits_type::copy(this->pptr(), __s, __len);
│ │ │ -
91 __ret += __len;
│ │ │ -
92 __s += __len;
│ │ │ -
93 this->__safe_pbump(__len);
│ │ │ -
94 }
│ │ │ -
95
│ │ │ -
96 if (__ret < __n)
│ │ │ -
97 {
│ │ │ -
98 int_type __c = this->overflow(traits_type::to_int_type(*__s));
│ │ │ -
99 if (!traits_type::eq_int_type(__c, traits_type::eof()))
│ │ │ -
100 {
│ │ │ -
101 ++__ret;
│ │ │ -
102 ++__s;
│ │ │ -
103 }
│ │ │ -
104 else
│ │ │ -
105 break;
│ │ │ -
106 }
│ │ │ -
107 }
│ │ │ -
108 return __ret;
│ │ │ -
109 }
│ │ │ -
│ │ │ -
110
│ │ │ -
111 // Conceivably, this could be used to implement buffer-to-buffer
│ │ │ -
112 // copies, if this was ever desired in an un-ambiguous way by the
│ │ │ -
113 // standard.
│ │ │ -
114 template<typename _CharT, typename _Traits>
│ │ │ - │ │ │ -
116 __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin,
│ │ │ - │ │ │ -
118 bool& __ineof)
│ │ │ -
119 {
│ │ │ -
120 streamsize __ret = 0;
│ │ │ -
121 __ineof = true;
│ │ │ -
122 typename _Traits::int_type __c = __sbin->sgetc();
│ │ │ -
123 while (!_Traits::eq_int_type(__c, _Traits::eof()))
│ │ │ -
124 {
│ │ │ -
125 __c = __sbout->sputc(_Traits::to_char_type(__c));
│ │ │ -
126 if (_Traits::eq_int_type(__c, _Traits::eof()))
│ │ │ -
127 {
│ │ │ -
128 __ineof = false;
│ │ │ -
129 break;
│ │ │ -
130 }
│ │ │ -
131 ++__ret;
│ │ │ -
132 __c = __sbin->snextc();
│ │ │ -
133 }
│ │ │ -
134 return __ret;
│ │ │ -
135 }
│ │ │ -
136
│ │ │ -
137 template<typename _CharT, typename _Traits>
│ │ │ -
138 inline streamsize
│ │ │ -
139 __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin,
│ │ │ -
140 basic_streambuf<_CharT, _Traits>* __sbout)
│ │ │ -
141 {
│ │ │ -
142 bool __ineof;
│ │ │ -
143 return __copy_streambufs_eof(__sbin, __sbout, __ineof);
│ │ │ -
144 }
│ │ │ -
145
│ │ │ -
146 // Inhibit implicit instantiations for required instantiations,
│ │ │ -
147 // which are defined via explicit instantiations elsewhere.
│ │ │ -
148#if _GLIBCXX_EXTERN_TEMPLATE
│ │ │ -
149 extern template class basic_streambuf<char>;
│ │ │ -
150
│ │ │ -
151 extern template
│ │ │ - │ │ │ -
153 __copy_streambufs(basic_streambuf<char>*,
│ │ │ -
154 basic_streambuf<char>*);
│ │ │ -
155
│ │ │ -
156#ifdef _GLIBCXX_USE_WCHAR_T
│ │ │ -
157 extern template class basic_streambuf<wchar_t>;
│ │ │ -
158
│ │ │ -
159 extern template
│ │ │ - │ │ │ -
161 __copy_streambufs(basic_streambuf<wchar_t>*,
│ │ │ -
162 basic_streambuf<wchar_t>*);
│ │ │ -
163#endif
│ │ │ -
164#endif
│ │ │ -
165
│ │ │ -
166_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
167} // namespace std
│ │ │ -
168
│ │ │ -
169#endif
│ │ │ -
constexpr const _Tp & min(const _Tp &, const _Tp &)
This does what you think it does.
│ │ │ +
43namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
44{
│ │ │ +
45_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
46
│ │ │ +
47 template<typename _CharT, typename _Traits>
│ │ │ +
48 void
│ │ │ +
49 basic_filebuf<_CharT, _Traits>::
│ │ │ +
50 _M_allocate_internal_buffer()
│ │ │ +
51 {
│ │ │ +
52 // Allocate internal buffer only if one doesn't already exist
│ │ │ +
53 // (either allocated or provided by the user via setbuf).
│ │ │ +
54 if (!_M_buf_allocated && !_M_buf)
│ │ │ +
55 {
│ │ │ +
56 _M_buf = new char_type[_M_buf_size];
│ │ │ +
57 _M_buf_allocated = true;
│ │ │ +
58 }
│ │ │ +
59 }
│ │ │ +
60
│ │ │ +
61 template<typename _CharT, typename _Traits>
│ │ │ +
62 void
│ │ │ +
63 basic_filebuf<_CharT, _Traits>::
│ │ │ +
64 _M_destroy_internal_buffer() throw()
│ │ │ +
65 {
│ │ │ +
66 if (_M_buf_allocated)
│ │ │ +
67 {
│ │ │ +
68 delete [] _M_buf;
│ │ │ +
69 _M_buf = 0;
│ │ │ +
70 _M_buf_allocated = false;
│ │ │ +
71 }
│ │ │ +
72 delete [] _M_ext_buf;
│ │ │ +
73 _M_ext_buf = 0;
│ │ │ +
74 _M_ext_buf_size = 0;
│ │ │ +
75 _M_ext_next = 0;
│ │ │ +
76 _M_ext_end = 0;
│ │ │ +
77 }
│ │ │ +
78
│ │ │ +
79 template<typename _CharT, typename _Traits>
│ │ │ +
│ │ │ + │ │ │ +
81 basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
│ │ │ +
82 _M_mode(ios_base::openmode(0)), _M_state_beg(), _M_state_cur(),
│ │ │ +
83 _M_state_last(), _M_buf(0), _M_buf_size(_GLIBCXX_BUFSIZ),
│ │ │ +
84 _M_buf_allocated(false), _M_reading(false), _M_writing(false), _M_pback(),
│ │ │ +
85 _M_pback_cur_save(0), _M_pback_end_save(0), _M_pback_init(false),
│ │ │ +
86 _M_codecvt(0), _M_ext_buf(0), _M_ext_buf_size(0), _M_ext_next(0),
│ │ │ +
87 _M_ext_end(0)
│ │ │ +
88 {
│ │ │ + │ │ │ +
90 }
│ │ │ +
│ │ │ +
91
│ │ │ +
92#if __cplusplus >= 201103L
│ │ │ +
93 template<typename _CharT, typename _Traits>
│ │ │ + │ │ │ + │ │ │ +
96 : __streambuf_type(__rhs),
│ │ │ +
97 _M_lock(), _M_file(std::move(__rhs._M_file), &_M_lock),
│ │ │ +
98 _M_mode(std::__exchange(__rhs._M_mode, ios_base::openmode(0))),
│ │ │ +
99 _M_state_beg(std::move(__rhs._M_state_beg)),
│ │ │ +
100 _M_state_cur(std::move(__rhs._M_state_cur)),
│ │ │ +
101 _M_state_last(std::move(__rhs._M_state_last)),
│ │ │ +
102 _M_buf(std::__exchange(__rhs._M_buf, nullptr)),
│ │ │ +
103 _M_buf_size(std::__exchange(__rhs._M_buf_size, 1)),
│ │ │ +
104 _M_buf_allocated(std::__exchange(__rhs._M_buf_allocated, false)),
│ │ │ +
105 _M_reading(std::__exchange(__rhs._M_reading, false)),
│ │ │ +
106 _M_writing(std::__exchange(__rhs._M_writing, false)),
│ │ │ +
107 _M_pback(__rhs._M_pback),
│ │ │ +
108 _M_pback_cur_save(std::__exchange(__rhs._M_pback_cur_save, nullptr)),
│ │ │ +
109 _M_pback_end_save(std::__exchange(__rhs._M_pback_end_save, nullptr)),
│ │ │ +
110 _M_pback_init(std::__exchange(__rhs._M_pback_init, false)),
│ │ │ +
111 _M_codecvt(__rhs._M_codecvt),
│ │ │ +
112 _M_ext_buf(std::__exchange(__rhs._M_ext_buf, nullptr)),
│ │ │ +
113 _M_ext_buf_size(std::__exchange(__rhs._M_ext_buf_size, 0)),
│ │ │ +
114 _M_ext_next(std::__exchange(__rhs._M_ext_next, nullptr)),
│ │ │ +
115 _M_ext_end(std::__exchange(__rhs._M_ext_end, nullptr))
│ │ │ +
116 {
│ │ │ +
117 __rhs._M_set_buffer(-1);
│ │ │ +
118 __rhs._M_state_last = __rhs._M_state_cur = __rhs._M_state_beg;
│ │ │ +
119 }
│ │ │ +
120
│ │ │ +
121 template<typename _CharT, typename _Traits>
│ │ │ +
122 basic_filebuf<_CharT, _Traits>&
│ │ │ +
123 basic_filebuf<_CharT, _Traits>::
│ │ │ +
124 operator=(basic_filebuf&& __rhs)
│ │ │ +
125 {
│ │ │ +
126 this->close();
│ │ │ +
127 __streambuf_type::operator=(__rhs);
│ │ │ +
128 _M_file.swap(__rhs._M_file);
│ │ │ +
129 _M_mode = std::__exchange(__rhs._M_mode, ios_base::openmode(0));
│ │ │ +
130 _M_state_beg = std::move(__rhs._M_state_beg);
│ │ │ +
131 _M_state_cur = std::move(__rhs._M_state_cur);
│ │ │ +
132 _M_state_last = std::move(__rhs._M_state_last);
│ │ │ +
133 _M_buf = std::__exchange(__rhs._M_buf, nullptr);
│ │ │ +
134 _M_buf_size = std::__exchange(__rhs._M_buf_size, 1);
│ │ │ +
135 _M_buf_allocated = std::__exchange(__rhs._M_buf_allocated, false);
│ │ │ +
136 _M_ext_buf = std::__exchange(__rhs._M_ext_buf, nullptr);
│ │ │ +
137 _M_ext_buf_size = std::__exchange(__rhs._M_ext_buf_size, 0);
│ │ │ +
138 _M_ext_next = std::__exchange(__rhs._M_ext_next, nullptr);
│ │ │ +
139 _M_ext_end = std::__exchange(__rhs._M_ext_end, nullptr);
│ │ │ +
140 _M_reading = std::__exchange(__rhs._M_reading, false);
│ │ │ +
141 _M_writing = std::__exchange(__rhs._M_writing, false);
│ │ │ +
142 _M_pback_cur_save = std::__exchange(__rhs._M_pback_cur_save, nullptr);
│ │ │ +
143 _M_pback_end_save = std::__exchange(__rhs._M_pback_end_save, nullptr);
│ │ │ +
144 _M_pback_init = std::__exchange(__rhs._M_pback_init, false);
│ │ │ +
145 __rhs._M_set_buffer(-1);
│ │ │ +
146 __rhs._M_state_last = __rhs._M_state_cur = __rhs._M_state_beg;
│ │ │ +
147 return *this;
│ │ │ +
148 }
│ │ │ +
149
│ │ │ +
150 template<typename _CharT, typename _Traits>
│ │ │ +
151 void
│ │ │ +
152 basic_filebuf<_CharT, _Traits>::
│ │ │ +
153 swap(basic_filebuf& __rhs)
│ │ │ +
154 {
│ │ │ +
155 __streambuf_type::swap(__rhs);
│ │ │ +
156 _M_file.swap(__rhs._M_file);
│ │ │ +
157 std::swap(_M_mode, __rhs._M_mode);
│ │ │ +
158 std::swap(_M_state_beg, __rhs._M_state_beg);
│ │ │ +
159 std::swap(_M_state_cur, __rhs._M_state_cur);
│ │ │ +
160 std::swap(_M_state_last, __rhs._M_state_last);
│ │ │ +
161 std::swap(_M_buf, __rhs._M_buf);
│ │ │ +
162 std::swap(_M_buf_size, __rhs._M_buf_size);
│ │ │ +
163 std::swap(_M_buf_allocated, __rhs._M_buf_allocated);
│ │ │ +
164 std::swap(_M_ext_buf, __rhs._M_ext_buf);
│ │ │ +
165 std::swap(_M_ext_buf_size, __rhs._M_ext_buf_size);
│ │ │ +
166 std::swap(_M_ext_next, __rhs._M_ext_next);
│ │ │ +
167 std::swap(_M_ext_end, __rhs._M_ext_end);
│ │ │ +
168 std::swap(_M_reading, __rhs._M_reading);
│ │ │ +
169 std::swap(_M_writing, __rhs._M_writing);
│ │ │ +
170 std::swap(_M_pback_cur_save, __rhs._M_pback_cur_save);
│ │ │ +
171 std::swap(_M_pback_end_save, __rhs._M_pback_end_save);
│ │ │ +
172 std::swap(_M_pback_init, __rhs._M_pback_init);
│ │ │ +
173 }
│ │ │ +
174#endif
│ │ │ +
175
│ │ │ +
176 template<typename _CharT, typename _Traits>
│ │ │ +
177 typename basic_filebuf<_CharT, _Traits>::__filebuf_type*
│ │ │ +
│ │ │ + │ │ │ +
179 open(const char* __s, ios_base::openmode __mode)
│ │ │ +
180 {
│ │ │ + │ │ │ +
182 if (!this->is_open())
│ │ │ +
183 {
│ │ │ +
184 _M_file.open(__s, __mode);
│ │ │ +
185 if (this->is_open())
│ │ │ +
186 {
│ │ │ +
187 _M_allocate_internal_buffer();
│ │ │ +
188 _M_mode = __mode;
│ │ │ +
189
│ │ │ +
190 // Setup initial buffer to 'uncommitted' mode.
│ │ │ +
191 _M_reading = false;
│ │ │ +
192 _M_writing = false;
│ │ │ +
193 _M_set_buffer(-1);
│ │ │ +
194
│ │ │ +
195 // Reset to initial state.
│ │ │ +
196 _M_state_last = _M_state_cur = _M_state_beg;
│ │ │ +
197
│ │ │ +
198 // 27.8.1.3,4
│ │ │ +
199 if ((__mode & ios_base::ate)
│ │ │ +
200 && this->seekoff(0, ios_base::end, __mode)
│ │ │ +
201 == pos_type(off_type(-1)))
│ │ │ +
202 this->close();
│ │ │ +
203 else
│ │ │ +
204 __ret = this;
│ │ │ +
205 }
│ │ │ +
206 }
│ │ │ +
207 return __ret;
│ │ │ +
208 }
│ │ │ +
│ │ │ +
209
│ │ │ +
210#if _GLIBCXX_HAVE__WFOPEN && _GLIBCXX_USE_WCHAR_T
│ │ │ +
211 template<typename _CharT, typename _Traits>
│ │ │ + │ │ │ + │ │ │ +
214 open(const wchar_t* __s, ios_base::openmode __mode)
│ │ │ +
215 {
│ │ │ +
216 __filebuf_type *__ret = 0;
│ │ │ +
217 if (!this->is_open())
│ │ │ +
218 {
│ │ │ +
219 _M_file.open(__s, __mode);
│ │ │ +
220 if (this->is_open())
│ │ │ +
221 {
│ │ │ +
222 _M_allocate_internal_buffer();
│ │ │ +
223 _M_mode = __mode;
│ │ │ +
224
│ │ │ +
225 // Setup initial buffer to 'uncommitted' mode.
│ │ │ +
226 _M_reading = false;
│ │ │ +
227 _M_writing = false;
│ │ │ +
228 _M_set_buffer(-1);
│ │ │ +
229
│ │ │ +
230 // Reset to initial state.
│ │ │ +
231 _M_state_last = _M_state_cur = _M_state_beg;
│ │ │ +
232
│ │ │ +
233 // 27.8.1.3,4
│ │ │ +
234 if ((__mode & ios_base::ate)
│ │ │ +
235 && this->seekoff(0, ios_base::end, __mode)
│ │ │ +
236 == pos_type(off_type(-1)))
│ │ │ +
237 this->close();
│ │ │ +
238 else
│ │ │ +
239 __ret = this;
│ │ │ +
240 }
│ │ │ +
241 }
│ │ │ +
│ │ │ +
242 return __ret;
│ │ │ +
243 }
│ │ │ +
244#endif // HAVE__WFOPEN && USE_WCHAR_T
│ │ │ +
245
│ │ │ +
246 template<typename _CharT, typename _Traits>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
249 close()
│ │ │ +
250 {
│ │ │ +
251 if (!this->is_open())
│ │ │ +
252 return 0;
│ │ │ +
253
│ │ │ +
254 bool __testfail = false;
│ │ │ +
255 {
│ │ │ +
256 // NB: Do this here so that re-opened filebufs will be cool...
│ │ │ +
257 struct __close_sentry
│ │ │ +
258 {
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
262 {
│ │ │ +
263 __fb->_M_mode = ios_base::openmode(0);
│ │ │ +
264 __fb->_M_pback_init = false;
│ │ │ +
265 __fb->_M_destroy_internal_buffer();
│ │ │ +
266 __fb->_M_reading = false;
│ │ │ +
267 __fb->_M_writing = false;
│ │ │ +
268 __fb->_M_set_buffer(-1);
│ │ │ +
269 __fb->_M_state_last = __fb->_M_state_cur = __fb->_M_state_beg;
│ │ │ +
270 }
│ │ │ +
271 } __cs (this);
│ │ │ +
272
│ │ │ +
273 __try
│ │ │ +
274 {
│ │ │ +
275 if (!_M_terminate_output())
│ │ │ +
276 __testfail = true;
│ │ │ +
277 }
│ │ │ +
278 __catch(...)
│ │ │ +
279 {
│ │ │ +
280 _M_file.close();
│ │ │ +
281 __throw_exception_again;
│ │ │ +
282 }
│ │ │ +
283 }
│ │ │ +
284
│ │ │ +
285 if (!_M_file.close())
│ │ │ +
286 __testfail = true;
│ │ │ +
287
│ │ │ +
288 if (__testfail)
│ │ │ +
289 return 0;
│ │ │ +
290 else
│ │ │ +
291 return this;
│ │ │ +
292 }
│ │ │ +
│ │ │ +
293
│ │ │ +
294 template<typename _CharT, typename _Traits>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ + │ │ │ +
298 {
│ │ │ +
299 streamsize __ret = -1;
│ │ │ +
300 const bool __testin = _M_mode & ios_base::in;
│ │ │ +
301 if (__testin && this->is_open())
│ │ │ +
302 {
│ │ │ +
303 // For a stateful encoding (-1) the pending sequence might be just
│ │ │ +
304 // shift and unshift prefixes with no actual character.
│ │ │ +
305 __ret = this->egptr() - this->gptr();
│ │ │ +
306
│ │ │ +
307#if _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM
│ │ │ +
308 // About this workaround, see libstdc++/20806.
│ │ │ +
309 const bool __testbinary = _M_mode & ios_base::binary;
│ │ │ +
310 if (__check_facet(_M_codecvt).encoding() >= 0
│ │ │ +
311 && __testbinary)
│ │ │ +
312#else
│ │ │ +
313 if (__check_facet(_M_codecvt).encoding() >= 0)
│ │ │ +
314#endif
│ │ │ +
315 __ret += _M_file.showmanyc() / _M_codecvt->max_length();
│ │ │ +
316 }
│ │ │ +
│ │ │ +
317 return __ret;
│ │ │ +
318 }
│ │ │ +
319
│ │ │ +
320 template<typename _CharT, typename _Traits>
│ │ │ +
321 typename basic_filebuf<_CharT, _Traits>::int_type
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
324 {
│ │ │ +
325 int_type __ret = traits_type::eof();
│ │ │ +
326 const bool __testin = _M_mode & ios_base::in;
│ │ │ +
327 if (__testin)
│ │ │ +
328 {
│ │ │ +
329 if (_M_writing)
│ │ │ +
330 {
│ │ │ +
331 if (overflow() == traits_type::eof())
│ │ │ +
332 return __ret;
│ │ │ +
333 _M_set_buffer(-1);
│ │ │ +
334 _M_writing = false;
│ │ │ +
335 }
│ │ │ +
336 // Check for pback madness, and if so switch back to the
│ │ │ +
337 // normal buffers and jet outta here before expensive
│ │ │ +
338 // fileops happen...
│ │ │ +
339 _M_destroy_pback();
│ │ │ +
340
│ │ │ +
341 if (this->gptr() < this->egptr())
│ │ │ +
342 return traits_type::to_int_type(*this->gptr());
│ │ │ +
343
│ │ │ +
344 // Get and convert input sequence.
│ │ │ +
345 const size_t __buflen = _M_buf_size > 1 ? _M_buf_size - 1 : 1;
│ │ │ +
346
│ │ │ +
347 // Will be set to true if ::read() returns 0 indicating EOF.
│ │ │ +
348 bool __got_eof = false;
│ │ │ +
349 // Number of internal characters produced.
│ │ │ +
350 streamsize __ilen = 0;
│ │ │ +
351 codecvt_base::result __r = codecvt_base::ok;
│ │ │ +
352 if (__check_facet(_M_codecvt).always_noconv())
│ │ │ +
353 {
│ │ │ +
354 __ilen = _M_file.xsgetn(reinterpret_cast<char*>(this->eback()),
│ │ │ +
355 __buflen);
│ │ │ +
356 if (__ilen == 0)
│ │ │ +
357 __got_eof = true;
│ │ │ +
358 }
│ │ │ +
359 else
│ │ │ +
360 {
│ │ │ +
361 // Worst-case number of external bytes.
│ │ │ +
362 // XXX Not done encoding() == -1.
│ │ │ +
363 const int __enc = _M_codecvt->encoding();
│ │ │ +
364 streamsize __blen; // Minimum buffer size.
│ │ │ +
365 streamsize __rlen; // Number of chars to read.
│ │ │ +
366 if (__enc > 0)
│ │ │ + │ │ │ +
│ │ │ +
368 else
│ │ │ +
369 {
│ │ │ +
370 __blen = __buflen + _M_codecvt->max_length() - 1;
│ │ │ + │ │ │ +
372 }
│ │ │ +
373 const streamsize __remainder = _M_ext_end - _M_ext_next;
│ │ │ + │ │ │ +
375
│ │ │ +
376 // An imbue in 'read' mode implies first converting the external
│ │ │ +
377 // chars already present.
│ │ │ +
378 if (_M_reading && this->egptr() == this->eback() && __remainder)
│ │ │ +
│ │ │ + │ │ │ +
380
│ │ │ +
381 // Allocate buffer if necessary and move unconverted
│ │ │ +
382 // bytes to front.
│ │ │ +
383 if (_M_ext_buf_size < __blen)
│ │ │ +
384 {
│ │ │ +
385 char* __buf = new char[__blen];
│ │ │ +
386 if (__remainder)
│ │ │ +
│ │ │ + │ │ │ +
388
│ │ │ +
389 delete [] _M_ext_buf;
│ │ │ +
│ │ │ +
390 _M_ext_buf = __buf;
│ │ │ +
391 _M_ext_buf_size = __blen;
│ │ │ +
392 }
│ │ │ +
393 else if (__remainder)
│ │ │ +
394 __builtin_memmove(_M_ext_buf, _M_ext_next, __remainder);
│ │ │ +
395
│ │ │ +
396 _M_ext_next = _M_ext_buf;
│ │ │ +
397 _M_ext_end = _M_ext_buf + __remainder;
│ │ │ +
398 _M_state_last = _M_state_cur;
│ │ │ +
399
│ │ │ +
│ │ │ +
400 do
│ │ │ +
401 {
│ │ │ +
402 if (__rlen > 0)
│ │ │ +
403 {
│ │ │ +
404 // Sanity check!
│ │ │ +
405 // This may fail if the return value of
│ │ │ +
406 // codecvt::max_length() is bogus.
│ │ │ +
407 if (_M_ext_end - _M_ext_buf + __rlen > _M_ext_buf_size)
│ │ │ +
408 {
│ │ │ +
409 __throw_ios_failure(__N("basic_filebuf::underflow "
│ │ │ +
410 "codecvt::max_length() "
│ │ │ +
411 "is not valid"));
│ │ │ +
412 }
│ │ │ +
413 streamsize __elen = _M_file.xsgetn(_M_ext_end, __rlen);
│ │ │ +
414 if (__elen == 0)
│ │ │ +
415 __got_eof = true;
│ │ │ +
416 else if (__elen == -1)
│ │ │ +
417 break;
│ │ │ +
418 _M_ext_end += __elen;
│ │ │ +
419 }
│ │ │ +
│ │ │ + │ │ │ +
421 char_type* __iend = this->eback();
│ │ │ +
422 if (_M_ext_next < _M_ext_end)
│ │ │ +
│ │ │ +
423 __r = _M_codecvt->in(_M_state_cur, _M_ext_next,
│ │ │ +
424 _M_ext_end, _M_ext_next,
│ │ │ +
425 this->eback(),
│ │ │ +
426 this->eback() + __buflen, __iend);
│ │ │ +
│ │ │ +
427 if (__r == codecvt_base::noconv)
│ │ │ +
428 {
│ │ │ +
429 size_t __avail = _M_ext_end - _M_ext_buf;
│ │ │ + │ │ │ +
431 traits_type::copy(this->eback(),
│ │ │ +
432 reinterpret_cast<char_type*>
│ │ │ +
433 (_M_ext_buf), __ilen);
│ │ │ +
434 _M_ext_next = _M_ext_buf + __ilen;
│ │ │ +
435 }
│ │ │ +
436 else
│ │ │ +
437 __ilen = __iend - this->eback();
│ │ │ +
│ │ │ + │ │ │ +
439 // _M_codecvt->in may return error while __ilen > 0: this is
│ │ │ +
440 // ok, and actually occurs in case of mixed encodings (e.g.,
│ │ │ +
│ │ │ +
441 // XML files).
│ │ │ +
442 if (__r == codecvt_base::error)
│ │ │ +
443 break;
│ │ │ +
│ │ │ + │ │ │ +
445 __rlen = 1;
│ │ │ +
446 }
│ │ │ +
│ │ │ +
447 while (__ilen == 0 && !__got_eof);
│ │ │ +
448 }
│ │ │ +
449
│ │ │ +
450 if (__ilen > 0)
│ │ │ +
451 {
│ │ │ +
452 _M_set_buffer(__ilen);
│ │ │ +
453 _M_reading = true;
│ │ │ +
454 __ret = traits_type::to_int_type(*this->gptr());
│ │ │ +
455 }
│ │ │ +
456 else if (__got_eof)
│ │ │ +
457 {
│ │ │ +
458 // If the actual end of file is reached, set 'uncommitted'
│ │ │ +
459 // mode, thus allowing an immediate write without an
│ │ │ +
460 // intervening seek.
│ │ │ +
461 _M_set_buffer(-1);
│ │ │ +
462 _M_reading = false;
│ │ │ +
463 // However, reaching it while looping on partial means that
│ │ │ +
464 // the file has got an incomplete character.
│ │ │ +
465 if (__r == codecvt_base::partial)
│ │ │ +
466 __throw_ios_failure(__N("basic_filebuf::underflow "
│ │ │ +
467 "incomplete character in file"));
│ │ │ +
468 }
│ │ │ +
469 else if (__r == codecvt_base::error)
│ │ │ +
470 __throw_ios_failure(__N("basic_filebuf::underflow "
│ │ │ +
471 "invalid byte sequence in file"));
│ │ │ +
472 else
│ │ │ +
473 __throw_ios_failure(__N("basic_filebuf::underflow "
│ │ │ +
474 "error reading the file"), errno);
│ │ │ +
475 }
│ │ │ +
476 return __ret;
│ │ │ +
477 }
│ │ │ +
478
│ │ │ +
479 template<typename _CharT, typename _Traits>
│ │ │ +
480 typename basic_filebuf<_CharT, _Traits>::int_type
│ │ │ +
│ │ │ + │ │ │ +
482 pbackfail(int_type __i)
│ │ │ +
483 {
│ │ │ +
484 int_type __ret = traits_type::eof();
│ │ │ +
485 const bool __testin = _M_mode & ios_base::in;
│ │ │ +
486 if (__testin)
│ │ │ +
487 {
│ │ │ +
488 if (_M_writing)
│ │ │ +
489 {
│ │ │ +
490 if (overflow() == traits_type::eof())
│ │ │ +
491 return __ret;
│ │ │ +
492 _M_set_buffer(-1);
│ │ │ +
493 _M_writing = false;
│ │ │ +
494 }
│ │ │ +
495 // Remember whether the pback buffer is active, otherwise below
│ │ │ +
496 // we may try to store in it a second char (libstdc++/9761).
│ │ │ +
497 const bool __testpb = _M_pback_init;
│ │ │ +
498 const bool __testeof = traits_type::eq_int_type(__i, __ret);
│ │ │ +
499 int_type __tmp;
│ │ │ +
500 if (this->eback() < this->gptr())
│ │ │ +
501 {
│ │ │ +
502 this->gbump(-1);
│ │ │ +
503 __tmp = traits_type::to_int_type(*this->gptr());
│ │ │ +
504 }
│ │ │ +
505 else if (this->seekoff(-1, ios_base::cur) != pos_type(off_type(-1)))
│ │ │ +
506 {
│ │ │ +
507 __tmp = this->underflow();
│ │ │ +
508 if (traits_type::eq_int_type(__tmp, __ret))
│ │ │ +
509 return __ret;
│ │ │ +
510 }
│ │ │ +
511 else
│ │ │ +
512 {
│ │ │ +
513 // At the beginning of the buffer, need to make a
│ │ │ +
514 // putback position available. But the seek may fail
│ │ │ +
515 // (f.i., at the beginning of a file, see
│ │ │ +
516 // libstdc++/9439) and in that case we return
│ │ │ +
517 // traits_type::eof().
│ │ │ +
518 return __ret;
│ │ │ +
519 }
│ │ │ +
520
│ │ │ +
521 // Try to put back __i into input sequence in one of three ways.
│ │ │ +
522 // Order these tests done in is unspecified by the standard.
│ │ │ +
523 if (!__testeof && traits_type::eq_int_type(__i, __tmp))
│ │ │ +
524 __ret = __i;
│ │ │ +
525 else if (__testeof)
│ │ │ +
526 __ret = traits_type::not_eof(__i);
│ │ │ +
527 else if (!__testpb)
│ │ │ +
528 {
│ │ │ +
529 _M_create_pback();
│ │ │ +
530 _M_reading = true;
│ │ │ +
531 *this->gptr() = traits_type::to_char_type(__i);
│ │ │ +
532 __ret = __i;
│ │ │ +
533 }
│ │ │ +
534 }
│ │ │ +
535 return __ret;
│ │ │ +
536 }
│ │ │ +
│ │ │ +
537
│ │ │ +
538 template<typename _CharT, typename _Traits>
│ │ │ +
539 typename basic_filebuf<_CharT, _Traits>::int_type
│ │ │ +
│ │ │ + │ │ │ +
541 overflow(int_type __c)
│ │ │ +
542 {
│ │ │ +
543 int_type __ret = traits_type::eof();
│ │ │ +
544 const bool __testeof = traits_type::eq_int_type(__c, __ret);
│ │ │ +
545 const bool __testout = (_M_mode & ios_base::out
│ │ │ +
546 || _M_mode & ios_base::app);
│ │ │ +
547 if (__testout)
│ │ │ +
548 {
│ │ │ +
549 if (_M_reading)
│ │ │ +
550 {
│ │ │ +
551 _M_destroy_pback();
│ │ │ +
552 const int __gptr_off = _M_get_ext_pos(_M_state_last);
│ │ │ +
553 if (_M_seek(__gptr_off, ios_base::cur, _M_state_last)
│ │ │ +
554 == pos_type(off_type(-1)))
│ │ │ +
555 return __ret;
│ │ │ +
556 }
│ │ │ +
557 if (this->pbase() < this->pptr())
│ │ │ +
558 {
│ │ │ +
559 // If appropriate, append the overflow char.
│ │ │ +
560 if (!__testeof)
│ │ │ +
561 {
│ │ │ +
562 *this->pptr() = traits_type::to_char_type(__c);
│ │ │ +
563 this->pbump(1);
│ │ │ +
564 }
│ │ │ +
565
│ │ │ +
566 // Convert pending sequence to external representation,
│ │ │ +
567 // and output.
│ │ │ +
568 if (_M_convert_to_external(this->pbase(),
│ │ │ +
569 this->pptr() - this->pbase()))
│ │ │ +
570 {
│ │ │ +
571 _M_set_buffer(0);
│ │ │ +
572 __ret = traits_type::not_eof(__c);
│ │ │ +
573 }
│ │ │ +
574 }
│ │ │ +
575 else if (_M_buf_size > 1)
│ │ │ +
576 {
│ │ │ +
577 // Overflow in 'uncommitted' mode: set _M_writing, set
│ │ │ +
578 // the buffer to the initial 'write' mode, and put __c
│ │ │ +
579 // into the buffer.
│ │ │ +
580 _M_set_buffer(0);
│ │ │ +
581 _M_writing = true;
│ │ │ +
582 if (!__testeof)
│ │ │ +
583 {
│ │ │ +
584 *this->pptr() = traits_type::to_char_type(__c);
│ │ │ +
585 this->pbump(1);
│ │ │ +
586 }
│ │ │ +
587 __ret = traits_type::not_eof(__c);
│ │ │ +
588 }
│ │ │ +
589 else
│ │ │ +
590 {
│ │ │ +
591 // Unbuffered.
│ │ │ +
592 char_type __conv = traits_type::to_char_type(__c);
│ │ │ +
593 if (__testeof || _M_convert_to_external(&__conv, 1))
│ │ │ +
594 {
│ │ │ +
595 _M_writing = true;
│ │ │ +
596 __ret = traits_type::not_eof(__c);
│ │ │ +
597 }
│ │ │ +
598 }
│ │ │ +
599 }
│ │ │ +
600 return __ret;
│ │ │ +
601 }
│ │ │ +
│ │ │ +
602
│ │ │ +
603 template<typename _CharT, typename _Traits>
│ │ │ +
604 bool
│ │ │ + │ │ │ + │ │ │ +
607 {
│ │ │ +
608 // Sizes of external and pending output.
│ │ │ + │ │ │ + │ │ │ +
611 if (__check_facet(_M_codecvt).always_noconv())
│ │ │ +
612 {
│ │ │ +
613 __elen = _M_file.xsputn(reinterpret_cast<char*>(__ibuf), __ilen);
│ │ │ +
614 __plen = __ilen;
│ │ │ +
615 }
│ │ │ +
616 else
│ │ │ +
617 {
│ │ │ +
618 // Worst-case number of external bytes needed.
│ │ │ +
619 // XXX Not done encoding() == -1.
│ │ │ +
620 streamsize __blen = __ilen * _M_codecvt->max_length();
│ │ │ +
621 char* __buf = static_cast<char*>(__builtin_alloca(__blen));
│ │ │ +
622
│ │ │ +
623 char* __bend;
│ │ │ +
624 const char_type* __iend;
│ │ │ +
625 codecvt_base::result __r;
│ │ │ +
626 __r = _M_codecvt->out(_M_state_cur, __ibuf, __ibuf + __ilen,
│ │ │ +
627 __iend, __buf, __buf + __blen, __bend);
│ │ │ +
628
│ │ │ +
629 if (__r == codecvt_base::ok || __r == codecvt_base::partial)
│ │ │ +
630 __blen = __bend - __buf;
│ │ │ +
631 else if (__r == codecvt_base::noconv)
│ │ │ +
632 {
│ │ │ +
633 // Same as the always_noconv case above.
│ │ │ +
634 __buf = reinterpret_cast<char*>(__ibuf);
│ │ │ +
635 __blen = __ilen;
│ │ │ +
636 }
│ │ │ +
637 else
│ │ │ +
638 __throw_ios_failure(__N("basic_filebuf::_M_convert_to_external "
│ │ │ +
639 "conversion error"));
│ │ │ +
640
│ │ │ +
641 __elen = _M_file.xsputn(__buf, __blen);
│ │ │ +
642 __plen = __blen;
│ │ │ +
643
│ │ │ +
644 // Try once more for partial conversions.
│ │ │ +
645 if (__r == codecvt_base::partial && __elen == __plen)
│ │ │ +
646 {
│ │ │ +
647 const char_type* __iresume = __iend;
│ │ │ +
648 streamsize __rlen = this->pptr() - __iend;
│ │ │ +
649 __r = _M_codecvt->out(_M_state_cur, __iresume,
│ │ │ +
650 __iresume + __rlen, __iend, __buf,
│ │ │ +
651 __buf + __blen, __bend);
│ │ │ +
652 if (__r != codecvt_base::error)
│ │ │ +
653 {
│ │ │ +
654 __rlen = __bend - __buf;
│ │ │ +
655 __elen = _M_file.xsputn(__buf, __rlen);
│ │ │ +
656 __plen = __rlen;
│ │ │ +
657 }
│ │ │ +
658 else
│ │ │ +
659 __throw_ios_failure(__N("basic_filebuf::_M_convert_to_external "
│ │ │ +
660 "conversion error"));
│ │ │ +
661 }
│ │ │ +
662 }
│ │ │ +
663 return __elen == __plen;
│ │ │ +
664 }
│ │ │ +
665
│ │ │ +
666 template<typename _CharT, typename _Traits>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
669 xsgetn(_CharT* __s, streamsize __n)
│ │ │ +
670 {
│ │ │ +
671 // Clear out pback buffer before going on to the real deal...
│ │ │ +
672 streamsize __ret = 0;
│ │ │ +
673 if (_M_pback_init)
│ │ │ +
674 {
│ │ │ +
675 if (__n > 0 && this->gptr() == this->eback())
│ │ │ +
676 {
│ │ │ +
677 *__s++ = *this->gptr(); // emulate non-underflowing sbumpc
│ │ │ +
678 this->gbump(1);
│ │ │ +
679 __ret = 1;
│ │ │ +
680 --__n;
│ │ │ +
681 }
│ │ │ +
682 _M_destroy_pback();
│ │ │ +
683 }
│ │ │ +
684 else if (_M_writing)
│ │ │ +
685 {
│ │ │ +
686 if (overflow() == traits_type::eof())
│ │ │ +
687 return __ret;
│ │ │ +
688 _M_set_buffer(-1);
│ │ │ +
689 _M_writing = false;
│ │ │ +
690 }
│ │ │ +
691
│ │ │ +
692 // Optimization in the always_noconv() case, to be generalized in the
│ │ │ +
693 // future: when __n > __buflen we read directly instead of using the
│ │ │ +
694 // buffer repeatedly.
│ │ │ +
695 const bool __testin = _M_mode & ios_base::in;
│ │ │ +
696 const streamsize __buflen = _M_buf_size > 1 ? _M_buf_size - 1 : 1;
│ │ │ +
697
│ │ │ +
698 if (__n > __buflen && __check_facet(_M_codecvt).always_noconv()
│ │ │ +
699 && __testin)
│ │ │ +
700 {
│ │ │ +
701 // First, copy the chars already present in the buffer.
│ │ │ +
702 const streamsize __avail = this->egptr() - this->gptr();
│ │ │ +
703 if (__avail != 0)
│ │ │ +
704 {
│ │ │ +
705 traits_type::copy(__s, this->gptr(), __avail);
│ │ │ +
706 __s += __avail;
│ │ │ +
707 this->setg(this->eback(), this->gptr() + __avail, this->egptr());
│ │ │ +
708 __ret += __avail;
│ │ │ +
709 __n -= __avail;
│ │ │ +
710 }
│ │ │ +
711
│ │ │ +
712 // Need to loop in case of short reads (relatively common
│ │ │ +
713 // with pipes).
│ │ │ + │ │ │ +
715 for (;;)
│ │ │ +
716 {
│ │ │ +
717 __len = _M_file.xsgetn(reinterpret_cast<char*>(__s), __n);
│ │ │ +
718 if (__len == -1)
│ │ │ +
719 __throw_ios_failure(__N("basic_filebuf::xsgetn "
│ │ │ +
720 "error reading the file"), errno);
│ │ │ +
721 if (__len == 0)
│ │ │ +
722 break;
│ │ │ +
723
│ │ │ +
724 __n -= __len;
│ │ │ +
725 __ret += __len;
│ │ │ +
726 if (__n == 0)
│ │ │ +
727 break;
│ │ │ +
728
│ │ │ +
729 __s += __len;
│ │ │ +
730 }
│ │ │ +
731
│ │ │ +
732 if (__n == 0)
│ │ │ +
733 {
│ │ │ +
734 // Set _M_reading. Buffer is already in initial 'read' mode.
│ │ │ +
735 _M_reading = true;
│ │ │ +
736 }
│ │ │ +
737 else if (__len == 0)
│ │ │ +
738 {
│ │ │ +
739 // If end of file is reached, set 'uncommitted'
│ │ │ +
740 // mode, thus allowing an immediate write without
│ │ │ +
741 // an intervening seek.
│ │ │ +
742 _M_set_buffer(-1);
│ │ │ +
743 _M_reading = false;
│ │ │ +
744 }
│ │ │ +
745 }
│ │ │ +
746 else
│ │ │ +
747 __ret += __streambuf_type::xsgetn(__s, __n);
│ │ │ +
748
│ │ │ +
749 return __ret;
│ │ │ +
750 }
│ │ │ +
│ │ │ +
751
│ │ │ +
752 template<typename _CharT, typename _Traits>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
755 xsputn(const _CharT* __s, streamsize __n)
│ │ │ +
756 {
│ │ │ +
757 streamsize __ret = 0;
│ │ │ +
758 // Optimization in the always_noconv() case, to be generalized in the
│ │ │ +
759 // future: when __n is larger than the available capacity we write
│ │ │ +
760 // directly instead of using the buffer.
│ │ │ +
761 const bool __testout = (_M_mode & ios_base::out
│ │ │ +
762 || _M_mode & ios_base::app);
│ │ │ +
763 if (__check_facet(_M_codecvt).always_noconv()
│ │ │ +
764 && __testout && !_M_reading)
│ │ │ +
765 {
│ │ │ +
766 streamsize __bufavail = this->epptr() - this->pptr();
│ │ │ +
767
│ │ │ +
768 // Don't mistake 'uncommitted' mode buffered with unbuffered.
│ │ │ +
769 if (!_M_writing && _M_buf_size > 1)
│ │ │ +
770 __bufavail = _M_buf_size - 1;
│ │ │ +
771
│ │ │ +
772 if (__n >= __bufavail)
│ │ │ +
773 {
│ │ │ +
774 const streamsize __buffill = this->pptr() - this->pbase();
│ │ │ +
775 const char* __buf = reinterpret_cast<const char*>(this->pbase());
│ │ │ +
776 __ret = _M_file.xsputn_2(__buf, __buffill,
│ │ │ +
777 reinterpret_cast<const char*>(__s),
│ │ │ +
778 __n);
│ │ │ +
779 if (__ret == __buffill + __n)
│ │ │ +
780 {
│ │ │ +
781 _M_set_buffer(0);
│ │ │ +
782 _M_writing = true;
│ │ │ +
783 }
│ │ │ +
784 if (__ret > __buffill)
│ │ │ +
785 __ret -= __buffill;
│ │ │ +
786 else
│ │ │ +
787 __ret = 0;
│ │ │ +
788 }
│ │ │ +
789 else
│ │ │ +
790 __ret = __streambuf_type::xsputn(__s, __n);
│ │ │ +
791 }
│ │ │ +
792 else
│ │ │ +
793 __ret = __streambuf_type::xsputn(__s, __n);
│ │ │ +
794 return __ret;
│ │ │ +
795 }
│ │ │ +
│ │ │ +
│ │ │ +
796
│ │ │ +
797 template<typename _CharT, typename _Traits>
│ │ │ + │ │ │ +
│ │ │ + │ │ │ +
800 setbuf(char_type* __s, streamsize __n)
│ │ │ +
801 {
│ │ │ +
802 if (!this->is_open())
│ │ │ +
803 {
│ │ │ +
804 if (__s == 0 && __n == 0)
│ │ │ +
805 _M_buf_size = 1;
│ │ │ +
806 else if (__s && __n > 0)
│ │ │ +
807 {
│ │ │ +
808 // This is implementation-defined behavior, and assumes that
│ │ │ +
809 // an external char_type array of length __n exists and has
│ │ │ +
810 // been pre-allocated. If this is not the case, things will
│ │ │ +
811 // quickly blow up. When __n > 1, __n - 1 positions will be
│ │ │ +
812 // used for the get area, __n - 1 for the put area and 1
│ │ │ +
813 // position to host the overflow char of a full put area.
│ │ │ +
814 // When __n == 1, 1 position will be used for the get area
│ │ │ +
815 // and 0 for the put area, as in the unbuffered case above.
│ │ │ +
816 _M_buf = __s;
│ │ │ +
817 _M_buf_size = __n;
│ │ │ +
818 }
│ │ │ +
819 }
│ │ │ +
820 return this;
│ │ │ +
821 }
│ │ │ +
│ │ │ +
822
│ │ │ +
823
│ │ │ +
824 // According to 27.8.1.4 p11 - 13, seekoff should ignore the last
│ │ │ +
825 // argument (of type openmode).
│ │ │ +
826 template<typename _CharT, typename _Traits>
│ │ │ +
827 typename basic_filebuf<_CharT, _Traits>::pos_type
│ │ │ +
│ │ │ + │ │ │ +
829 seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode)
│ │ │ +
830 {
│ │ │ +
831 int __width = 0;
│ │ │ +
832 if (_M_codecvt)
│ │ │ +
833 __width = _M_codecvt->encoding();
│ │ │ +
834 if (__width < 0)
│ │ │ +
835 __width = 0;
│ │ │ +
836
│ │ │ +
837 pos_type __ret = pos_type(off_type(-1));
│ │ │ +
838 const bool __testfail = __off != 0 && __width <= 0;
│ │ │ +
839 if (this->is_open() && !__testfail)
│ │ │ +
840 {
│ │ │ +
841 // tellg and tellp queries do not affect any state, unless
│ │ │ +
842 // ! always_noconv and the put sequence is not empty.
│ │ │ +
843 // In that case, determining the position requires converting the
│ │ │ +
844 // put sequence. That doesn't use ext_buf, so requires a flush.
│ │ │ +
845 bool __no_movement = __way == ios_base::cur && __off == 0
│ │ │ +
846 && (!_M_writing || _M_codecvt->always_noconv());
│ │ │ +
847
│ │ │ +
848 // Ditch any pback buffers to avoid confusion.
│ │ │ +
849 if (!__no_movement)
│ │ │ +
850 _M_destroy_pback();
│ │ │ +
851
│ │ │ +
852 // Correct state at destination. Note that this is the correct
│ │ │ +
853 // state for the current position during output, because
│ │ │ +
854 // codecvt::unshift() returns the state to the initial state.
│ │ │ +
855 // This is also the correct state at the end of the file because
│ │ │ +
856 // an unshift sequence should have been written at the end.
│ │ │ +
857 __state_type __state = _M_state_beg;
│ │ │ +
858 off_type __computed_off = __off * __width;
│ │ │ +
859 if (_M_reading && __way == ios_base::cur)
│ │ │ +
860 {
│ │ │ +
861 __state = _M_state_last;
│ │ │ +
862 __computed_off += _M_get_ext_pos(__state);
│ │ │ +
863 }
│ │ │ +
864 if (!__no_movement)
│ │ │ +
865 __ret = _M_seek(__computed_off, __way, __state);
│ │ │ +
866 else
│ │ │ +
867 {
│ │ │ +
868 if (_M_writing)
│ │ │ +
869 __computed_off = this->pptr() - this->pbase();
│ │ │ +
870
│ │ │ +
871 off_type __file_off = _M_file.seekoff(0, ios_base::cur);
│ │ │ +
872 if (__file_off != off_type(-1))
│ │ │ +
873 {
│ │ │ + │ │ │ +
875 __ret.state(__state);
│ │ │ +
876 }
│ │ │ +
877 }
│ │ │ +
878 }
│ │ │ +
879 return __ret;
│ │ │ +
880 }
│ │ │ +
│ │ │ +
881
│ │ │ +
882 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
883 // 171. Strange seekpos() semantics due to joint position
│ │ │ +
884 // According to the resolution of DR 171, seekpos should ignore the last
│ │ │ +
885 // argument (of type openmode).
│ │ │ +
886 template<typename _CharT, typename _Traits>
│ │ │ +
887 typename basic_filebuf<_CharT, _Traits>::pos_type
│ │ │ +
│ │ │ + │ │ │ +
889 seekpos(pos_type __pos, ios_base::openmode)
│ │ │ +
890 {
│ │ │ +
891 pos_type __ret = pos_type(off_type(-1));
│ │ │ +
892 if (this->is_open())
│ │ │ +
893 {
│ │ │ +
894 // Ditch any pback buffers to avoid confusion.
│ │ │ +
895 _M_destroy_pback();
│ │ │ +
896 __ret = _M_seek(off_type(__pos), ios_base::beg, __pos.state());
│ │ │ +
897 }
│ │ │ +
898 return __ret;
│ │ │ +
899 }
│ │ │ +
│ │ │ +
900
│ │ │ +
901 template<typename _CharT, typename _Traits>
│ │ │ +
902 typename basic_filebuf<_CharT, _Traits>::pos_type
│ │ │ + │ │ │ +
904 _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state)
│ │ │ +
905 {
│ │ │ +
906 pos_type __ret = pos_type(off_type(-1));
│ │ │ +
907 if (_M_terminate_output())
│ │ │ +
908 {
│ │ │ +
909 off_type __file_off = _M_file.seekoff(__off, __way);
│ │ │ +
910 if (__file_off != off_type(-1))
│ │ │ +
911 {
│ │ │ +
912 _M_reading = false;
│ │ │ +
913 _M_writing = false;
│ │ │ +
914 _M_ext_next = _M_ext_end = _M_ext_buf;
│ │ │ +
915 _M_set_buffer(-1);
│ │ │ +
916 _M_state_cur = __state;
│ │ │ + │ │ │ +
918 __ret.state(_M_state_cur);
│ │ │ +
919 }
│ │ │ +
920 }
│ │ │ +
921 return __ret;
│ │ │ +
922 }
│ │ │ +
923
│ │ │ +
924 // Returns the distance from the end of the ext buffer to the point
│ │ │ +
925 // corresponding to gptr(). This is a negative value. Updates __state
│ │ │ +
926 // from eback() correspondence to gptr().
│ │ │ +
927 template<typename _CharT, typename _Traits>
│ │ │ +
928 int basic_filebuf<_CharT, _Traits>::
│ │ │ +
929 _M_get_ext_pos(__state_type& __state)
│ │ │ +
930 {
│ │ │ +
931 if (_M_codecvt->always_noconv())
│ │ │ +
932 return this->gptr() - this->egptr();
│ │ │ +
933 else
│ │ │ +
934 {
│ │ │ +
935 // Calculate offset from _M_ext_buf that corresponds to
│ │ │ +
936 // gptr(). Precondition: __state == _M_state_last, which
│ │ │ +
937 // corresponds to eback().
│ │ │ +
938 const int __gptr_off =
│ │ │ +
939 _M_codecvt->length(__state, _M_ext_buf, _M_ext_next,
│ │ │ +
940 this->gptr() - this->eback());
│ │ │ +
941 return _M_ext_buf + __gptr_off - _M_ext_end;
│ │ │ +
942 }
│ │ │ +
943 }
│ │ │ +
944
│ │ │ +
945 template<typename _CharT, typename _Traits>
│ │ │ +
946 bool
│ │ │ +
947 basic_filebuf<_CharT, _Traits>::
│ │ │ +
948 _M_terminate_output()
│ │ │ +
949 {
│ │ │ +
950 // Part one: update the output sequence.
│ │ │ +
951 bool __testvalid = true;
│ │ │ +
952 if (this->pbase() < this->pptr())
│ │ │ +
953 {
│ │ │ +
954 const int_type __tmp = this->overflow();
│ │ │ +
955 if (traits_type::eq_int_type(__tmp, traits_type::eof()))
│ │ │ +
956 __testvalid = false;
│ │ │ +
957 }
│ │ │ +
958
│ │ │ +
959 // Part two: output unshift sequence.
│ │ │ +
960 if (_M_writing && !__check_facet(_M_codecvt).always_noconv()
│ │ │ +
961 && __testvalid)
│ │ │ +
962 {
│ │ │ +
963 // Note: this value is arbitrary, since there is no way to
│ │ │ +
964 // get the length of the unshift sequence from codecvt,
│ │ │ +
965 // without calling unshift.
│ │ │ +
966 const size_t __blen = 128;
│ │ │ +
967 char __buf[__blen];
│ │ │ +
968 codecvt_base::result __r;
│ │ │ +
969 streamsize __ilen = 0;
│ │ │ +
970
│ │ │ +
971 do
│ │ │ +
972 {
│ │ │ +
973 char* __next;
│ │ │ +
974 __r = _M_codecvt->unshift(_M_state_cur, __buf,
│ │ │ +
975 __buf + __blen, __next);
│ │ │ +
976 if (__r == codecvt_base::error)
│ │ │ +
977 __testvalid = false;
│ │ │ +
978 else if (__r == codecvt_base::ok ||
│ │ │ +
979 __r == codecvt_base::partial)
│ │ │ +
980 {
│ │ │ +
981 __ilen = __next - __buf;
│ │ │ +
982 if (__ilen > 0)
│ │ │ +
983 {
│ │ │ +
984 const streamsize __elen = _M_file.xsputn(__buf, __ilen);
│ │ │ +
985 if (__elen != __ilen)
│ │ │ +
986 __testvalid = false;
│ │ │ +
987 }
│ │ │ +
988 }
│ │ │ +
989 }
│ │ │ +
990 while (__r == codecvt_base::partial && __ilen > 0 && __testvalid);
│ │ │ +
991
│ │ │ +
992 if (__testvalid)
│ │ │ +
993 {
│ │ │ +
994 // This second call to overflow() is required by the standard,
│ │ │ +
995 // but it's not clear why it's needed, since the output buffer
│ │ │ +
996 // should be empty by this point (it should have been emptied
│ │ │ +
997 // in the first call to overflow()).
│ │ │ +
998 const int_type __tmp = this->overflow();
│ │ │ +
999 if (traits_type::eq_int_type(__tmp, traits_type::eof()))
│ │ │ +
1000 __testvalid = false;
│ │ │ +
1001 }
│ │ │ +
1002 }
│ │ │ +
1003 return __testvalid;
│ │ │ +
1004 }
│ │ │ +
1005
│ │ │ +
1006 template<typename _CharT, typename _Traits>
│ │ │ +
1007 int
│ │ │ +
│ │ │ + │ │ │ +
1009 sync()
│ │ │ +
1010 {
│ │ │ +
1011 // Make sure that the internal buffer resyncs its idea of
│ │ │ +
1012 // the file position with the external file.
│ │ │ +
1013 int __ret = 0;
│ │ │ +
1014 if (this->pbase() < this->pptr())
│ │ │ +
1015 {
│ │ │ +
1016 const int_type __tmp = this->overflow();
│ │ │ +
1017 if (traits_type::eq_int_type(__tmp, traits_type::eof()))
│ │ │ +
1018 __ret = -1;
│ │ │ +
1019 }
│ │ │ +
1020 return __ret;
│ │ │ +
1021 }
│ │ │ +
│ │ │ +
1022
│ │ │ +
1023 template<typename _CharT, typename _Traits>
│ │ │ +
1024 void
│ │ │ +
│ │ │ + │ │ │ +
1026 imbue(const locale& __loc)
│ │ │ +
1027 {
│ │ │ +
1028 bool __testvalid = true;
│ │ │ +
1029
│ │ │ +
1030 const __codecvt_type* const _M_codecvt_tmp
│ │ │ + │ │ │ +
1032
│ │ │ +
1033 if (this->is_open())
│ │ │ +
1034 {
│ │ │ +
1035 // encoding() == -1 is ok only at the beginning.
│ │ │ +
1036 if ((_M_reading || _M_writing)
│ │ │ +
1037 && __check_facet(_M_codecvt).encoding() == -1)
│ │ │ +
1038 __testvalid = false;
│ │ │ +
1039 else
│ │ │ +
1040 {
│ │ │ +
1041 if (_M_reading)
│ │ │ +
1042 {
│ │ │ +
1043 if (__check_facet(_M_codecvt).always_noconv())
│ │ │ +
1044 {
│ │ │ +
1045 if (_M_codecvt_tmp
│ │ │ +
1046 && !__check_facet(_M_codecvt_tmp).always_noconv())
│ │ │ +
1047 __testvalid = this->seekoff(0, ios_base::cur, _M_mode)
│ │ │ +
1048 != pos_type(off_type(-1));
│ │ │ +
1049 }
│ │ │ +
1050 else
│ │ │ +
1051 {
│ │ │ +
1052 // External position corresponding to gptr().
│ │ │ +
1053 _M_ext_next = _M_ext_buf
│ │ │ +
1054 + _M_codecvt->length(_M_state_last, _M_ext_buf,
│ │ │ +
1055 _M_ext_next,
│ │ │ +
1056 this->gptr() - this->eback());
│ │ │ +
1057 const streamsize __remainder = _M_ext_end - _M_ext_next;
│ │ │ +
1058 if (__remainder)
│ │ │ +
1059 __builtin_memmove(_M_ext_buf, _M_ext_next, __remainder);
│ │ │ +
1060
│ │ │ +
1061 _M_ext_next = _M_ext_buf;
│ │ │ +
1062 _M_ext_end = _M_ext_buf + __remainder;
│ │ │ +
1063 _M_set_buffer(-1);
│ │ │ +
1064 _M_state_last = _M_state_cur = _M_state_beg;
│ │ │ +
1065 }
│ │ │ +
1066 }
│ │ │ +
1067 else if (_M_writing && (__testvalid = _M_terminate_output()))
│ │ │ +
1068 _M_set_buffer(-1);
│ │ │ +
1069 }
│ │ │ +
1070 }
│ │ │ +
1071
│ │ │ +
1072 if (__testvalid)
│ │ │ +
1073 _M_codecvt = _M_codecvt_tmp;
│ │ │ +
1074 else
│ │ │ +
1075 _M_codecvt = 0;
│ │ │ +
1076 }
│ │ │ +
│ │ │ +
1077
│ │ │ +
1078 // Inhibit implicit instantiations for required instantiations,
│ │ │ +
1079 // which are defined via explicit instantiations elsewhere.
│ │ │ +
1080#if _GLIBCXX_EXTERN_TEMPLATE
│ │ │ +
1081 extern template class basic_filebuf<char>;
│ │ │ +
1082 extern template class basic_ifstream<char>;
│ │ │ +
1083 extern template class basic_ofstream<char>;
│ │ │ +
1084 extern template class basic_fstream<char>;
│ │ │ +
1085
│ │ │ +
1086#ifdef _GLIBCXX_USE_WCHAR_T
│ │ │ +
1087 extern template class basic_filebuf<wchar_t>;
│ │ │ +
1088 extern template class basic_ifstream<wchar_t>;
│ │ │ +
1089 extern template class basic_ofstream<wchar_t>;
│ │ │ +
1090 extern template class basic_fstream<wchar_t>;
│ │ │ +
1091#endif
│ │ │ +
1092#endif
│ │ │ +
1093
│ │ │ +
1094_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
1095} // namespace std
│ │ │ +
1096
│ │ │ +
1097#endif
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ + │ │ │ + │ │ │ + │ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:97
│ │ │ +
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ +
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:68
│ │ │ -
traits_type::int_type int_type
Definition streambuf:135
│ │ │ -
virtual streamsize xsputn(const char_type *__s, streamsize __n)
Multiple character insertion.
Definition streambuf.tcc:80
│ │ │ - │ │ │ -
virtual streamsize xsgetn(char_type *__s, streamsize __n)
Multiple character extraction.
Definition streambuf.tcc:46
│ │ │ - │ │ │ +
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:68
│ │ │ +
The actual work of input and output (for files).
Definition fstream:88
│ │ │ +
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:829
│ │ │ +
virtual int_type underflow()
Fetches more data from the controlled sequence.
Definition fstream.tcc:323
│ │ │ +
virtual streamsize showmanyc()
Investigating the data available.
Definition fstream.tcc:297
│ │ │ +
virtual void imbue(const locale &__loc)
Changes translations.
Definition fstream.tcc:1026
│ │ │ +
virtual streamsize xsgetn(char_type *__s, streamsize __n)
Multiple character extraction.
Definition fstream.tcc:669
│ │ │ +
__filebuf_type * close()
Closes the currently associated file.
Definition fstream.tcc:249
│ │ │ +
virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode=ios_base::in|ios_base::out)
Alters the stream positions.
Definition fstream.tcc:889
│ │ │ +
virtual int_type pbackfail(int_type __c=_Traits::eof())
Tries to back up the input sequence.
Definition fstream.tcc:482
│ │ │ +
virtual streamsize xsputn(const char_type *__s, streamsize __n)
Multiple character insertion.
Definition fstream.tcc:755
│ │ │ +
virtual int_type overflow(int_type __c=_Traits::eof())
Consumes data from the buffer; writes to the controlled sequence.
Definition fstream.tcc:541
│ │ │ +
__filebuf_type * open(const char *__s, ios_base::openmode __mode)
Opens an external file.
Definition fstream.tcc:179
│ │ │ +
basic_filebuf()
Does not open any files.
Definition fstream.tcc:81
│ │ │ +
virtual int sync()
Synchronizes the buffer arrays with the controlled sequences.
Definition fstream.tcc:1009
│ │ │ +
virtual __streambuf_type * setbuf(char_type *__s, streamsize __n)
Manipulates the buffer.
Definition fstream.tcc:800
│ │ │ + │ │ │ +
locale _M_buf_locale
Current locale setting.
Definition streambuf:199
│ │ │ +
The base of the I/O class hierarchy.
Definition ios_base.h:234
│ │ │ +
static const seekdir cur
Request a seek relative to the current position within the sequence.
Definition ios_base.h:498
│ │ │ +
static const seekdir beg
Request a seek relative to the beginning of the stream.
Definition ios_base.h:495
│ │ │ +
static const seekdir end
Request a seek relative to the current end of the sequence.
Definition ios_base.h:501
│ │ │ +
static const openmode in
Open for input. Default for ifstream and fstream.
Definition ios_base.h:466
│ │ │ +
static const openmode out
Open for output. Default for ofstream and fstream.
Definition ios_base.h:469
│ │ │ +
static const openmode binary
Perform input and output in binary mode (as opposed to text mode). This is probably not what you thin...
Definition ios_base.h:463
│ │ │ +
_Ios_Openmode openmode
This is a bitmask type.
Definition ios_base.h:452
│ │ │ +
static const openmode app
Seek to end before each write.
Definition ios_base.h:455
│ │ │ +
static const openmode ate
Open and seek to end immediately after opening.
Definition ios_base.h:458
│ │ │ +
Container class for localization functionality.
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ libstdc++ │ │ │ │ -streambuf.tcc │ │ │ │ +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// Stream buffer classes -*- C++ -*- │ │ │ │ +1// File based streams -*- C++ -*- │ │ │ │ 2 │ │ │ │ 3// Copyright (C) 1997-2023 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,181 +21,1215 @@ │ │ │ │ 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/fstream.tcc │ │ │ │ 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{fstream} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ 30// │ │ │ │ -31// ISO C++ 14882: 27.5 Stream buffers │ │ │ │ +31// ISO C++ 14882: 27.8 File-based streams │ │ │ │ 32// │ │ │ │ 33 │ │ │ │ -34#ifndef _STREAMBUF_TCC │ │ │ │ -35#define _STREAMBUF_TCC 1 │ │ │ │ +34#ifndef _FSTREAM_TCC │ │ │ │ +35#define _FSTREAM_TCC 1 │ │ │ │ 36 │ │ │ │ 37#pragma GCC system_header │ │ │ │ 38 │ │ │ │ -39namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -40{ │ │ │ │ -41_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +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 │ │ │ │ -43 template │ │ │ │ -44 _s_t_r_e_a_m_s_i_z_e │ │ │ │ -_4_5 _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ -46_ _x_s_g_e_t_n(_c_h_a_r___t_y_p_e* _____s, _s_t_r_e_a_m_s_i_z_e __n) │ │ │ │ -47 { │ │ │ │ -48 _s_t_r_e_a_m_s_i_z_e _____r_e_t = 0; │ │ │ │ -49 while (_____r_e_t < __n) │ │ │ │ -50 { │ │ │ │ -51 const _s_t_r_e_a_m_s_i_z_e _____b_u_f___l_e_n = this->egptr() - this->gptr(); │ │ │ │ -52 if (_____b_u_f___l_e_n) │ │ │ │ -53 { │ │ │ │ -54 const _s_t_r_e_a_m_s_i_z_e _____r_e_m_a_i_n_i_n_g = __n - _____r_e_t; │ │ │ │ -55 const _s_t_r_e_a_m_s_i_z_e _____l_e_n = _s_t_d_:_:_m_i_n(_____b_u_f___l_e_n, _____r_e_m_a_i_n_i_n_g); │ │ │ │ -56 traits_type::copy(_____s, this->gptr(), _____l_e_n); │ │ │ │ -57 _____r_e_t += _____l_e_n; │ │ │ │ -58 _____s += _____l_e_n; │ │ │ │ -59 this->__safe_gbump(_____l_e_n); │ │ │ │ -60 } │ │ │ │ -61 │ │ │ │ -62 if (_____r_e_t < __n) │ │ │ │ -63 { │ │ │ │ -64 const _i_n_t___t_y_p_e __c = this->uflow(); │ │ │ │ -65 if (!traits_type::eq_int_type(__c, traits_type::eof())) │ │ │ │ -66 { │ │ │ │ -67 traits_type::assign(*_____s++, traits_type::to_char_type(__c)); │ │ │ │ -68 ++_____r_e_t; │ │ │ │ -69 } │ │ │ │ -70 else │ │ │ │ -71 break; │ │ │ │ -72 } │ │ │ │ -73 } │ │ │ │ -74 return _____r_e_t; │ │ │ │ -75 } │ │ │ │ -76 │ │ │ │ -77 template │ │ │ │ -78 _s_t_r_e_a_m_s_i_z_e │ │ │ │ -_7_9 _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ -80_ _x_s_p_u_t_n(const _c_h_a_r___t_y_p_e* _____s, _s_t_r_e_a_m_s_i_z_e __n) │ │ │ │ -81 { │ │ │ │ -82 _s_t_r_e_a_m_s_i_z_e _____r_e_t = 0; │ │ │ │ -83 while (_____r_e_t < __n) │ │ │ │ -84 { │ │ │ │ -85 const _s_t_r_e_a_m_s_i_z_e _____b_u_f___l_e_n = this->epptr() - this->pptr(); │ │ │ │ -86 if (_____b_u_f___l_e_n) │ │ │ │ -87 { │ │ │ │ -88 const _s_t_r_e_a_m_s_i_z_e _____r_e_m_a_i_n_i_n_g = __n - _____r_e_t; │ │ │ │ -89 const _s_t_r_e_a_m_s_i_z_e _____l_e_n = _s_t_d_:_:_m_i_n(_____b_u_f___l_e_n, _____r_e_m_a_i_n_i_n_g); │ │ │ │ -90 traits_type::copy(this->pptr(), _____s, _____l_e_n); │ │ │ │ -91 _____r_e_t += _____l_e_n; │ │ │ │ -92 _____s += _____l_e_n; │ │ │ │ -93 this->__safe_pbump(_____l_e_n); │ │ │ │ -94 } │ │ │ │ -95 │ │ │ │ -96 if (_____r_e_t < __n) │ │ │ │ -97 { │ │ │ │ -98 _i_n_t___t_y_p_e __c = this->overflow(traits_type::to_int_type(*_____s)); │ │ │ │ -99 if (!traits_type::eq_int_type(__c, traits_type::eof())) │ │ │ │ -100 { │ │ │ │ -101 ++_____r_e_t; │ │ │ │ -102 ++_____s; │ │ │ │ -103 } │ │ │ │ -104 else │ │ │ │ -105 break; │ │ │ │ -106 } │ │ │ │ -107 } │ │ │ │ -108 return _____r_e_t; │ │ │ │ -109 } │ │ │ │ -110 │ │ │ │ -111 // Conceivably, this could be used to implement buffer-to-buffer │ │ │ │ -112 // copies, if this was ever desired in an un-ambiguous way by the │ │ │ │ -113 // standard. │ │ │ │ -114 template │ │ │ │ -115 _s_t_r_e_a_m_s_i_z_e │ │ │ │ -116 __copy_streambufs_eof(_b_a_s_i_c___s_t_r_e_a_m_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>* _____s_b_i_n, │ │ │ │ -117 _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>* _____s_b_o_u_t, │ │ │ │ -118 bool& _____i_n_e_o_f) │ │ │ │ -119 { │ │ │ │ -120 _s_t_r_e_a_m_s_i_z_e _____r_e_t = 0; │ │ │ │ -121 _____i_n_e_o_f = true; │ │ │ │ -122 typename _Traits::int_type __c = _____s_b_i_n->sgetc(); │ │ │ │ -123 while (!_Traits::eq_int_type(__c, _Traits::eof())) │ │ │ │ -124 { │ │ │ │ -125 __c = _____s_b_o_u_t->sputc(_Traits::to_char_type(__c)); │ │ │ │ -126 if (_Traits::eq_int_type(__c, _Traits::eof())) │ │ │ │ -127 { │ │ │ │ -128 _____i_n_e_o_f = false; │ │ │ │ -129 break; │ │ │ │ -130 } │ │ │ │ -131 ++__ret; │ │ │ │ -132 __c = __sbin->snextc(); │ │ │ │ -133 } │ │ │ │ -134 return __ret; │ │ │ │ -135 } │ │ │ │ -136 │ │ │ │ -137 template │ │ │ │ -138 inline _s_t_r_e_a_m_s_i_z_e │ │ │ │ -139 __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, │ │ │ │ -140 basic_streambuf<_CharT, _Traits>* __sbout) │ │ │ │ -141 { │ │ │ │ -142 bool __ineof; │ │ │ │ -143 return __copy_streambufs_eof(__sbin, __sbout, __ineof); │ │ │ │ -144 } │ │ │ │ -145 │ │ │ │ -146 // Inhibit implicit instantiations for required instantiations, │ │ │ │ -147 // which are defined via explicit instantiations elsewhere. │ │ │ │ -148#if _GLIBCXX_EXTERN_TEMPLATE │ │ │ │ -149 extern template class basic_streambuf; │ │ │ │ -150 │ │ │ │ -151 extern template │ │ │ │ -152 _s_t_r_e_a_m_s_i_z_e │ │ │ │ -153 __copy_streambufs(basic_streambuf*, │ │ │ │ -154 basic_streambuf*); │ │ │ │ -155 │ │ │ │ -156#ifdef _GLIBCXX_USE_WCHAR_T │ │ │ │ -157 extern template class basic_streambuf; │ │ │ │ -158 │ │ │ │ -159 extern template │ │ │ │ -160 _s_t_r_e_a_m_s_i_z_e │ │ │ │ -161 __copy_streambufs(basic_streambuf*, │ │ │ │ -162 basic_streambuf*); │ │ │ │ -163#endif │ │ │ │ -164#endif │ │ │ │ -165 │ │ │ │ -166_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -167} // namespace std │ │ │ │ -168 │ │ │ │ -169#endif │ │ │ │ +43namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +44{ │ │ │ │ +45_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +46 │ │ │ │ +47 template │ │ │ │ +48 void │ │ │ │ +49 basic_filebuf<_CharT, _Traits>:: │ │ │ │ +50 _M_allocate_internal_buffer() │ │ │ │ +51 { │ │ │ │ +52 // Allocate internal buffer only if one doesn't already exist │ │ │ │ +53 // (either allocated or provided by the user via setbuf). │ │ │ │ +54 if (!_M_buf_allocated && !_M_buf) │ │ │ │ +55 { │ │ │ │ +56 _M_buf = new char_type[_M_buf_size]; │ │ │ │ +57 _M_buf_allocated = true; │ │ │ │ +58 } │ │ │ │ +59 } │ │ │ │ +60 │ │ │ │ +61 template │ │ │ │ +62 void │ │ │ │ +63 basic_filebuf<_CharT, _Traits>:: │ │ │ │ +64 _M_destroy_internal_buffer() throw() │ │ │ │ +65 { │ │ │ │ +66 if (_M_buf_allocated) │ │ │ │ +67 { │ │ │ │ +68 delete [] _M_buf; │ │ │ │ +69 _M_buf = 0; │ │ │ │ +70 _M_buf_allocated = false; │ │ │ │ +71 } │ │ │ │ +72 delete [] _M_ext_buf; │ │ │ │ +73 _M_ext_buf = 0; │ │ │ │ +74 _M_ext_buf_size = 0; │ │ │ │ +75 _M_ext_next = 0; │ │ │ │ +76 _M_ext_end = 0; │ │ │ │ +77 } │ │ │ │ +78 │ │ │ │ +79 template │ │ │ │ +_8_0 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +81_ _b_a_s_i_c___f_i_l_e_b_u_f() : _____s_t_r_e_a_m_b_u_f___t_y_p_e(), _M_lock(), _M_file(&_M_lock), │ │ │ │ +82 _M_mode(_i_o_s___b_a_s_e::openmode(0)), _M_state_beg(), _M_state_cur(), │ │ │ │ +83 _M_state_last(), _M_buf(0), _M_buf_size(_GLIBCXX_BUFSIZ), │ │ │ │ +84 _M_buf_allocated(_f_a_l_s_e), _M_reading(_f_a_l_s_e), _M_writing(_f_a_l_s_e), _M_pback(), │ │ │ │ +85 _M_pback_cur_save(0), _M_pback_end_save(0), _M_pback_init(_f_a_l_s_e), │ │ │ │ +86 _M_codecvt(0), _M_ext_buf(0), _M_ext_buf_size(0), _M_ext_next(0), │ │ │ │ +87 _M_ext_end(0) │ │ │ │ +88 { │ │ │ │ +89 _M_codecvt = _s_t_d_:_:_____t_r_y___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); │ │ │ │ +90 } │ │ │ │ +91 │ │ │ │ +92#if __cplusplus >= 201103L │ │ │ │ +93 template │ │ │ │ +94 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +95_ _b_a_s_i_c___f_i_l_e_b_u_f(_b_a_s_i_c___f_i_l_e_b_u_f&& _____r_h_s) │ │ │ │ +96 : __streambuf_type(_____r_h_s), │ │ │ │ +97 _M_lock(), _M_file(_s_t_d::_m_o_v_e(_____r_h_s._M_file), &_M_lock), │ │ │ │ +98 _M_mode(_s_t_d::__exchange(_____r_h_s._M_mode, _i_o_s___b_a_s_e::openmode(0))), │ │ │ │ +99 _M_state_beg(_s_t_d::_m_o_v_e(_____r_h_s._M_state_beg)), │ │ │ │ +100 _M_state_cur(_s_t_d::_m_o_v_e(_____r_h_s._M_state_cur)), │ │ │ │ +101 _M_state_last(_s_t_d::_m_o_v_e(_____r_h_s._M_state_last)), │ │ │ │ +102 _M_buf(_s_t_d::__exchange(_____r_h_s._M_buf, _n_u_l_l_p_t_r)), │ │ │ │ +103 _M_buf_size(_s_t_d::__exchange(_____r_h_s._M_buf_size, 1)), │ │ │ │ +104 _M_buf_allocated(_s_t_d::__exchange(_____r_h_s._M_buf_allocated, _f_a_l_s_e)), │ │ │ │ +105 _M_reading(_s_t_d::__exchange(_____r_h_s._M_reading, _f_a_l_s_e)), │ │ │ │ +106 _M_writing(_s_t_d::__exchange(_____r_h_s._M_writing, _f_a_l_s_e)), │ │ │ │ +107 _M_pback(_____r_h_s._M_pback), │ │ │ │ +108 _M_pback_cur_save(_s_t_d::__exchange(_____r_h_s._M_pback_cur_save, _n_u_l_l_p_t_r)), │ │ │ │ +109 _M_pback_end_save(_s_t_d::__exchange(_____r_h_s._M_pback_end_save, _n_u_l_l_p_t_r)), │ │ │ │ +110 _M_pback_init(_s_t_d::__exchange(_____r_h_s._M_pback_init, _f_a_l_s_e)), │ │ │ │ +111 _M_codecvt(_____r_h_s._M_codecvt), │ │ │ │ +112 _M_ext_buf(_s_t_d::__exchange(_____r_h_s._M_ext_buf, _n_u_l_l_p_t_r)), │ │ │ │ +113 _M_ext_buf_size(_s_t_d::__exchange(_____r_h_s._M_ext_buf_size, 0)), │ │ │ │ +114 _M_ext_next(_s_t_d::__exchange(_____r_h_s._M_ext_next, _n_u_l_l_p_t_r)), │ │ │ │ +115 _M_ext_end(_s_t_d::__exchange(_____r_h_s._M_ext_end, _n_u_l_l_p_t_r)) │ │ │ │ +116 { │ │ │ │ +117 _____r_h_s._M_set_buffer(-1); │ │ │ │ +118 _____r_h_s._M_state_last = _____r_h_s._M_state_cur = _____r_h_s._M_state_beg; │ │ │ │ +119 } │ │ │ │ +120 │ │ │ │ +121 template │ │ │ │ +122 basic_filebuf<_CharT, _Traits>& │ │ │ │ +123 basic_filebuf<_CharT, _Traits>:: │ │ │ │ +124 operator=(basic_filebuf&& __rhs) │ │ │ │ +125 { │ │ │ │ +126 this->close(); │ │ │ │ +127 __streambuf_type::operator=(__rhs); │ │ │ │ +128 _M_file.swap(__rhs._M_file); │ │ │ │ +129 _M_mode = std::__exchange(__rhs._M_mode, _i_o_s___b_a_s_e_:_:_o_p_e_n_m_o_d_e(0)); │ │ │ │ +130 _M_state_beg = _s_t_d_:_:_m_o_v_e(__rhs._M_state_beg); │ │ │ │ +131 _M_state_cur = _s_t_d_:_:_m_o_v_e(__rhs._M_state_cur); │ │ │ │ +132 _M_state_last = _s_t_d_:_:_m_o_v_e(__rhs._M_state_last); │ │ │ │ +133 _M_buf = std::__exchange(__rhs._M_buf, nullptr); │ │ │ │ +134 _M_buf_size = std::__exchange(__rhs._M_buf_size, 1); │ │ │ │ +135 _M_buf_allocated = std::__exchange(__rhs._M_buf_allocated, false); │ │ │ │ +136 _M_ext_buf = std::__exchange(__rhs._M_ext_buf, nullptr); │ │ │ │ +137 _M_ext_buf_size = std::__exchange(__rhs._M_ext_buf_size, 0); │ │ │ │ +138 _M_ext_next = std::__exchange(__rhs._M_ext_next, nullptr); │ │ │ │ +139 _M_ext_end = std::__exchange(__rhs._M_ext_end, nullptr); │ │ │ │ +140 _M_reading = std::__exchange(__rhs._M_reading, false); │ │ │ │ +141 _M_writing = std::__exchange(__rhs._M_writing, false); │ │ │ │ +142 _M_pback_cur_save = std::__exchange(__rhs._M_pback_cur_save, nullptr); │ │ │ │ +143 _M_pback_end_save = std::__exchange(__rhs._M_pback_end_save, nullptr); │ │ │ │ +144 _M_pback_init = std::__exchange(__rhs._M_pback_init, false); │ │ │ │ +145 __rhs._M_set_buffer(-1); │ │ │ │ +146 __rhs._M_state_last = __rhs._M_state_cur = __rhs._M_state_beg; │ │ │ │ +147 return *this; │ │ │ │ +148 } │ │ │ │ +149 │ │ │ │ +150 template │ │ │ │ +151 void │ │ │ │ +152 basic_filebuf<_CharT, _Traits>:: │ │ │ │ +153 swap(basic_filebuf& __rhs) │ │ │ │ +154 { │ │ │ │ +155 __streambuf_type::swap(__rhs); │ │ │ │ +156 _M_file.swap(__rhs._M_file); │ │ │ │ +157 _s_t_d_:_:_s_w_a_p(_M_mode, __rhs._M_mode); │ │ │ │ +158 _s_t_d_:_:_s_w_a_p(_M_state_beg, __rhs._M_state_beg); │ │ │ │ +159 _s_t_d_:_:_s_w_a_p(_M_state_cur, __rhs._M_state_cur); │ │ │ │ +160 _s_t_d_:_:_s_w_a_p(_M_state_last, __rhs._M_state_last); │ │ │ │ +161 _s_t_d_:_:_s_w_a_p(_M_buf, __rhs._M_buf); │ │ │ │ +162 _s_t_d_:_:_s_w_a_p(_M_buf_size, __rhs._M_buf_size); │ │ │ │ +163 _s_t_d_:_:_s_w_a_p(_M_buf_allocated, __rhs._M_buf_allocated); │ │ │ │ +164 _s_t_d_:_:_s_w_a_p(_M_ext_buf, __rhs._M_ext_buf); │ │ │ │ +165 _s_t_d_:_:_s_w_a_p(_M_ext_buf_size, __rhs._M_ext_buf_size); │ │ │ │ +166 _s_t_d_:_:_s_w_a_p(_M_ext_next, __rhs._M_ext_next); │ │ │ │ +167 _s_t_d_:_:_s_w_a_p(_M_ext_end, __rhs._M_ext_end); │ │ │ │ +168 _s_t_d_:_:_s_w_a_p(_M_reading, __rhs._M_reading); │ │ │ │ +169 _s_t_d_:_:_s_w_a_p(_M_writing, __rhs._M_writing); │ │ │ │ +170 _s_t_d_:_:_s_w_a_p(_M_pback_cur_save, __rhs._M_pback_cur_save); │ │ │ │ +171 _s_t_d_:_:_s_w_a_p(_M_pback_end_save, __rhs._M_pback_end_save); │ │ │ │ +172 _s_t_d_:_:_s_w_a_p(_M_pback_init, __rhs._M_pback_init); │ │ │ │ +173 } │ │ │ │ +174#endif │ │ │ │ +175 │ │ │ │ +176 template │ │ │ │ +177 typename basic_filebuf<_CharT, _Traits>::__filebuf_type* │ │ │ │ +_1_7_8 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +179_ _o_p_e_n(const char* _____s, ios_base::openmode _____m_o_d_e) │ │ │ │ +180 { │ │ │ │ +181 _____f_i_l_e_b_u_f___t_y_p_e *_____r_e_t = 0; │ │ │ │ +182 if (!this->is_open()) │ │ │ │ +183 { │ │ │ │ +184 _M_file.open(_____s, _____m_o_d_e); │ │ │ │ +185 if (this->is_open()) │ │ │ │ +186 { │ │ │ │ +187 _M_allocate_internal_buffer(); │ │ │ │ +188 _M_mode = _____m_o_d_e; │ │ │ │ +189 │ │ │ │ +190 // Setup initial buffer to 'uncommitted' mode. │ │ │ │ +191 _M_reading = false; │ │ │ │ +192 _M_writing = false; │ │ │ │ +193 _M_set_buffer(-1); │ │ │ │ +194 │ │ │ │ +195 // Reset to initial state. │ │ │ │ +196 _M_state_last = _M_state_cur = _M_state_beg; │ │ │ │ +197 │ │ │ │ +198 // 27.8.1.3,4 │ │ │ │ +199 if ((_____m_o_d_e & _i_o_s___b_a_s_e_:_:_a_t_e) │ │ │ │ +200 && this->seekoff(0, _i_o_s___b_a_s_e_:_:_e_n_d, _____m_o_d_e) │ │ │ │ +201 == pos_type(off_type(-1))) │ │ │ │ +202 this->close(); │ │ │ │ +203 else │ │ │ │ +204 _____r_e_t = this; │ │ │ │ +205 } │ │ │ │ +206 } │ │ │ │ +207 return _____r_e_t; │ │ │ │ +208 } │ │ │ │ +209 │ │ │ │ +210#if _GLIBCXX_HAVE__WFOPEN && _GLIBCXX_USE_WCHAR_T │ │ │ │ +211 template │ │ │ │ +212 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>* │ │ │ │ +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_ _o_p_e_n(const wchar_t* _____s, ios_base::openmode _____m_o_d_e) │ │ │ │ +215 { │ │ │ │ +216 __filebuf_type *_____r_e_t = 0; │ │ │ │ +217 if (!this->is_open()) │ │ │ │ +218 { │ │ │ │ +219 _M_file.open(_____s, _____m_o_d_e); │ │ │ │ +220 if (this->is_open()) │ │ │ │ +221 { │ │ │ │ +222 _M_allocate_internal_buffer(); │ │ │ │ +223 _M_mode = _____m_o_d_e; │ │ │ │ +224 │ │ │ │ +225 // Setup initial buffer to 'uncommitted' mode. │ │ │ │ +226 _M_reading = false; │ │ │ │ +227 _M_writing = false; │ │ │ │ +228 _M_set_buffer(-1); │ │ │ │ +229 │ │ │ │ +230 // Reset to initial state. │ │ │ │ +231 _M_state_last = _M_state_cur = _M_state_beg; │ │ │ │ +232 │ │ │ │ +233 // 27.8.1.3,4 │ │ │ │ +234 if ((_____m_o_d_e & _i_o_s___b_a_s_e_:_:_a_t_e) │ │ │ │ +235 && this->seekoff(0, _i_o_s___b_a_s_e_:_:_e_n_d, _____m_o_d_e) │ │ │ │ +236 == pos_type(off_type(-1))) │ │ │ │ +237 this->close(); │ │ │ │ +238 else │ │ │ │ +239 _____r_e_t = this; │ │ │ │ +240 } │ │ │ │ +241 } │ │ │ │ +_2_4_2 return _____r_e_t; │ │ │ │ +243 } │ │ │ │ +244#endif // HAVE__WFOPEN && USE_WCHAR_T │ │ │ │ +245 │ │ │ │ +246 template │ │ │ │ +247 typename _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_:_____f_i_l_e_b_u_f___t_y_p_e* │ │ │ │ +_2_4_8 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +249_ _c_l_o_s_e() │ │ │ │ +250 { │ │ │ │ +251 if (!this->is_open()) │ │ │ │ +252 return 0; │ │ │ │ +253 │ │ │ │ +254 bool _____t_e_s_t_f_a_i_l = false; │ │ │ │ +255 { │ │ │ │ +256 // NB: Do this here so that re-opened filebufs will be cool... │ │ │ │ +257 struct _____c_l_o_s_e___s_e_n_t_r_y │ │ │ │ +258 { │ │ │ │ +259 _b_a_s_i_c___f_i_l_e_b_u_f *_____f_b; │ │ │ │ +260 _____c_l_o_s_e___s_e_n_t_r_y (_b_a_s_i_c___f_i_l_e_b_u_f *_____f_b_i): _____f_b(_____f_b_i) { } │ │ │ │ +261 _~_____c_l_o_s_e___s_e_n_t_r_y () │ │ │ │ +262 { │ │ │ │ +263 _____f_b->_M_mode = _i_o_s___b_a_s_e_:_:_o_p_e_n_m_o_d_e(0); │ │ │ │ +264 _____f_b->_M_pback_init = false; │ │ │ │ +265 _____f_b->_M_destroy_internal_buffer(); │ │ │ │ +266 _____f_b->_M_reading = false; │ │ │ │ +267 _____f_b->_M_writing = false; │ │ │ │ +268 _____f_b->_M_set_buffer(-1); │ │ │ │ +269 _____f_b->_M_state_last = _____f_b->_M_state_cur = _____f_b->_M_state_beg; │ │ │ │ +270 } │ │ │ │ +271 } _____c_s (this); │ │ │ │ +272 │ │ │ │ +273 __try │ │ │ │ +274 { │ │ │ │ +275 if (!_M_terminate_output()) │ │ │ │ +276 _____t_e_s_t_f_a_i_l = true; │ │ │ │ +277 } │ │ │ │ +278 __catch(...) │ │ │ │ +279 { │ │ │ │ +280 _M_file.close(); │ │ │ │ +281 __throw_exception_again; │ │ │ │ +282 } │ │ │ │ +283 } │ │ │ │ +284 │ │ │ │ +285 if (!_M_file.close()) │ │ │ │ +286 _____t_e_s_t_f_a_i_l = true; │ │ │ │ +287 │ │ │ │ +288 if (_____t_e_s_t_f_a_i_l) │ │ │ │ +289 return 0; │ │ │ │ +290 else │ │ │ │ +291 return this; │ │ │ │ +292 } │ │ │ │ +293 │ │ │ │ +294 template │ │ │ │ +295 _s_t_r_e_a_m_s_i_z_e │ │ │ │ +_2_9_6 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +297_ _s_h_o_w_m_a_n_y_c() │ │ │ │ +298 { │ │ │ │ +299 _s_t_r_e_a_m_s_i_z_e _____r_e_t = -1; │ │ │ │ +300 const bool _____t_e_s_t_i_n = _M_mode & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +301 if (_____t_e_s_t_i_n && this->is_open()) │ │ │ │ +302 { │ │ │ │ +303 // For a stateful encoding (-1) the pending sequence might be just │ │ │ │ +304 // shift and unshift prefixes with no actual character. │ │ │ │ +305 _____r_e_t = this->egptr() - this->gptr(); │ │ │ │ +306 │ │ │ │ +307#if _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM │ │ │ │ +308 // About this workaround, see libstdc++/20806. │ │ │ │ +309 const bool _____t_e_s_t_b_i_n_a_r_y = _M_mode & _i_o_s___b_a_s_e_:_:_b_i_n_a_r_y; │ │ │ │ +310 if (__check_facet(_M_codecvt).encoding() >= 0 │ │ │ │ +311 && _____t_e_s_t_b_i_n_a_r_y) │ │ │ │ +312#else │ │ │ │ +313 if (__check_facet(_M_codecvt).encoding() >= 0) │ │ │ │ +314#endif │ │ │ │ +315 _____r_e_t += _M_file.showmanyc() / _M_codecvt->max_length(); │ │ │ │ +316 } │ │ │ │ +_3_1_7 return _____r_e_t; │ │ │ │ +318 } │ │ │ │ +319 │ │ │ │ +320 template │ │ │ │ +321 typename basic_filebuf<_CharT, _Traits>::int_type │ │ │ │ +_3_2_2 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +323_ _u_n_d_e_r_f_l_o_w() │ │ │ │ +324 { │ │ │ │ +325 int_type _____r_e_t = traits_type::eof(); │ │ │ │ +326 const bool _____t_e_s_t_i_n = _M_mode & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +327 if (_____t_e_s_t_i_n) │ │ │ │ +328 { │ │ │ │ +329 if (_M_writing) │ │ │ │ +330 { │ │ │ │ +331 if (overflow() == traits_type::eof()) │ │ │ │ +332 return _____r_e_t; │ │ │ │ +333 _M_set_buffer(-1); │ │ │ │ +334 _M_writing = false; │ │ │ │ +335 } │ │ │ │ +336 // Check for pback madness, and if so switch back to the │ │ │ │ +337 // normal buffers and jet outta here before expensive │ │ │ │ +338 // fileops happen... │ │ │ │ +339 _M_destroy_pback(); │ │ │ │ +340 │ │ │ │ +341 if (this->gptr() < this->egptr()) │ │ │ │ +342 return traits_type::to_int_type(*this->gptr()); │ │ │ │ +343 │ │ │ │ +344 // Get and convert input sequence. │ │ │ │ +345 const size_t _____b_u_f_l_e_n = _M_buf_size > 1 ? _M_buf_size - 1 : 1; │ │ │ │ +346 │ │ │ │ +347 // Will be set to true if ::read() returns 0 indicating EOF. │ │ │ │ +348 bool _____g_o_t___e_o_f = false; │ │ │ │ +349 // Number of internal characters produced. │ │ │ │ +350 _s_t_r_e_a_m_s_i_z_e _____i_l_e_n = 0; │ │ │ │ +351 codecvt_base::result __r = codecvt_base::ok; │ │ │ │ +352 if (__check_facet(_M_codecvt).always_noconv()) │ │ │ │ +353 { │ │ │ │ +354 _____i_l_e_n = _M_file.xsgetn(reinterpret_cast(this->eback()), │ │ │ │ +355 _____b_u_f_l_e_n); │ │ │ │ +356 if (_____i_l_e_n == 0) │ │ │ │ +357 _____g_o_t___e_o_f = true; │ │ │ │ +358 } │ │ │ │ +359 else │ │ │ │ +360 { │ │ │ │ +361 // Worst-case number of external bytes. │ │ │ │ +362 // XXX Not done encoding() == -1. │ │ │ │ +363 const int _____e_n_c = _M_codecvt->encoding(); │ │ │ │ +364 _s_t_r_e_a_m_s_i_z_e _____b_l_e_n; // Minimum buffer size. │ │ │ │ +365 _s_t_r_e_a_m_s_i_z_e _____r_l_e_n; // Number of chars to read. │ │ │ │ +366 if (_____e_n_c > 0) │ │ │ │ +367 _____b_l_e_n = _____r_l_e_n = _____b_u_f_l_e_n * _____e_n_c; │ │ │ │ +_3_6_8 else │ │ │ │ +369 { │ │ │ │ +370 _____b_l_e_n = _____b_u_f_l_e_n + _M_codecvt->max_length() - 1; │ │ │ │ +371 _____r_l_e_n = _____b_u_f_l_e_n; │ │ │ │ +372 } │ │ │ │ +373 const _s_t_r_e_a_m_s_i_z_e _____r_e_m_a_i_n_d_e_r = _M_ext_end - _M_ext_next; │ │ │ │ +374 _____r_l_e_n = _____r_l_e_n > _____r_e_m_a_i_n_d_e_r ? _____r_l_e_n - _____r_e_m_a_i_n_d_e_r : 0; │ │ │ │ +375 │ │ │ │ +376 // An imbue in 'read' mode implies first converting the external │ │ │ │ +377 // chars already present. │ │ │ │ +378 if (_M_reading && this->egptr() == this->eback() && _____r_e_m_a_i_n_d_e_r) │ │ │ │ +_3_7_9 _____r_l_e_n = 0; │ │ │ │ +380 │ │ │ │ +381 // Allocate buffer if necessary and move unconverted │ │ │ │ +382 // bytes to front. │ │ │ │ +383 if (_M_ext_buf_size < _____b_l_e_n) │ │ │ │ +384 { │ │ │ │ +385 char* _____b_u_f = new char[_____b_l_e_n]; │ │ │ │ +386 if (_____r_e_m_a_i_n_d_e_r) │ │ │ │ +_3_8_7 _____b_u_i_l_t_i_n___m_e_m_c_p_y(_____b_u_f, _M_ext_next, _____r_e_m_a_i_n_d_e_r); │ │ │ │ +388 │ │ │ │ +389 delete [] _M_ext_buf; │ │ │ │ +_3_9_0 _M_ext_buf = _____b_u_f; │ │ │ │ +391 _M_ext_buf_size = _____b_l_e_n; │ │ │ │ +392 } │ │ │ │ +393 else if (_____r_e_m_a_i_n_d_e_r) │ │ │ │ +394 _____b_u_i_l_t_i_n___m_e_m_m_o_v_e(_M_ext_buf, _M_ext_next, _____r_e_m_a_i_n_d_e_r); │ │ │ │ +395 │ │ │ │ +396 _M_ext_next = _M_ext_buf; │ │ │ │ +397 _M_ext_end = _M_ext_buf + _____r_e_m_a_i_n_d_e_r; │ │ │ │ +398 _M_state_last = _M_state_cur; │ │ │ │ +399 │ │ │ │ +_4_0_0 do │ │ │ │ +401 { │ │ │ │ +402 if (_____r_l_e_n > 0) │ │ │ │ +403 { │ │ │ │ +404 // Sanity check! │ │ │ │ +405 // This may fail if the return value of │ │ │ │ +406 // codecvt::max_length() is bogus. │ │ │ │ +407 if (_M_ext_end - _M_ext_buf + _____r_l_e_n > _M_ext_buf_size) │ │ │ │ +408 { │ │ │ │ +409 __throw_ios_failure(__N("basic_filebuf::underflow " │ │ │ │ +410 "codecvt::max_length() " │ │ │ │ +411 "is not valid")); │ │ │ │ +412 } │ │ │ │ +413 _s_t_r_e_a_m_s_i_z_e _____e_l_e_n = _M_file.xsgetn(_M_ext_end, _____r_l_e_n); │ │ │ │ +414 if (_____e_l_e_n == 0) │ │ │ │ +415 _____g_o_t___e_o_f = true; │ │ │ │ +416 else if (_____e_l_e_n == -1) │ │ │ │ +417 break; │ │ │ │ +418 _M_ext_end += _____e_l_e_n; │ │ │ │ +419 } │ │ │ │ +_4_2_0 │ │ │ │ +421 char_type* _____i_e_n_d = this->eback(); │ │ │ │ +422 if (_M_ext_next < _M_ext_end) │ │ │ │ +_4_2_3 __r = _M_codecvt->in(_M_state_cur, _M_ext_next, │ │ │ │ +424 _M_ext_end, _M_ext_next, │ │ │ │ +425 this->eback(), │ │ │ │ +426 this->eback() + _____b_u_f_l_e_n, _____i_e_n_d); │ │ │ │ +_4_2_7 if (__r == codecvt_base::noconv) │ │ │ │ +428 { │ │ │ │ +429 size_t _____a_v_a_i_l = _M_ext_end - _M_ext_buf; │ │ │ │ +430 _____i_l_e_n = _s_t_d_:_:_m_i_n(_____a_v_a_i_l, _____b_u_f_l_e_n); │ │ │ │ +431 traits_type::copy(this->eback(), │ │ │ │ +432 reinterpret_cast │ │ │ │ +433 (_M_ext_buf), _____i_l_e_n); │ │ │ │ +434 _M_ext_next = _M_ext_buf + _____i_l_e_n; │ │ │ │ +435 } │ │ │ │ +436 else │ │ │ │ +437 _____i_l_e_n = _____i_e_n_d - this->eback(); │ │ │ │ +_4_3_8 │ │ │ │ +439 // _M_codecvt->in may return error while __ilen > 0: this is │ │ │ │ +440 // ok, and actually occurs in case of mixed encodings (e.g., │ │ │ │ +_4_4_1 // XML files). │ │ │ │ +442 if (__r == codecvt_base::error) │ │ │ │ +443 break; │ │ │ │ +_4_4_4 │ │ │ │ +445 _____r_l_e_n = 1; │ │ │ │ +446 } │ │ │ │ +_4_4_7 while (_____i_l_e_n == 0 && !_____g_o_t___e_o_f); │ │ │ │ +448 } │ │ │ │ +449 │ │ │ │ +450 if (_____i_l_e_n > 0) │ │ │ │ +451 { │ │ │ │ +452 _M_set_buffer(_____i_l_e_n); │ │ │ │ +453 _M_reading = true; │ │ │ │ +454 _____r_e_t = traits_type::to_int_type(*this->gptr()); │ │ │ │ +455 } │ │ │ │ +456 else if (__got_eof) │ │ │ │ +457 { │ │ │ │ +458 // If the actual end of file is reached, set 'uncommitted' │ │ │ │ +459 // mode, thus allowing an immediate write without an │ │ │ │ +460 // intervening seek. │ │ │ │ +461 _M_set_buffer(-1); │ │ │ │ +462 _M_reading = false; │ │ │ │ +463 // However, reaching it while looping on partial means that │ │ │ │ +464 // the file has got an incomplete character. │ │ │ │ +465 if (__r == codecvt_base::partial) │ │ │ │ +466 __throw_ios_failure(__N("basic_filebuf::underflow " │ │ │ │ +467 "incomplete character in file")); │ │ │ │ +468 } │ │ │ │ +469 else if (__r == codecvt_base::error) │ │ │ │ +470 __throw_ios_failure(__N("basic_filebuf::underflow " │ │ │ │ +471 "invalid byte sequence in file")); │ │ │ │ +472 else │ │ │ │ +473 __throw_ios_failure(__N("basic_filebuf::underflow " │ │ │ │ +474 "error reading the file"), errno); │ │ │ │ +475 } │ │ │ │ +476 return __ret; │ │ │ │ +477 } │ │ │ │ +478 │ │ │ │ +479 template │ │ │ │ +480 typename basic_filebuf<_CharT, _Traits>::int_type │ │ │ │ +_4_8_1 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +482_ _p_b_a_c_k_f_a_i_l(int_type __i) │ │ │ │ +483 { │ │ │ │ +484 int_type _____r_e_t = traits_type::eof(); │ │ │ │ +485 const bool _____t_e_s_t_i_n = _M_mode & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +486 if (_____t_e_s_t_i_n) │ │ │ │ +487 { │ │ │ │ +488 if (_M_writing) │ │ │ │ +489 { │ │ │ │ +490 if (overflow() == traits_type::eof()) │ │ │ │ +491 return _____r_e_t; │ │ │ │ +492 _M_set_buffer(-1); │ │ │ │ +493 _M_writing = false; │ │ │ │ +494 } │ │ │ │ +495 // Remember whether the pback buffer is active, otherwise below │ │ │ │ +496 // we may try to store in it a second char (libstdc++/9761). │ │ │ │ +497 const bool _____t_e_s_t_p_b = _M_pback_init; │ │ │ │ +498 const bool _____t_e_s_t_e_o_f = traits_type::eq_int_type(__i, _____r_e_t); │ │ │ │ +499 int_type _____t_m_p; │ │ │ │ +500 if (this->eback() < this->gptr()) │ │ │ │ +501 { │ │ │ │ +502 this->gbump(-1); │ │ │ │ +503 _____t_m_p = traits_type::to_int_type(*this->gptr()); │ │ │ │ +504 } │ │ │ │ +505 else if (this->seekoff(-1, _i_o_s___b_a_s_e_:_:_c_u_r) != pos_type(off_type(-1))) │ │ │ │ +506 { │ │ │ │ +507 _____t_m_p = this->underflow(); │ │ │ │ +508 if (traits_type::eq_int_type(_____t_m_p, _____r_e_t)) │ │ │ │ +509 return _____r_e_t; │ │ │ │ +510 } │ │ │ │ +511 else │ │ │ │ +512 { │ │ │ │ +513 // At the beginning of the buffer, need to make a │ │ │ │ +514 // putback position available. But the seek may fail │ │ │ │ +515 // (f.i., at the beginning of a file, see │ │ │ │ +516 // libstdc++/9439) and in that case we return │ │ │ │ +517 // traits_type::eof(). │ │ │ │ +518 return _____r_e_t; │ │ │ │ +519 } │ │ │ │ +520 │ │ │ │ +521 // Try to put back __i into input sequence in one of three ways. │ │ │ │ +522 // Order these tests done in is unspecified by the standard. │ │ │ │ +523 if (!_____t_e_s_t_e_o_f && traits_type::eq_int_type(__i, _____t_m_p)) │ │ │ │ +524 _____r_e_t = __i; │ │ │ │ +525 else if (_____t_e_s_t_e_o_f) │ │ │ │ +526 _____r_e_t = traits_type::not_eof(__i); │ │ │ │ +527 else if (!_____t_e_s_t_p_b) │ │ │ │ +528 { │ │ │ │ +529 _M_create_pback(); │ │ │ │ +530 _M_reading = true; │ │ │ │ +531 *this->gptr() = traits_type::to_char_type(__i); │ │ │ │ +532 _____r_e_t = __i; │ │ │ │ +533 } │ │ │ │ +534 } │ │ │ │ +535 return _____r_e_t; │ │ │ │ +536 } │ │ │ │ +537 │ │ │ │ +538 template │ │ │ │ +539 typename basic_filebuf<_CharT, _Traits>::int_type │ │ │ │ +_5_4_0 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +541_ _o_v_e_r_f_l_o_w(int_type __c) │ │ │ │ +542 { │ │ │ │ +543 int_type _____r_e_t = traits_type::eof(); │ │ │ │ +544 const bool _____t_e_s_t_e_o_f = traits_type::eq_int_type(__c, _____r_e_t); │ │ │ │ +545 const bool _____t_e_s_t_o_u_t = (_M_mode & _i_o_s___b_a_s_e_:_:_o_u_t │ │ │ │ +546 || _M_mode & _i_o_s___b_a_s_e_:_:_a_p_p); │ │ │ │ +547 if (_____t_e_s_t_o_u_t) │ │ │ │ +548 { │ │ │ │ +549 if (_M_reading) │ │ │ │ +550 { │ │ │ │ +551 _M_destroy_pback(); │ │ │ │ +552 const int _____g_p_t_r___o_f_f = _M_get_ext_pos(_M_state_last); │ │ │ │ +553 if (_M_seek(_____g_p_t_r___o_f_f, _i_o_s___b_a_s_e_:_:_c_u_r, _M_state_last) │ │ │ │ +554 == pos_type(off_type(-1))) │ │ │ │ +555 return _____r_e_t; │ │ │ │ +556 } │ │ │ │ +557 if (this->pbase() < this->pptr()) │ │ │ │ +558 { │ │ │ │ +559 // If appropriate, append the overflow char. │ │ │ │ +560 if (!_____t_e_s_t_e_o_f) │ │ │ │ +561 { │ │ │ │ +562 *this->pptr() = traits_type::to_char_type(__c); │ │ │ │ +563 this->pbump(1); │ │ │ │ +564 } │ │ │ │ +565 │ │ │ │ +566 // Convert pending sequence to external representation, │ │ │ │ +567 // and output. │ │ │ │ +568 if (_M_convert_to_external(this->pbase(), │ │ │ │ +569 this->pptr() - this->pbase())) │ │ │ │ +570 { │ │ │ │ +571 _M_set_buffer(0); │ │ │ │ +572 _____r_e_t = traits_type::not_eof(__c); │ │ │ │ +573 } │ │ │ │ +574 } │ │ │ │ +575 else if (_M_buf_size > 1) │ │ │ │ +576 { │ │ │ │ +577 // Overflow in 'uncommitted' mode: set _M_writing, set │ │ │ │ +578 // the buffer to the initial 'write' mode, and put __c │ │ │ │ +579 // into the buffer. │ │ │ │ +580 _M_set_buffer(0); │ │ │ │ +581 _M_writing = true; │ │ │ │ +582 if (!_____t_e_s_t_e_o_f) │ │ │ │ +583 { │ │ │ │ +584 *this->pptr() = traits_type::to_char_type(__c); │ │ │ │ +585 this->pbump(1); │ │ │ │ +586 } │ │ │ │ +587 _____r_e_t = traits_type::not_eof(__c); │ │ │ │ +588 } │ │ │ │ +589 else │ │ │ │ +590 { │ │ │ │ +591 // Unbuffered. │ │ │ │ +592 char_type _____c_o_n_v = traits_type::to_char_type(__c); │ │ │ │ +593 if (_____t_e_s_t_e_o_f || _M_convert_to_external(&_____c_o_n_v, 1)) │ │ │ │ +594 { │ │ │ │ +595 _M_writing = true; │ │ │ │ +596 _____r_e_t = traits_type::not_eof(__c); │ │ │ │ +597 } │ │ │ │ +598 } │ │ │ │ +599 } │ │ │ │ +600 return _____r_e_t; │ │ │ │ +601 } │ │ │ │ +602 │ │ │ │ +603 template │ │ │ │ +604 bool │ │ │ │ +605 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +606_ ___M___c_o_n_v_e_r_t___t_o___e_x_t_e_r_n_a_l(_CharT* _____i_b_u_f, _s_t_r_e_a_m_s_i_z_e _____i_l_e_n) │ │ │ │ +607 { │ │ │ │ +608 // Sizes of external and pending output. │ │ │ │ +609 _s_t_r_e_a_m_s_i_z_e _____e_l_e_n; │ │ │ │ +610 _s_t_r_e_a_m_s_i_z_e _____p_l_e_n; │ │ │ │ +611 if (__check_facet(_M_codecvt).always_noconv()) │ │ │ │ +612 { │ │ │ │ +613 _____e_l_e_n = _M_file.xsputn(reinterpret_cast(_____i_b_u_f), _____i_l_e_n); │ │ │ │ +614 _____p_l_e_n = _____i_l_e_n; │ │ │ │ +615 } │ │ │ │ +616 else │ │ │ │ +617 { │ │ │ │ +618 // Worst-case number of external bytes needed. │ │ │ │ +619 // XXX Not done encoding() == -1. │ │ │ │ +620 _s_t_r_e_a_m_s_i_z_e __blen = __ilen * _M_codecvt->max_length(); │ │ │ │ +621 char* __buf = static_cast(__builtin_alloca(__blen)); │ │ │ │ +622 │ │ │ │ +623 char* __bend; │ │ │ │ +624 const char_type* __iend; │ │ │ │ +625 codecvt_base::result __r; │ │ │ │ +626 __r = _M_codecvt->out(_M_state_cur, __ibuf, __ibuf + __ilen, │ │ │ │ +627 __iend, __buf, __buf + __blen, __bend); │ │ │ │ +628 │ │ │ │ +629 if (__r == codecvt_base::ok || __r == codecvt_base::partial) │ │ │ │ +630 __blen = __bend - __buf; │ │ │ │ +631 else if (__r == codecvt_base::noconv) │ │ │ │ +632 { │ │ │ │ +633 // Same as the always_noconv case above. │ │ │ │ +634 __buf = reinterpret_cast(__ibuf); │ │ │ │ +635 __blen = __ilen; │ │ │ │ +636 } │ │ │ │ +637 else │ │ │ │ +638 __throw_ios_failure(__N("basic_filebuf::_M_convert_to_external " │ │ │ │ +639 "conversion error")); │ │ │ │ +640 │ │ │ │ +641 __elen = _M_file.xsputn(__buf, __blen); │ │ │ │ +642 __plen = __blen; │ │ │ │ +643 │ │ │ │ +644 // Try once more for partial conversions. │ │ │ │ +645 if (__r == codecvt_base::partial && __elen == __plen) │ │ │ │ +646 { │ │ │ │ +647 const char_type* __iresume = __iend; │ │ │ │ +648 _s_t_r_e_a_m_s_i_z_e __rlen = this->pptr() - __iend; │ │ │ │ +649 __r = _M_codecvt->out(_M_state_cur, __iresume, │ │ │ │ +650 __iresume + __rlen, __iend, __buf, │ │ │ │ +651 __buf + __blen, __bend); │ │ │ │ +652 if (__r != codecvt_base::error) │ │ │ │ +653 { │ │ │ │ +654 __rlen = __bend - __buf; │ │ │ │ +655 __elen = _M_file.xsputn(__buf, __rlen); │ │ │ │ +656 __plen = __rlen; │ │ │ │ +657 } │ │ │ │ +658 else │ │ │ │ +659 __throw_ios_failure(__N("basic_filebuf::_M_convert_to_external " │ │ │ │ +660 "conversion error")); │ │ │ │ +661 } │ │ │ │ +662 } │ │ │ │ +663 return __elen == __plen; │ │ │ │ +664 } │ │ │ │ +665 │ │ │ │ +666 template │ │ │ │ +667 _s_t_r_e_a_m_s_i_z_e │ │ │ │ +_6_6_8 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +669_ _x_s_g_e_t_n(_CharT* _____s, _s_t_r_e_a_m_s_i_z_e __n) │ │ │ │ +670 { │ │ │ │ +671 // Clear out pback buffer before going on to the real deal... │ │ │ │ +672 _s_t_r_e_a_m_s_i_z_e _____r_e_t = 0; │ │ │ │ +673 if (_M_pback_init) │ │ │ │ +674 { │ │ │ │ +675 if (__n > 0 && this->gptr() == this->eback()) │ │ │ │ +676 { │ │ │ │ +677 *_____s++ = *this->gptr(); // emulate non-underflowing sbumpc │ │ │ │ +678 this->gbump(1); │ │ │ │ +679 _____r_e_t = 1; │ │ │ │ +680 --__n; │ │ │ │ +681 } │ │ │ │ +682 _M_destroy_pback(); │ │ │ │ +683 } │ │ │ │ +684 else if (_M_writing) │ │ │ │ +685 { │ │ │ │ +686 if (overflow() == traits_type::eof()) │ │ │ │ +687 return _____r_e_t; │ │ │ │ +688 _M_set_buffer(-1); │ │ │ │ +689 _M_writing = false; │ │ │ │ +690 } │ │ │ │ +691 │ │ │ │ +692 // Optimization in the always_noconv() case, to be generalized in the │ │ │ │ +693 // future: when __n > __buflen we read directly instead of using the │ │ │ │ +694 // buffer repeatedly. │ │ │ │ +695 const bool _____t_e_s_t_i_n = _M_mode & _i_o_s___b_a_s_e_:_:_i_n; │ │ │ │ +696 const _s_t_r_e_a_m_s_i_z_e _____b_u_f_l_e_n = _M_buf_size > 1 ? _M_buf_size - 1 : 1; │ │ │ │ +697 │ │ │ │ +698 if (__n > _____b_u_f_l_e_n && __check_facet(_M_codecvt).always_noconv() │ │ │ │ +699 && _____t_e_s_t_i_n) │ │ │ │ +700 { │ │ │ │ +701 // First, copy the chars already present in the buffer. │ │ │ │ +702 const _s_t_r_e_a_m_s_i_z_e _____a_v_a_i_l = this->egptr() - this->gptr(); │ │ │ │ +703 if (_____a_v_a_i_l != 0) │ │ │ │ +704 { │ │ │ │ +705 traits_type::copy(_____s, this->gptr(), _____a_v_a_i_l); │ │ │ │ +706 _____s += _____a_v_a_i_l; │ │ │ │ +707 this->setg(this->eback(), this->gptr() + _____a_v_a_i_l, this->egptr()); │ │ │ │ +708 _____r_e_t += _____a_v_a_i_l; │ │ │ │ +709 __n -= _____a_v_a_i_l; │ │ │ │ +710 } │ │ │ │ +711 │ │ │ │ +712 // Need to loop in case of short reads (relatively common │ │ │ │ +713 // with pipes). │ │ │ │ +714 _s_t_r_e_a_m_s_i_z_e _____l_e_n; │ │ │ │ +715 for (;;) │ │ │ │ +716 { │ │ │ │ +717 _____l_e_n = _M_file.xsgetn(reinterpret_cast(_____s), __n); │ │ │ │ +718 if (_____l_e_n == -1) │ │ │ │ +719 __throw_ios_failure(__N("basic_filebuf::xsgetn " │ │ │ │ +720 "error reading the file"), errno); │ │ │ │ +721 if (_____l_e_n == 0) │ │ │ │ +722 break; │ │ │ │ +723 │ │ │ │ +724 __n -= _____l_e_n; │ │ │ │ +725 _____r_e_t += _____l_e_n; │ │ │ │ +726 if (__n == 0) │ │ │ │ +727 break; │ │ │ │ +728 │ │ │ │ +729 _____s += _____l_e_n; │ │ │ │ +730 } │ │ │ │ +731 │ │ │ │ +732 if (__n == 0) │ │ │ │ +733 { │ │ │ │ +734 // Set _M_reading. Buffer is already in initial 'read' mode. │ │ │ │ +735 _M_reading = true; │ │ │ │ +736 } │ │ │ │ +737 else if (_____l_e_n == 0) │ │ │ │ +738 { │ │ │ │ +739 // If end of file is reached, set 'uncommitted' │ │ │ │ +740 // mode, thus allowing an immediate write without │ │ │ │ +741 // an intervening seek. │ │ │ │ +742 _M_set_buffer(-1); │ │ │ │ +743 _M_reading = false; │ │ │ │ +744 } │ │ │ │ +745 } │ │ │ │ +746 else │ │ │ │ +747 _____r_e_t += __streambuf_type::xsgetn(_____s, __n); │ │ │ │ +748 │ │ │ │ +749 return _____r_e_t; │ │ │ │ +750 } │ │ │ │ +751 │ │ │ │ +752 template │ │ │ │ +753 _s_t_r_e_a_m_s_i_z_e │ │ │ │ +_7_5_4 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +755_ _x_s_p_u_t_n(const _CharT* _____s, _s_t_r_e_a_m_s_i_z_e __n) │ │ │ │ +756 { │ │ │ │ +757 _s_t_r_e_a_m_s_i_z_e _____r_e_t = 0; │ │ │ │ +758 // Optimization in the always_noconv() case, to be generalized in the │ │ │ │ +759 // future: when __n is larger than the available capacity we write │ │ │ │ +760 // directly instead of using the buffer. │ │ │ │ +761 const bool _____t_e_s_t_o_u_t = (_M_mode & _i_o_s___b_a_s_e_:_:_o_u_t │ │ │ │ +762 || _M_mode & _i_o_s___b_a_s_e_:_:_a_p_p); │ │ │ │ +763 if (__check_facet(_M_codecvt).always_noconv() │ │ │ │ +764 && _____t_e_s_t_o_u_t && !_M_reading) │ │ │ │ +765 { │ │ │ │ +766 _s_t_r_e_a_m_s_i_z_e _____b_u_f_a_v_a_i_l = this->epptr() - this->pptr(); │ │ │ │ +767 │ │ │ │ +768 // Don't mistake 'uncommitted' mode buffered with unbuffered. │ │ │ │ +769 if (!_M_writing && _M_buf_size > 1) │ │ │ │ +770 _____b_u_f_a_v_a_i_l = _M_buf_size - 1; │ │ │ │ +771 │ │ │ │ +772 if (__n >= _____b_u_f_a_v_a_i_l) │ │ │ │ +773 { │ │ │ │ +774 const _s_t_r_e_a_m_s_i_z_e _____b_u_f_f_i_l_l = this->pptr() - this->pbase(); │ │ │ │ +775 const char* _____b_u_f = reinterpret_cast(this->pbase()); │ │ │ │ +776 _____r_e_t = _M_file.xsputn_2(_____b_u_f, _____b_u_f_f_i_l_l, │ │ │ │ +777 reinterpret_cast(_____s), │ │ │ │ +778 __n); │ │ │ │ +779 if (_____r_e_t == _____b_u_f_f_i_l_l + __n) │ │ │ │ +780 { │ │ │ │ +781 _M_set_buffer(0); │ │ │ │ +782 _M_writing = true; │ │ │ │ +783 } │ │ │ │ +784 if (_____r_e_t > _____b_u_f_f_i_l_l) │ │ │ │ +785 _____r_e_t -= _____b_u_f_f_i_l_l; │ │ │ │ +786 else │ │ │ │ +787 _____r_e_t = 0; │ │ │ │ +788 } │ │ │ │ +789 else │ │ │ │ +790 _____r_e_t = __streambuf_type::xsputn(_____s, __n); │ │ │ │ +791 } │ │ │ │ +792 else │ │ │ │ +793 _____r_e_t = __streambuf_type::xsputn(_____s, __n); │ │ │ │ +794 return _____r_e_t; │ │ │ │ +795 } │ │ │ │ +796 │ │ │ │ +797 template │ │ │ │ +798 typename _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_:_____s_t_r_e_a_m_b_u_f___t_y_p_e* │ │ │ │ +_7_9_9 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +800_ _s_e_t_b_u_f(char_type* _____s, _s_t_r_e_a_m_s_i_z_e __n) │ │ │ │ +801 { │ │ │ │ +802 if (!this->is_open()) │ │ │ │ +803 { │ │ │ │ +804 if (_____s == 0 && __n == 0) │ │ │ │ +805 _M_buf_size = 1; │ │ │ │ +806 else if (_____s && __n > 0) │ │ │ │ +807 { │ │ │ │ +808 // This is implementation-defined behavior, and assumes that │ │ │ │ +809 // an external char_type array of length __n exists and has │ │ │ │ +810 // been pre-allocated. If this is not the case, things will │ │ │ │ +811 // quickly blow up. When __n > 1, __n - 1 positions will be │ │ │ │ +812 // used for the get area, __n - 1 for the put area and 1 │ │ │ │ +813 // position to host the overflow char of a full put area. │ │ │ │ +814 // When __n == 1, 1 position will be used for the get area │ │ │ │ +815 // and 0 for the put area, as in the unbuffered case above. │ │ │ │ +816 _M_buf = _____s; │ │ │ │ +817 _M_buf_size = __n; │ │ │ │ +818 } │ │ │ │ +819 } │ │ │ │ +820 return this; │ │ │ │ +821 } │ │ │ │ +822 │ │ │ │ +823 │ │ │ │ +824 // According to 27.8.1.4 p11 - 13, seekoff should ignore the last │ │ │ │ +825 // argument (of type openmode). │ │ │ │ +826 template │ │ │ │ +827 typename basic_filebuf<_CharT, _Traits>::pos_type │ │ │ │ +_8_2_8 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +829_ _s_e_e_k_o_f_f(off_type _____o_f_f, ios_base::seekdir _____w_a_y, ios_base::openmode) │ │ │ │ +830 { │ │ │ │ +831 int __width = 0; │ │ │ │ +832 if (_M_codecvt) │ │ │ │ +833 __width = _M_codecvt->encoding(); │ │ │ │ +834 if (__width < 0) │ │ │ │ +835 __width = 0; │ │ │ │ +836 │ │ │ │ +837 pos_type _____r_e_t = pos_type(off_type(-1)); │ │ │ │ +838 const bool _____t_e_s_t_f_a_i_l = _____o_f_f != 0 && __width <= 0; │ │ │ │ +839 if (this->is_open() && !_____t_e_s_t_f_a_i_l) │ │ │ │ +840 { │ │ │ │ +841 // tellg and tellp queries do not affect any state, unless │ │ │ │ +842 // ! always_noconv and the put sequence is not empty. │ │ │ │ +843 // In that case, determining the position requires converting the │ │ │ │ +844 // put sequence. That doesn't use ext_buf, so requires a flush. │ │ │ │ +845 bool _____n_o___m_o_v_e_m_e_n_t = _____w_a_y == _i_o_s___b_a_s_e_:_:_c_u_r && _____o_f_f == 0 │ │ │ │ +846 && (!_M_writing || _M_codecvt->always_noconv()); │ │ │ │ +847 │ │ │ │ +848 // Ditch any pback buffers to avoid confusion. │ │ │ │ +849 if (!_____n_o___m_o_v_e_m_e_n_t) │ │ │ │ +850 _M_destroy_pback(); │ │ │ │ +851 │ │ │ │ +852 // Correct state at destination. Note that this is the correct │ │ │ │ +853 // state for the current position during output, because │ │ │ │ +854 // codecvt::unshift() returns the state to the initial state. │ │ │ │ +855 // This is also the correct state at the end of the file because │ │ │ │ +856 // an unshift sequence should have been written at the end. │ │ │ │ +857 __state_type _____s_t_a_t_e = _M_state_beg; │ │ │ │ +858 off_type _____c_o_m_p_u_t_e_d___o_f_f = _____o_f_f * __width; │ │ │ │ +859 if (_M_reading && _____w_a_y == _i_o_s___b_a_s_e_:_:_c_u_r) │ │ │ │ +860 { │ │ │ │ +861 _____s_t_a_t_e = _M_state_last; │ │ │ │ +862 _____c_o_m_p_u_t_e_d___o_f_f += _M_get_ext_pos(_____s_t_a_t_e); │ │ │ │ +863 } │ │ │ │ +864 if (!_____n_o___m_o_v_e_m_e_n_t) │ │ │ │ +865 _____r_e_t = _M_seek(_____c_o_m_p_u_t_e_d___o_f_f, _____w_a_y, _____s_t_a_t_e); │ │ │ │ +866 else │ │ │ │ +867 { │ │ │ │ +868 if (_M_writing) │ │ │ │ +869 _____c_o_m_p_u_t_e_d___o_f_f = this->pptr() - this->pbase(); │ │ │ │ +870 │ │ │ │ +871 off_type _____f_i_l_e___o_f_f = _M_file.seekoff(0, _i_o_s___b_a_s_e_:_:_c_u_r); │ │ │ │ +872 if (_____f_i_l_e___o_f_f != off_type(-1)) │ │ │ │ +873 { │ │ │ │ +874 _____r_e_t = _____f_i_l_e___o_f_f + _____c_o_m_p_u_t_e_d___o_f_f; │ │ │ │ +875 _____r_e_t.state(_____s_t_a_t_e); │ │ │ │ +876 } │ │ │ │ +877 } │ │ │ │ +878 } │ │ │ │ +879 return _____r_e_t; │ │ │ │ +880 } │ │ │ │ +881 │ │ │ │ +882 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +883 // 171. Strange seekpos() semantics due to joint position │ │ │ │ +884 // According to the resolution of DR 171, seekpos should ignore the last │ │ │ │ +885 // argument (of type openmode). │ │ │ │ +886 template │ │ │ │ +887 typename basic_filebuf<_CharT, _Traits>::pos_type │ │ │ │ +_8_8_8 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +889_ _s_e_e_k_p_o_s(pos_type _____p_o_s, ios_base::openmode) │ │ │ │ +890 { │ │ │ │ +891 pos_type _____r_e_t = pos_type(off_type(-1)); │ │ │ │ +892 if (this->is_open()) │ │ │ │ +893 { │ │ │ │ +894 // Ditch any pback buffers to avoid confusion. │ │ │ │ +895 _M_destroy_pback(); │ │ │ │ +896 _____r_e_t = _M_seek(off_type(_____p_o_s), _i_o_s___b_a_s_e_:_:_b_e_g, _____p_o_s.state()); │ │ │ │ +897 } │ │ │ │ +898 return _____r_e_t; │ │ │ │ +899 } │ │ │ │ +900 │ │ │ │ +901 template │ │ │ │ +902 typename basic_filebuf<_CharT, _Traits>::pos_type │ │ │ │ +903 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +904_ ___M___s_e_e_k(off_type _____o_f_f, ios_base::seekdir _____w_a_y, __state_type _____s_t_a_t_e) │ │ │ │ +905 { │ │ │ │ +906 pos_type _____r_e_t = pos_type(off_type(-1)); │ │ │ │ +907 if (_M_terminate_output()) │ │ │ │ +908 { │ │ │ │ +909 off_type _____f_i_l_e___o_f_f = _M_file.seekoff(_____o_f_f, _____w_a_y); │ │ │ │ +910 if (_____f_i_l_e___o_f_f != off_type(-1)) │ │ │ │ +911 { │ │ │ │ +912 _M_reading = false; │ │ │ │ +913 _M_writing = false; │ │ │ │ +914 _M_ext_next = _M_ext_end = _M_ext_buf; │ │ │ │ +915 _M_set_buffer(-1); │ │ │ │ +916 _M_state_cur = _____s_t_a_t_e; │ │ │ │ +917 _____r_e_t = _____f_i_l_e___o_f_f; │ │ │ │ +918 _____r_e_t.state(_M_state_cur); │ │ │ │ +919 } │ │ │ │ +920 } │ │ │ │ +921 return __ret; │ │ │ │ +922 } │ │ │ │ +923 │ │ │ │ +924 // Returns the distance from the end of the ext buffer to the point │ │ │ │ +925 // corresponding to gptr(). This is a negative value. Updates __state │ │ │ │ +926 // from eback() correspondence to gptr(). │ │ │ │ +927 template │ │ │ │ +928 int basic_filebuf<_CharT, _Traits>:: │ │ │ │ +929 _M_get_ext_pos(__state_type& __state) │ │ │ │ +930 { │ │ │ │ +931 if (_M_codecvt->always_noconv()) │ │ │ │ +932 return this->gptr() - this->egptr(); │ │ │ │ +933 else │ │ │ │ +934 { │ │ │ │ +935 // Calculate offset from _M_ext_buf that corresponds to │ │ │ │ +936 // gptr(). Precondition: __state == _M_state_last, which │ │ │ │ +937 // corresponds to eback(). │ │ │ │ +938 const int __gptr_off = │ │ │ │ +939 _M_codecvt->length(__state, _M_ext_buf, _M_ext_next, │ │ │ │ +940 this->gptr() - this->eback()); │ │ │ │ +941 return _M_ext_buf + __gptr_off - _M_ext_end; │ │ │ │ +942 } │ │ │ │ +943 } │ │ │ │ +944 │ │ │ │ +945 template │ │ │ │ +946 bool │ │ │ │ +947 basic_filebuf<_CharT, _Traits>:: │ │ │ │ +948 _M_terminate_output() │ │ │ │ +949 { │ │ │ │ +950 // Part one: update the output sequence. │ │ │ │ +951 bool __testvalid = true; │ │ │ │ +952 if (this->pbase() < this->pptr()) │ │ │ │ +953 { │ │ │ │ +954 const int_type __tmp = this->overflow(); │ │ │ │ +955 if (traits_type::eq_int_type(__tmp, traits_type::eof())) │ │ │ │ +956 __testvalid = false; │ │ │ │ +957 } │ │ │ │ +958 │ │ │ │ +959 // Part two: output unshift sequence. │ │ │ │ +960 if (_M_writing && !__check_facet(_M_codecvt).always_noconv() │ │ │ │ +961 && __testvalid) │ │ │ │ +962 { │ │ │ │ +963 // Note: this value is arbitrary, since there is no way to │ │ │ │ +964 // get the length of the unshift sequence from codecvt, │ │ │ │ +965 // without calling unshift. │ │ │ │ +966 const size_t __blen = 128; │ │ │ │ +967 char __buf[__blen]; │ │ │ │ +968 codecvt_base::result __r; │ │ │ │ +969 _s_t_r_e_a_m_s_i_z_e __ilen = 0; │ │ │ │ +970 │ │ │ │ +971 do │ │ │ │ +972 { │ │ │ │ +973 char* __next; │ │ │ │ +974 __r = _M_codecvt->unshift(_M_state_cur, __buf, │ │ │ │ +975 __buf + __blen, __next); │ │ │ │ +976 if (__r == codecvt_base::error) │ │ │ │ +977 __testvalid = false; │ │ │ │ +978 else if (__r == codecvt_base::ok || │ │ │ │ +979 __r == codecvt_base::partial) │ │ │ │ +980 { │ │ │ │ +981 __ilen = __next - __buf; │ │ │ │ +982 if (__ilen > 0) │ │ │ │ +983 { │ │ │ │ +984 const _s_t_r_e_a_m_s_i_z_e __elen = _M_file.xsputn(__buf, __ilen); │ │ │ │ +985 if (__elen != __ilen) │ │ │ │ +986 __testvalid = false; │ │ │ │ +987 } │ │ │ │ +988 } │ │ │ │ +989 } │ │ │ │ +990 while (__r == codecvt_base::partial && __ilen > 0 && __testvalid); │ │ │ │ +991 │ │ │ │ +992 if (__testvalid) │ │ │ │ +993 { │ │ │ │ +994 // This second call to overflow() is required by the standard, │ │ │ │ +995 // but it's not clear why it's needed, since the output buffer │ │ │ │ +996 // should be empty by this point (it should have been emptied │ │ │ │ +997 // in the first call to overflow()). │ │ │ │ +998 const int_type __tmp = this->overflow(); │ │ │ │ +999 if (traits_type::eq_int_type(__tmp, traits_type::eof())) │ │ │ │ +1000 __testvalid = false; │ │ │ │ +1001 } │ │ │ │ +1002 } │ │ │ │ +1003 return __testvalid; │ │ │ │ +1004 } │ │ │ │ +1005 │ │ │ │ +1006 template │ │ │ │ +1007 int │ │ │ │ +_1_0_0_8 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +1009_ _s_y_n_c() │ │ │ │ +1010 { │ │ │ │ +1011 // Make sure that the internal buffer resyncs its idea of │ │ │ │ +1012 // the file position with the external file. │ │ │ │ +1013 int _____r_e_t = 0; │ │ │ │ +1014 if (this->pbase() < this->pptr()) │ │ │ │ +1015 { │ │ │ │ +1016 const int_type _____t_m_p = this->overflow(); │ │ │ │ +1017 if (traits_type::eq_int_type(_____t_m_p, traits_type::eof())) │ │ │ │ +1018 _____r_e_t = -1; │ │ │ │ +1019 } │ │ │ │ +1020 return _____r_e_t; │ │ │ │ +1021 } │ │ │ │ +1022 │ │ │ │ +1023 template │ │ │ │ +1024 void │ │ │ │ +_1_0_2_5 _b_a_s_i_c___f_i_l_e_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_>_:_: │ │ │ │ +1026_ _i_m_b_u_e(const _l_o_c_a_l_e& _____l_o_c) │ │ │ │ +1027 { │ │ │ │ +1028 bool _____t_e_s_t_v_a_l_i_d = true; │ │ │ │ +1029 │ │ │ │ +1030 const _____c_o_d_e_c_v_t___t_y_p_e* const ___M___c_o_d_e_c_v_t___t_m_p │ │ │ │ +1031 = _____t_r_y___u_s_e___f_a_c_e_t_<_____c_o_d_e_c_v_t___t_y_p_e_>(_____l_o_c); │ │ │ │ +1032 │ │ │ │ +1033 if (this->is_open()) │ │ │ │ +1034 { │ │ │ │ +1035 // encoding() == -1 is ok only at the beginning. │ │ │ │ +1036 if ((_M_reading || _M_writing) │ │ │ │ +1037 && __check_facet(_M_codecvt).encoding() == -1) │ │ │ │ +1038 _____t_e_s_t_v_a_l_i_d = false; │ │ │ │ +1039 else │ │ │ │ +1040 { │ │ │ │ +1041 if (_M_reading) │ │ │ │ +1042 { │ │ │ │ +1043 if (__check_facet(_M_codecvt).always_noconv()) │ │ │ │ +1044 { │ │ │ │ +1045 if (___M___c_o_d_e_c_v_t___t_m_p │ │ │ │ +1046 && !__check_facet(___M___c_o_d_e_c_v_t___t_m_p).always_noconv()) │ │ │ │ +1047 _____t_e_s_t_v_a_l_i_d = this->seekoff(0, _i_o_s___b_a_s_e_:_:_c_u_r, _M_mode) │ │ │ │ +1048 != pos_type(off_type(-1)); │ │ │ │ +1049 } │ │ │ │ +1050 else │ │ │ │ +1051 { │ │ │ │ +1052 // External position corresponding to gptr(). │ │ │ │ +1053 _M_ext_next = _M_ext_buf │ │ │ │ +1054 + _M_codecvt->length(_M_state_last, _M_ext_buf, │ │ │ │ +1055 _M_ext_next, │ │ │ │ +1056 this->gptr() - this->eback()); │ │ │ │ +1057 const _s_t_r_e_a_m_s_i_z_e _____r_e_m_a_i_n_d_e_r = _M_ext_end - _M_ext_next; │ │ │ │ +1058 if (_____r_e_m_a_i_n_d_e_r) │ │ │ │ +1059 _____b_u_i_l_t_i_n___m_e_m_m_o_v_e(_M_ext_buf, _M_ext_next, _____r_e_m_a_i_n_d_e_r); │ │ │ │ +1060 │ │ │ │ +1061 _M_ext_next = _M_ext_buf; │ │ │ │ +1062 _M_ext_end = _M_ext_buf + _____r_e_m_a_i_n_d_e_r; │ │ │ │ +1063 _M_set_buffer(-1); │ │ │ │ +1064 _M_state_last = _M_state_cur = _M_state_beg; │ │ │ │ +1065 } │ │ │ │ +1066 } │ │ │ │ +1067 else if (_M_writing && (_____t_e_s_t_v_a_l_i_d = _M_terminate_output())) │ │ │ │ +1068 _M_set_buffer(-1); │ │ │ │ +1069 } │ │ │ │ +1070 } │ │ │ │ +1071 │ │ │ │ +1072 if (_____t_e_s_t_v_a_l_i_d) │ │ │ │ +1073 _M_codecvt = ___M___c_o_d_e_c_v_t___t_m_p; │ │ │ │ +1074 else │ │ │ │ +1075 _M_codecvt = 0; │ │ │ │ +1076 } │ │ │ │ +1077 │ │ │ │ +1078 // Inhibit implicit instantiations for required instantiations, │ │ │ │ +1079 // which are defined via explicit instantiations elsewhere. │ │ │ │ +1080#if _GLIBCXX_EXTERN_TEMPLATE │ │ │ │ +1081 extern template class _b_a_s_i_c___f_i_l_e_b_u_f_<_c_h_a_r_>; │ │ │ │ +1082 extern template class _b_a_s_i_c___i_f_s_t_r_e_a_m_<_c_h_a_r_>; │ │ │ │ +1083 extern template class _b_a_s_i_c___o_f_s_t_r_e_a_m_<_c_h_a_r_>; │ │ │ │ +1084 extern template class _b_a_s_i_c___f_s_t_r_e_a_m_<_c_h_a_r_>; │ │ │ │ +1085 │ │ │ │ +1086#ifdef _GLIBCXX_USE_WCHAR_T │ │ │ │ +1087 extern template class _b_a_s_i_c___f_i_l_e_b_u_f_<_w_c_h_a_r___t_>; │ │ │ │ +1088 extern template class _b_a_s_i_c___i_f_s_t_r_e_a_m_<_w_c_h_a_r___t_>; │ │ │ │ +1089 extern template class _b_a_s_i_c___o_f_s_t_r_e_a_m_<_w_c_h_a_r___t_>; │ │ │ │ +1090 extern template class _b_a_s_i_c___f_s_t_r_e_a_m_<_w_c_h_a_r___t_>; │ │ │ │ +1091#endif │ │ │ │ +1092#endif │ │ │ │ +1093 │ │ │ │ +1094_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +1095} // namespace std │ │ │ │ +1096 │ │ │ │ +1097#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_:_9_7 │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ +void swap(any &__x, any &__y) noexcept │ │ │ │ +Exchange the states of two any objects. │ │ │ │ +DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ _s_t_d_:_:_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_3 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ _s_t_d_:_:_s_t_r_e_a_m_s_i_z_e │ │ │ │ ptrdiff_t streamsize │ │ │ │ Integral type for I/O operation counts and buffer sizes. │ │ │ │ DDeeffiinniittiioonn _p_o_s_t_y_p_e_s_._h_:_6_8 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_i_n_t___t_y_p_e │ │ │ │ -traits_type::int_type int_type │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_1_3_5 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_x_s_p_u_t_n │ │ │ │ -virtual streamsize xsputn(const char_type *__s, streamsize __n) │ │ │ │ -Multiple character insertion. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_._t_c_c_:_8_0 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_c_h_a_r___t_y_p_e │ │ │ │ -_CharT char_type │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f_:_1_3_3 │ │ │ │ -_s_t_d_:_:_b_a_s_i_c___s_t_r_e_a_m_b_u_f_:_:_x_s_g_e_t_n │ │ │ │ +_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_8 │ │ │ │ +_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_2_9 │ │ │ │ +_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_3 │ │ │ │ +_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_7 │ │ │ │ +_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_2_6 │ │ │ │ +_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 _s_t_r_e_a_m_b_u_f_._t_c_c_:_4_6 │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_6_6_9 │ │ │ │ +_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_4_9 │ │ │ │ +_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_8_9 │ │ │ │ +_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_2 │ │ │ │ +_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_5 │ │ │ │ +_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_1 │ │ │ │ +_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_7_9 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_b_a_s_i_c___f_i_l_e_b_u_f │ │ │ │ +basic_filebuf() │ │ │ │ +Does not open any files. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_8_1 │ │ │ │ +_s_t_d_:_:_b_a_s_i_c___f_i_l_e_b_u_f_:_:_s_y_n_c │ │ │ │ +virtual int sync() │ │ │ │ +Synchronizes the buffer arrays with the controlled sequences. │ │ │ │ +DDeeffiinniittiioonn _f_s_t_r_e_a_m_._t_c_c_:_1_0_0_9 │ │ │ │ +_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_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_ _> │ │ │ │ +_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_9 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e │ │ │ │ +The base of the I/O class hierarchy. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_2_3_4 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_c_u_r │ │ │ │ +static const seekdir cur │ │ │ │ +Request a seek relative to the current position within the sequence. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_9_8 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_b_e_g │ │ │ │ +static const seekdir beg │ │ │ │ +Request a seek relative to the beginning of the stream. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_9_5 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_e_n_d │ │ │ │ +static const seekdir end │ │ │ │ +Request a seek relative to the current end of the sequence. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_5_0_1 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_i_n │ │ │ │ +static const openmode in │ │ │ │ +Open for input. Default for ifstream and fstream. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_6_6 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_o_u_t │ │ │ │ +static const openmode out │ │ │ │ +Open for output. Default for ofstream and fstream. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_6_9 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_b_i_n_a_r_y │ │ │ │ +static const openmode binary │ │ │ │ +Perform input and output in binary mode (as opposed to text mode). This is │ │ │ │ +probably not what you thin... │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_6_3 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_o_p_e_n_m_o_d_e │ │ │ │ +_Ios_Openmode openmode │ │ │ │ +This is a bitmask type. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_5_2 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_a_p_p │ │ │ │ +static const openmode app │ │ │ │ +Seek to end before each write. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_5_5 │ │ │ │ +_s_t_d_:_:_i_o_s___b_a_s_e_:_:_a_t_e │ │ │ │ +static const openmode ate │ │ │ │ +Open and seek to end immediately after opening. │ │ │ │ +DDeeffiinniittiioonn _i_o_s___b_a_s_e_._h_:_4_5_8 │ │ │ │ +_s_t_d_:_:_l_o_c_a_l_e │ │ │ │ +Container class for localization functionality. │ │ │ │ +DDeeffiinniittiioonn _l_o_c_a_l_e___c_l_a_s_s_e_s_._h_:_6_3 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_e_a_m_b_u_f_._t_c_c │ │ │ │ + * _f_s_t_r_e_a_m_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00380.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: streambuf_iterator.h File Reference │ │ │ +libstdc++: atomic_lockfree_defines.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,70 +46,52 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00380.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
streambuf_iterator.h File Reference
│ │ │ +Macros
│ │ │ +
atomic_lockfree_defines.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Classes

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

│ │ │ -Namespaces

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

│ │ │ -Functions

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

│ │ │ +Macros

#define 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 <iterator>.

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file streambuf_iterator.h.

│ │ │ +

Definition in file atomic_lockfree_defines.h.

│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,62 +1,32 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -streambuf_iterator.h File Reference │ │ │ │ +_M_a_c_r_o_s │ │ │ │ +atomic_lockfree_defines.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<_ ___C_h_a_r_T_,_ ___T_r_a_i_t_s_ _> │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _A_T_O_M_I_C___B_O_O_L___L_O_C_K___F_R_E_E │ │ │ │   │ │ │ │ -class   _s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<_ ___C_h_a_r_T_,_ ___T_r_a_i_t_s_ _> │ │ │ │ +#define  _A_T_O_M_I_C___C_H_A_R_1_6___T___L_O_C_K___F_R_E_E │ │ │ │   │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _s_t_d │ │ │ │ +#define  _A_T_O_M_I_C___C_H_A_R_3_2___T___L_O_C_K___F_R_E_E │ │ │ │   │ │ │ │ -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<_t_y_p_e_n_a_m_e _CharT , _t_y_p_e_n_a_m_e _Size > │ │ │ │ - __gnu_cxx::__enable_if< __is_char< _s_t_d_:_:_____c_o_p_y___n___a (_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< │ │ │ │ - _CharT >::__value, _CharT * >::__type  _CharT > _____i_t, _Size __n, _CharT │ │ │ │ - *__result, bool _____s_t_r_i_c_t) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _CharT , _t_y_p_e_n_a_m_e ___D_i_s_t_a_n_c_e > │ │ │ │ - __gnu_cxx::__enable_if< __is_char< _s_t_d_:_:_a_d_v_a_n_c_e (_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< │ │ │ │ - _CharT >::__value, _v_o_i_d >::__type  _CharT > &__i, ___D_i_s_t_a_n_c_e __n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _CharT > │ │ │ │ - __gnu_cxx::__enable_if< __is_char< _s_t_d_:_:_c_o_p_y (_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT │ │ │ │ -_CharT >::__value, _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< > __first, _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT │ │ │ │ - _CharT > >::__type  > __last, _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT > │ │ │ │ - __result) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _CharT > │ │ │ │ - __gnu_cxx::__enable_if< __is_char< _s_t_d_:_:_f_i_n_d (_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT │ │ │ │ -_CharT >::__value, _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< > __first, _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT │ │ │ │ - _CharT > >::__type  > __last, const _CharT &__val) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _CharT , _t_y_p_e_n_a_m_e _Traits > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const │ │ │ │ - _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< _CharT, _Traits > │ │ │ │ - &__a, const _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r< │ │ │ │ - _CharT, _Traits > &__b) │ │ │ │ +#define  _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 _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 _a_t_o_m_i_c___l_o_c_k_f_r_e_e___d_e_f_i_n_e_s_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_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.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00380_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: streambuf_iterator.h Source File │ │ │ +libstdc++: atomic_lockfree_defines.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
streambuf_iterator.h
│ │ │ +
atomic_lockfree_defines.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Streambuf iterators
│ │ │ +Go to the documentation of this file.
1// -*- C++ -*- header.
│ │ │
2
│ │ │ -
3// Copyright (C) 1997-2023 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2008-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,582 +72,60 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/streambuf_iterator.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{iterator}
│ │ │ +
27 * Do not attempt to use it directly. @headername{atomic}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _STREAMBUF_ITERATOR_H
│ │ │ -
31#define _STREAMBUF_ITERATOR_H 1
│ │ │ +
30#ifndef _GLIBCXX_ATOMIC_LOCK_FREE_H
│ │ │ +
31#define _GLIBCXX_ATOMIC_LOCK_FREE_H 1
│ │ │
32
│ │ │
33#pragma GCC system_header
│ │ │ -
34
│ │ │ -
35#include <streambuf>
│ │ │ - │ │ │ -
37#include <debug/debug.h>
│ │ │ -
38
│ │ │ -
39namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
40{
│ │ │ -
41_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
42
│ │ │ -
43 /**
│ │ │ -
44 * @addtogroup iterators
│ │ │ -
45 * @{
│ │ │ -
46 */
│ │ │ +
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// Ignore warnings about std::iterator.
│ │ │ -
49#pragma GCC diagnostic push
│ │ │ -
50#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ -
51 // 24.5.3 Template class istreambuf_iterator
│ │ │ -
52 /// Provides input iterator semantics for streambufs.
│ │ │ -
53 template<typename _CharT, typename _Traits>
│ │ │ -
│ │ │ - │ │ │ -
55 : public iterator<input_iterator_tag, _CharT, typename _Traits::off_type,
│ │ │ -
56 _CharT*, _CharT>
│ │ │ -
57 {
│ │ │ -
58 public:
│ │ │ -
59 // Types:
│ │ │ -
60 ///@{
│ │ │ -
61 /// Public typedefs
│ │ │ -
62#if __cplusplus < 201103L
│ │ │ -
63 typedef _CharT& reference; // Changed to _CharT by LWG 445
│ │ │ -
64#elif __cplusplus > 201703L
│ │ │ -
65 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
66 // 3188. istreambuf_iterator::pointer should not be unspecified
│ │ │ -
67 using pointer = void;
│ │ │ -
68#endif
│ │ │ -
69
│ │ │ -
70 typedef _CharT char_type;
│ │ │ -
71 typedef _Traits traits_type;
│ │ │ -
72 typedef typename _Traits::int_type int_type;
│ │ │ - │ │ │ - │ │ │ -
75 ///@}
│ │ │ -
76
│ │ │ -
77 template<typename _CharT2>
│ │ │ -
78 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
82
│ │ │ -
83 template<bool _IsMove, typename _CharT2>
│ │ │ -
84 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ -
85 _CharT2*>::__type
│ │ │ -
86 __copy_move_a2(istreambuf_iterator<_CharT2>,
│ │ │ - │ │ │ -
88
│ │ │ -
89 template<typename _CharT2, typename _Size>
│ │ │ -
90 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ -
91 _CharT2*>::__type
│ │ │ -
92 __copy_n_a(istreambuf_iterator<_CharT2>, _Size, _CharT2*, bool);
│ │ │ -
93
│ │ │ -
94 template<typename _CharT2>
│ │ │ -
95 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ - │ │ │ - │ │ │ -
98 const _CharT2&);
│ │ │ -
99
│ │ │ -
100 template<typename _CharT2, typename _Distance>
│ │ │ -
101 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ -
102 void>::__type
│ │ │ - │ │ │ -
104
│ │ │ -
105 private:
│ │ │ -
106 // 24.5.3 istreambuf_iterator
│ │ │ -
107 // p 1
│ │ │ -
108 // If the end of stream is reached (streambuf_type::sgetc()
│ │ │ -
109 // returns traits_type::eof()), the iterator becomes equal to
│ │ │ -
110 // the "end of stream" iterator value.
│ │ │ -
111 // NB: This implementation assumes the "end of stream" value
│ │ │ -
112 // is EOF, or -1.
│ │ │ -
113 mutable streambuf_type* _M_sbuf;
│ │ │ -
114 int_type _M_c;
│ │ │ -
115
│ │ │ -
116 public:
│ │ │ -
117 /// Construct end of input stream iterator.
│ │ │ -
│ │ │ - │ │ │ -
119 : _M_sbuf(0), _M_c(traits_type::eof()) { }
│ │ │ -
│ │ │ -
120
│ │ │ -
121#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ -
122 constexpr istreambuf_iterator(default_sentinel_t) noexcept
│ │ │ -
123 : istreambuf_iterator() { }
│ │ │ -
124#endif
│ │ │ -
125
│ │ │ -
126#if __cplusplus >= 201103L
│ │ │ -
127 istreambuf_iterator(const istreambuf_iterator&) noexcept = default;
│ │ │ -
128
│ │ │ -
129 ~istreambuf_iterator() = default;
│ │ │ -
130#endif
│ │ │ -
131
│ │ │ -
132 /// Construct start of input stream iterator.
│ │ │ -
│ │ │ - │ │ │ -
134 : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { }
│ │ │ -
│ │ │ -
135
│ │ │ -
136 /// Construct start of streambuf iterator.
│ │ │ -
│ │ │ - │ │ │ -
138 : _M_sbuf(__s), _M_c(traits_type::eof()) { }
│ │ │ -
│ │ │ -
139
│ │ │ -
140#if __cplusplus >= 201103L
│ │ │ - │ │ │ -
142 operator=(const istreambuf_iterator&) noexcept = default;
│ │ │ -
143#endif
│ │ │ -
144
│ │ │ -
145 /// Return the current character pointed to by iterator. This returns
│ │ │ -
146 /// streambuf.sgetc(). It cannot be assigned. NB: The result of
│ │ │ -
147 /// operator*() on an end of stream is undefined.
│ │ │ -
148 _GLIBCXX_NODISCARD
│ │ │ - │ │ │ -
│ │ │ -
150 operator*() const
│ │ │ -
151 {
│ │ │ -
152 int_type __c = _M_get();
│ │ │ -
153
│ │ │ -
154#ifdef _GLIBCXX_DEBUG_PEDANTIC
│ │ │ -
155 // Dereferencing a past-the-end istreambuf_iterator is a
│ │ │ -
156 // libstdc++ extension
│ │ │ -
157 __glibcxx_requires_cond(!_S_is_eof(__c),
│ │ │ -
158 _M_message(__gnu_debug::__msg_deref_istreambuf)
│ │ │ -
159 ._M_iterator(*this));
│ │ │ -
160#endif
│ │ │ -
161 return traits_type::to_char_type(__c);
│ │ │ -
162 }
│ │ │ -
│ │ │ -
163
│ │ │ -
164 /// Advance the iterator. Calls streambuf.sbumpc().
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
167 {
│ │ │ -
168 __glibcxx_requires_cond(_M_sbuf &&
│ │ │ -
169 (!_S_is_eof(_M_c) || !_S_is_eof(_M_sbuf->sgetc())),
│ │ │ -
170 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
171 ._M_iterator(*this));
│ │ │ -
172
│ │ │ -
173 _M_sbuf->sbumpc();
│ │ │ -
174 _M_c = traits_type::eof();
│ │ │ -
175 return *this;
│ │ │ -
176 }
│ │ │ -
│ │ │ -
177
│ │ │ -
178 /// Advance the iterator. Calls streambuf.sbumpc().
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
181 {
│ │ │ -
182 __glibcxx_requires_cond(_M_sbuf &&
│ │ │ -
183 (!_S_is_eof(_M_c) || !_S_is_eof(_M_sbuf->sgetc())),
│ │ │ -
184 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
185 ._M_iterator(*this));
│ │ │ -
186
│ │ │ - │ │ │ -
188 __old._M_c = _M_sbuf->sbumpc();
│ │ │ -
189 _M_c = traits_type::eof();
│ │ │ -
190 return __old;
│ │ │ -
191 }
│ │ │ -
│ │ │ -
192
│ │ │ -
193 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
194 // 110 istreambuf_iterator::equal not const
│ │ │ -
195 // NB: there is also number 111 (NAD) relevant to this function.
│ │ │ -
196 /// Return true both iterators are end or both are not end.
│ │ │ -
197 _GLIBCXX_NODISCARD
│ │ │ -
198 bool
│ │ │ -
│ │ │ -
199 equal(const istreambuf_iterator& __b) const
│ │ │ -
200 { return _M_at_eof() == __b._M_at_eof(); }
│ │ │ -
│ │ │ -
201
│ │ │ -
202 private:
│ │ │ - │ │ │ -
204 _M_get() const
│ │ │ -
205 {
│ │ │ -
206 int_type __ret = _M_c;
│ │ │ -
207 if (_M_sbuf && _S_is_eof(__ret) && _S_is_eof(__ret = _M_sbuf->sgetc()))
│ │ │ -
208 _M_sbuf = 0;
│ │ │ -
209 return __ret;
│ │ │ -
210 }
│ │ │ -
211
│ │ │ -
212 bool
│ │ │ -
213 _M_at_eof() const
│ │ │ -
214 { return _S_is_eof(_M_get()); }
│ │ │ -
215
│ │ │ -
216 static bool
│ │ │ -
217 _S_is_eof(int_type __c)
│ │ │ -
218 {
│ │ │ -
219 const int_type __eof = traits_type::eof();
│ │ │ -
220 return traits_type::eq_int_type(__c, __eof);
│ │ │ -
221 }
│ │ │ -
222
│ │ │ -
223#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ -
224 [[nodiscard]]
│ │ │ -
225 friend bool
│ │ │ -
226 operator==(const istreambuf_iterator& __i, default_sentinel_t)
│ │ │ -
227 { return __i._M_at_eof(); }
│ │ │ -
228#endif
│ │ │ -
229 };
│ │ │ -
│ │ │ -
230
│ │ │ -
231 template<typename _CharT, typename _Traits>
│ │ │ -
232 _GLIBCXX_NODISCARD
│ │ │ -
233 inline bool
│ │ │ -
234 operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
│ │ │ -
235 const istreambuf_iterator<_CharT, _Traits>& __b)
│ │ │ -
236 { return __a.equal(__b); }
│ │ │ -
237
│ │ │ -
238#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
239 template<typename _CharT, typename _Traits>
│ │ │ -
240 _GLIBCXX_NODISCARD
│ │ │ -
241 inline bool
│ │ │ -
242 operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
│ │ │ -
243 const istreambuf_iterator<_CharT, _Traits>& __b)
│ │ │ -
244 { return !__a.equal(__b); }
│ │ │ -
245#endif
│ │ │ -
246
│ │ │ -
247 /// Provides output iterator semantics for streambufs.
│ │ │ -
248 template<typename _CharT, typename _Traits>
│ │ │ -
│ │ │ - │ │ │ -
250 : public iterator<output_iterator_tag, void, void, void, void>
│ │ │ -
251 {
│ │ │ -
252 public:
│ │ │ -
253 // Types:
│ │ │ -
254 ///@{
│ │ │ -
255 /// Public typedefs
│ │ │ -
256#if __cplusplus > 201703L
│ │ │ -
257 using difference_type = ptrdiff_t;
│ │ │ -
258#endif
│ │ │ -
259 typedef _CharT char_type;
│ │ │ -
260 typedef _Traits traits_type;
│ │ │ - │ │ │ - │ │ │ -
263 ///@}
│ │ │ -
264
│ │ │ -
265 template<typename _CharT2>
│ │ │ -
266 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value,
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
270
│ │ │ -
271 private:
│ │ │ -
272 streambuf_type* _M_sbuf;
│ │ │ -
273 bool _M_failed;
│ │ │ -
274
│ │ │ -
275 public:
│ │ │ -
276
│ │ │ -
277#if __cplusplus > 201703L
│ │ │ -
278 constexpr
│ │ │ -
279 ostreambuf_iterator() noexcept
│ │ │ -
280 : _M_sbuf(nullptr), _M_failed(true) { }
│ │ │ -
281#endif
│ │ │ -
282
│ │ │ -
283 /// Construct output iterator from ostream.
│ │ │ -
│ │ │ - │ │ │ -
285 : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { }
│ │ │ -
│ │ │ -
286
│ │ │ -
287 /// Construct output iterator from streambuf.
│ │ │ -
│ │ │ - │ │ │ -
289 : _M_sbuf(__s), _M_failed(!_M_sbuf) { }
│ │ │ -
│ │ │ -
290
│ │ │ -
291 /// Write character to streambuf. Calls streambuf.sputc().
│ │ │ - │ │ │ -
│ │ │ -
293 operator=(_CharT __c)
│ │ │ -
294 {
│ │ │ -
295 if (!_M_failed &&
│ │ │ -
296 _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof()))
│ │ │ -
297 _M_failed = true;
│ │ │ -
298 return *this;
│ │ │ -
299 }
│ │ │ -
│ │ │ -
300
│ │ │ -
301 /// Return *this.
│ │ │ -
302 _GLIBCXX_NODISCARD
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
305 { return *this; }
│ │ │ -
│ │ │ -
306
│ │ │ -
307 /// Return *this.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
310 { return *this; }
│ │ │ -
│ │ │ -
311
│ │ │ -
312 /// Return *this.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
315 { return *this; }
│ │ │ -
│ │ │ -
316
│ │ │ -
317 /// Return true if previous operator=() failed.
│ │ │ -
318 _GLIBCXX_NODISCARD
│ │ │ -
319 bool
│ │ │ -
│ │ │ - │ │ │ -
321 { return _M_failed; }
│ │ │ -
│ │ │ -
322
│ │ │ - │ │ │ -
324 _M_put(const _CharT* __ws, streamsize __len)
│ │ │ -
325 {
│ │ │ -
326 if (__builtin_expect(!_M_failed, true)
│ │ │ -
327 && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len,
│ │ │ -
328 false))
│ │ │ -
329 _M_failed = true;
│ │ │ -
330 return *this;
│ │ │ -
331 }
│ │ │ -
332 };
│ │ │ -
│ │ │ -
333#pragma GCC diagnostic pop
│ │ │ -
334
│ │ │ -
335 // Overloads for streambuf iterators.
│ │ │ -
336 template<typename _CharT>
│ │ │ -
337 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
338 ostreambuf_iterator<_CharT> >::__type
│ │ │ -
339 copy(istreambuf_iterator<_CharT> __first,
│ │ │ -
340 istreambuf_iterator<_CharT> __last,
│ │ │ -
341 ostreambuf_iterator<_CharT> __result)
│ │ │ -
342 {
│ │ │ -
343 if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed)
│ │ │ -
344 {
│ │ │ -
345 bool __ineof;
│ │ │ -
346 __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof);
│ │ │ -
347 if (!__ineof)
│ │ │ -
348 __result._M_failed = true;
│ │ │ -
349 }
│ │ │ -
350 return __result;
│ │ │ -
351 }
│ │ │ -
352
│ │ │ -
353 template<bool _IsMove, typename _CharT>
│ │ │ -
354 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
355 ostreambuf_iterator<_CharT> >::__type
│ │ │ -
356 __copy_move_a2(_CharT* __first, _CharT* __last,
│ │ │ -
357 ostreambuf_iterator<_CharT> __result)
│ │ │ -
358 {
│ │ │ -
359 const streamsize __num = __last - __first;
│ │ │ -
360 if (__num > 0)
│ │ │ -
361 __result._M_put(__first, __num);
│ │ │ -
362 return __result;
│ │ │ -
363 }
│ │ │ -
364
│ │ │ -
365 template<bool _IsMove, typename _CharT>
│ │ │ -
366 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
367 ostreambuf_iterator<_CharT> >::__type
│ │ │ -
368 __copy_move_a2(const _CharT* __first, const _CharT* __last,
│ │ │ -
369 ostreambuf_iterator<_CharT> __result)
│ │ │ -
370 {
│ │ │ -
371 const streamsize __num = __last - __first;
│ │ │ -
372 if (__num > 0)
│ │ │ -
373 __result._M_put(__first, __num);
│ │ │ -
374 return __result;
│ │ │ -
375 }
│ │ │ -
376
│ │ │ -
377 template<bool _IsMove, typename _CharT>
│ │ │ -
378 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
379 _CharT*>::__type
│ │ │ -
380 __copy_move_a2(istreambuf_iterator<_CharT> __first,
│ │ │ -
381 istreambuf_iterator<_CharT> __last, _CharT* __result)
│ │ │ -
382 {
│ │ │ -
383 typedef istreambuf_iterator<_CharT> __is_iterator_type;
│ │ │ -
384 typedef typename __is_iterator_type::traits_type traits_type;
│ │ │ -
385 typedef typename __is_iterator_type::streambuf_type streambuf_type;
│ │ │ -
386 typedef typename traits_type::int_type int_type;
│ │ │ -
387
│ │ │ -
388 if (__first._M_sbuf && !__last._M_sbuf)
│ │ │ -
389 {
│ │ │ -
390 streambuf_type* __sb = __first._M_sbuf;
│ │ │ -
391 int_type __c = __sb->sgetc();
│ │ │ -
392 while (!traits_type::eq_int_type(__c, traits_type::eof()))
│ │ │ -
393 {
│ │ │ -
394 const streamsize __n = __sb->egptr() - __sb->gptr();
│ │ │ -
395 if (__n > 1)
│ │ │ -
396 {
│ │ │ -
397 traits_type::copy(__result, __sb->gptr(), __n);
│ │ │ -
398 __sb->__safe_gbump(__n);
│ │ │ -
399 __result += __n;
│ │ │ -
400 __c = __sb->underflow();
│ │ │ -
401 }
│ │ │ -
402 else
│ │ │ -
403 {
│ │ │ -
404 *__result++ = traits_type::to_char_type(__c);
│ │ │ -
405 __c = __sb->snextc();
│ │ │ -
406 }
│ │ │ -
407 }
│ │ │ -
408 }
│ │ │ -
409 return __result;
│ │ │ -
410 }
│ │ │ -
411
│ │ │ -
412 template<typename _CharT, typename _Size>
│ │ │ -
413 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
414 _CharT*>::__type
│ │ │ -
415 __copy_n_a(istreambuf_iterator<_CharT> __it, _Size __n, _CharT* __result,
│ │ │ -
416 bool __strict __attribute__((__unused__)))
│ │ │ -
417 {
│ │ │ -
418 if (__n == 0)
│ │ │ -
419 return __result;
│ │ │ -
420
│ │ │ -
421 __glibcxx_requires_cond(__it._M_sbuf,
│ │ │ -
422 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
423 ._M_iterator(__it));
│ │ │ -
424 _CharT* __beg = __result;
│ │ │ -
425 __result += __it._M_sbuf->sgetn(__beg, __n);
│ │ │ -
426 __glibcxx_requires_cond(!__strict || __result - __beg == __n,
│ │ │ -
427 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
428 ._M_iterator(__it));
│ │ │ -
429 return __result;
│ │ │ -
430 }
│ │ │ -
431
│ │ │ -
432 template<typename _CharT>
│ │ │ -
433 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
434 istreambuf_iterator<_CharT> >::__type
│ │ │ -
435 find(istreambuf_iterator<_CharT> __first,
│ │ │ -
436 istreambuf_iterator<_CharT> __last, const _CharT& __val)
│ │ │ -
437 {
│ │ │ -
438 typedef istreambuf_iterator<_CharT> __is_iterator_type;
│ │ │ -
439 typedef typename __is_iterator_type::traits_type traits_type;
│ │ │ -
440 typedef typename __is_iterator_type::streambuf_type streambuf_type;
│ │ │ -
441 typedef typename traits_type::int_type int_type;
│ │ │ -
442 const int_type __eof = traits_type::eof();
│ │ │ -
443
│ │ │ -
444 if (__first._M_sbuf && !__last._M_sbuf)
│ │ │ -
445 {
│ │ │ -
446 const int_type __ival = traits_type::to_int_type(__val);
│ │ │ -
447 streambuf_type* __sb = __first._M_sbuf;
│ │ │ -
448 int_type __c = __sb->sgetc();
│ │ │ -
449 while (!traits_type::eq_int_type(__c, __eof)
│ │ │ -
450 && !traits_type::eq_int_type(__c, __ival))
│ │ │ -
451 {
│ │ │ -
452 streamsize __n = __sb->egptr() - __sb->gptr();
│ │ │ -
453 if (__n > 1)
│ │ │ -
454 {
│ │ │ -
455 const _CharT* __p = traits_type::find(__sb->gptr(),
│ │ │ -
456 __n, __val);
│ │ │ -
457 if (__p)
│ │ │ -
458 __n = __p - __sb->gptr();
│ │ │ -
459 __sb->__safe_gbump(__n);
│ │ │ -
460 __c = __sb->sgetc();
│ │ │ -
461 }
│ │ │ -
462 else
│ │ │ -
463 __c = __sb->snextc();
│ │ │ -
464 }
│ │ │ -
465
│ │ │ -
466 __first._M_c = __eof;
│ │ │ -
467 }
│ │ │ -
468
│ │ │ -
469 return __first;
│ │ │ -
470 }
│ │ │ -
471
│ │ │ -
472 template<typename _CharT, typename _Distance>
│ │ │ -
473 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value,
│ │ │ -
474 void>::__type
│ │ │ -
475 advance(istreambuf_iterator<_CharT>& __i, _Distance __n)
│ │ │ -
476 {
│ │ │ -
477 if (__n == 0)
│ │ │ -
478 return;
│ │ │ -
479
│ │ │ -
480 __glibcxx_assert(__n > 0);
│ │ │ -
481 __glibcxx_requires_cond(!__i._M_at_eof(),
│ │ │ -
482 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
483 ._M_iterator(__i));
│ │ │ -
484
│ │ │ -
485 typedef istreambuf_iterator<_CharT> __is_iterator_type;
│ │ │ -
486 typedef typename __is_iterator_type::traits_type traits_type;
│ │ │ -
487 typedef typename __is_iterator_type::streambuf_type streambuf_type;
│ │ │ -
488 typedef typename traits_type::int_type int_type;
│ │ │ -
489 const int_type __eof = traits_type::eof();
│ │ │ -
490
│ │ │ -
491 streambuf_type* __sb = __i._M_sbuf;
│ │ │ -
492 while (__n > 0)
│ │ │ -
493 {
│ │ │ -
494 streamsize __size = __sb->egptr() - __sb->gptr();
│ │ │ -
495 if (__size > __n)
│ │ │ -
496 {
│ │ │ -
497 __sb->__safe_gbump(__n);
│ │ │ -
498 break;
│ │ │ -
499 }
│ │ │ -
500
│ │ │ -
501 __sb->__safe_gbump(__size);
│ │ │ -
502 __n -= __size;
│ │ │ -
503 if (traits_type::eq_int_type(__sb->underflow(), __eof))
│ │ │ -
504 {
│ │ │ -
505 __glibcxx_requires_cond(__n == 0,
│ │ │ -
506 _M_message(__gnu_debug::__msg_inc_istreambuf)
│ │ │ -
507 ._M_iterator(__i));
│ │ │ -
508 break;
│ │ │ -
509 }
│ │ │ -
510 }
│ │ │ -
511
│ │ │ -
512 __i._M_c = __eof;
│ │ │ -
513 }
│ │ │ -
514
│ │ │ -
515/// @} group iterators
│ │ │ -
516
│ │ │ -
517_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
518} // namespace
│ │ │ -
519
│ │ │ -
520#endif
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
ISO C++ entities toplevel namespace is std.
│ │ │ -
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
Definition postypes.h:68
│ │ │ -
constexpr void advance(_InputIterator &__i, _Distance __n)
A generalization of pointer arithmetic.
│ │ │ -
Provides input iterator semantics for streambufs.
│ │ │ -
basic_streambuf< _CharT, _Traits > streambuf_type
Public typedefs.
│ │ │ -
constexpr istreambuf_iterator() noexcept
Construct end of input stream iterator.
│ │ │ -
basic_istream< _CharT, _Traits > istream_type
Public typedefs.
│ │ │ -
char_type operator*() const
Return the current character pointed to by iterator. This returns streambuf.sgetc()....
│ │ │ -
bool equal(const istreambuf_iterator &__b) const
Return true both iterators are end or both are not end.
│ │ │ -
istreambuf_iterator & operator++()
Advance the iterator. Calls streambuf.sbumpc().
│ │ │ -
_Traits traits_type
Public typedefs.
│ │ │ -
istreambuf_iterator(istream_type &__s) noexcept
Construct start of input stream iterator.
│ │ │ -
istreambuf_iterator operator++(int)
Advance the iterator. Calls streambuf.sbumpc().
│ │ │ -
_CharT char_type
Public typedefs.
│ │ │ -
istreambuf_iterator(streambuf_type *__s) noexcept
Construct start of streambuf iterator.
│ │ │ -
_Traits::int_type int_type
Public typedefs.
│ │ │ -
Provides output iterator semantics for streambufs.
│ │ │ -
ostreambuf_iterator & operator++(int)
Return *this.
│ │ │ -
ptrdiff_t difference_type
Public typedefs.
│ │ │ -
ostreambuf_iterator & operator++()
Return *this.
│ │ │ -
bool failed() const noexcept
Return true if previous operator=() failed.
│ │ │ -
_Traits traits_type
Public typedefs.
│ │ │ -
ostreambuf_iterator & operator=(_CharT __c)
Write character to streambuf. Calls streambuf.sputc().
│ │ │ -
ostreambuf_iterator & operator*()
Return *this.
│ │ │ -
basic_ostream< _CharT, _Traits > ostream_type
Public typedefs.
│ │ │ -
basic_streambuf< _CharT, _Traits > streambuf_type
Public typedefs.
│ │ │ -
ostreambuf_iterator(ostream_type &__s) noexcept
Construct output iterator from ostream.
│ │ │ -
_CharT char_type
Public typedefs.
│ │ │ -
ostreambuf_iterator(streambuf_type *__s) noexcept
Construct output iterator from streambuf.
│ │ │ - │ │ │ -
Common iterator class.
│ │ │ - │ │ │ - │ │ │ +
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,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -streambuf_iterator.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// Streambuf iterators │ │ │ │ +1// -*- C++ -*- header. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 1997-2023 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2008-2023 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,634 +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/streambuf_iterator.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{iterator} │ │ │ │ +27 * Do not attempt to use it directly. @headername{atomic} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _STREAMBUF_ITERATOR_H │ │ │ │ -31#define _STREAMBUF_ITERATOR_H 1 │ │ │ │ +30#ifndef _GLIBCXX_ATOMIC_LOCK_FREE_H │ │ │ │ +31#define _GLIBCXX_ATOMIC_LOCK_FREE_H 1 │ │ │ │ 32 │ │ │ │ 33#pragma GCC system_header │ │ │ │ 34 │ │ │ │ -35#include <_s_t_r_e_a_m_b_u_f> │ │ │ │ -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 <_d_e_b_u_g_/_d_e_b_u_g_._h> │ │ │ │ -38 │ │ │ │ -39namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -40{ │ │ │ │ -41_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -42 │ │ │ │ -43 /** │ │ │ │ -44 * @addtogroup iterators │ │ │ │ -45 * @{ │ │ │ │ +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// Ignore warnings about std::iterator. │ │ │ │ -49#pragma GCC diagnostic push │ │ │ │ -50#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ -51 // 24.5.3 Template class istreambuf_iterator │ │ │ │ -52 /// Provides input iterator semantics for streambufs. │ │ │ │ -53 template │ │ │ │ -_5_4 class _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -55 : public _i_t_e_r_a_t_o_r │ │ │ │ -57 { │ │ │ │ -58 public: │ │ │ │ -59 // Types: │ │ │ │ -60 ///@{ │ │ │ │ -61 /// Public typedefs │ │ │ │ -62#if __cplusplus < 201103L │ │ │ │ -63 typedef _CharT& _r_e_f_e_r_e_n_c_e; // Changed to _CharT by LWG 445 │ │ │ │ -64#elif __cplusplus > 201703L │ │ │ │ -65 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -66 // 3188. istreambuf_iterator::pointer should not be unspecified │ │ │ │ -_6_7 using _p_o_i_n_t_e_r = _v_o_i_d; │ │ │ │ -68#endif │ │ │ │ -69 │ │ │ │ -_7_0 typedef _CharT _c_h_a_r___t_y_p_e; │ │ │ │ -_7_1 typedef _Traits _t_r_a_i_t_s___t_y_p_e; │ │ │ │ -_7_2 typedef typename _Traits::int_type _i_n_t___t_y_p_e; │ │ │ │ -_7_3 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_4 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; │ │ │ │ -75 ///@} │ │ │ │ -76 │ │ │ │ -77 template │ │ │ │ -78 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -79 _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 │ │ │ │ -80 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_>, │ │ │ │ -81 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>); │ │ │ │ -82 │ │ │ │ -83 template │ │ │ │ -84 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -85 ___C_h_a_r_T_2*>::__type │ │ │ │ -86 __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_>, │ │ │ │ -87 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>, ___C_h_a_r_T_2*); │ │ │ │ -88 │ │ │ │ -89 template │ │ │ │ -90 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -91 ___C_h_a_r_T_2*>::__type │ │ │ │ -92 __copy_n_a(_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>, _Size, ___C_h_a_r_T_2*, bool); │ │ │ │ -93 │ │ │ │ -94 template │ │ │ │ -95 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -96 _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 │ │ │ │ -97 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_>, │ │ │ │ -98 const ___C_h_a_r_T_2&); │ │ │ │ -99 │ │ │ │ -100 template │ │ │ │ -101 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -102 void>::__type │ │ │ │ -103 advance(_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>&, ___D_i_s_t_a_n_c_e); │ │ │ │ -104 │ │ │ │ -105 private: │ │ │ │ -106 // 24.5.3 istreambuf_iterator │ │ │ │ -107 // p 1 │ │ │ │ -108 // If the end of stream is reached (streambuf_type::sgetc() │ │ │ │ -109 // returns traits_type::eof()), the iterator becomes equal to │ │ │ │ -110 // the "end of stream" iterator value. │ │ │ │ -111 // NB: This implementation assumes the "end of stream" value │ │ │ │ -112 // is EOF, or -1. │ │ │ │ -113 mutable _s_t_r_e_a_m_b_u_f___t_y_p_e* _M_sbuf; │ │ │ │ -114 _i_n_t___t_y_p_e _M_c; │ │ │ │ -115 │ │ │ │ -116 public: │ │ │ │ -117 /// Construct end of input stream iterator. │ │ │ │ -_1_1_8 ___G_L_I_B_C_X_X___C_O_N_S_T_E_X_P_R _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r() ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -119 : _M_sbuf(0), _M_c(_t_r_a_i_t_s___t_y_p_e::eof()) { } │ │ │ │ -120 │ │ │ │ -121#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ -122 constexpr _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r(_d_e_f_a_u_l_t___s_e_n_t_i_n_e_l___t) noexcept │ │ │ │ -123 : _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r() { } │ │ │ │ -124#endif │ │ │ │ -125 │ │ │ │ -126#if __cplusplus >= 201103L │ │ │ │ -127 _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; │ │ │ │ -128 │ │ │ │ -129 ~istreambuf_iterator() = default; │ │ │ │ -130#endif │ │ │ │ -131 │ │ │ │ -132 /// Construct start of input stream iterator. │ │ │ │ -_1_3_3 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r(_i_s_t_r_e_a_m___t_y_p_e& _____s) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -134 : _M_sbuf(_____s.rdbuf()), _M_c(traits_type::eof()) { } │ │ │ │ -135 │ │ │ │ -136 /// Construct start of streambuf iterator. │ │ │ │ -_1_3_7 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r(_s_t_r_e_a_m_b_u_f___t_y_p_e* _____s) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -138 : _M_sbuf(_____s), _M_c(traits_type::eof()) { } │ │ │ │ -139 │ │ │ │ -140#if __cplusplus >= 201103L │ │ │ │ -141 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -142 operator=(const _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r&) noexcept = default; │ │ │ │ -143#endif │ │ │ │ -144 │ │ │ │ -145 /// Return the current character pointed to by iterator. This returns │ │ │ │ -146 /// streambuf.sgetc(). It cannot be assigned. NB: The result of │ │ │ │ -147 /// operator*() on an end of stream is undefined. │ │ │ │ -148 _GLIBCXX_NODISCARD │ │ │ │ -149 _c_h_a_r___t_y_p_e │ │ │ │ -_1_5_0 _o_p_e_r_a_t_o_r_*() const │ │ │ │ -151 { │ │ │ │ -152 _i_n_t___t_y_p_e __c = _M_get(); │ │ │ │ -153 │ │ │ │ -154#ifdef _GLIBCXX_DEBUG_PEDANTIC │ │ │ │ -155 // Dereferencing a past-the-end istreambuf_iterator is a │ │ │ │ -156 // libstdc++ extension │ │ │ │ -157 __glibcxx_requires_cond(!_S_is_eof(__c), │ │ │ │ -158 _M_message(__gnu_debug::__msg_deref_istreambuf) │ │ │ │ -159 ._M_iterator(*this)); │ │ │ │ -160#endif │ │ │ │ -161 return traits_type::to_char_type(__c); │ │ │ │ -162 } │ │ │ │ -163 │ │ │ │ -164 /// Advance the iterator. Calls streambuf.sbumpc(). │ │ │ │ -165 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -_1_6_6 _o_p_e_r_a_t_o_r_+_+() │ │ │ │ -167 { │ │ │ │ -168 __glibcxx_requires_cond(_M_sbuf && │ │ │ │ -169 (!_S_is_eof(_M_c) || !_S_is_eof(_M_sbuf->sgetc())), │ │ │ │ -170 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -171 ._M_iterator(*this)); │ │ │ │ -172 │ │ │ │ -173 _M_sbuf->sbumpc(); │ │ │ │ -174 _M_c = traits_type::eof(); │ │ │ │ -175 return *this; │ │ │ │ -176 } │ │ │ │ -177 │ │ │ │ -178 /// Advance the iterator. Calls streambuf.sbumpc(). │ │ │ │ -179 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -_1_8_0 _o_p_e_r_a_t_o_r_+_+(int) │ │ │ │ -181 { │ │ │ │ -182 __glibcxx_requires_cond(_M_sbuf && │ │ │ │ -183 (!_S_is_eof(_M_c) || !_S_is_eof(_M_sbuf->sgetc())), │ │ │ │ -184 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -185 ._M_iterator(*this)); │ │ │ │ -186 │ │ │ │ -187 _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r _____o_l_d = *this; │ │ │ │ -188 _____o_l_d._M_c = _M_sbuf->sbumpc(); │ │ │ │ -189 _M_c = traits_type::eof(); │ │ │ │ -190 return _____o_l_d; │ │ │ │ -191 } │ │ │ │ -192 │ │ │ │ -193 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -194 // 110 istreambuf_iterator::equal not const │ │ │ │ -195 // NB: there is also number 111 (NAD) relevant to this function. │ │ │ │ -196 /// Return true both iterators are end or both are not end. │ │ │ │ -197 _GLIBCXX_NODISCARD │ │ │ │ -198 bool │ │ │ │ -_1_9_9 _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 │ │ │ │ -200 { return _M_at_eof() == __b._M_at_eof(); } │ │ │ │ -201 │ │ │ │ -202 private: │ │ │ │ -203 _i_n_t___t_y_p_e │ │ │ │ -204 _M_get() const │ │ │ │ -205 { │ │ │ │ -206 _i_n_t___t_y_p_e _____r_e_t = _M_c; │ │ │ │ -207 if (_M_sbuf && _S_is_eof(_____r_e_t) && _S_is_eof(_____r_e_t = _M_sbuf->sgetc())) │ │ │ │ -208 _M_sbuf = 0; │ │ │ │ -209 return _____r_e_t; │ │ │ │ -210 } │ │ │ │ -211 │ │ │ │ -212 bool │ │ │ │ -213 _M_at_eof() const │ │ │ │ -214 { return _S_is_eof(_M_get()); } │ │ │ │ -215 │ │ │ │ -216 static bool │ │ │ │ -217 _S_is_eof(_i_n_t___t_y_p_e __c) │ │ │ │ -218 { │ │ │ │ -219 const _i_n_t___t_y_p_e __eof = traits_type::eof(); │ │ │ │ -220 return traits_type::eq_int_type(__c, __eof); │ │ │ │ -221 } │ │ │ │ -222 │ │ │ │ -223#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ -224 [[nodiscard]] │ │ │ │ -225 friend bool │ │ │ │ -226 operator==(const _i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& __i, default_sentinel_t) │ │ │ │ -227 { return __i._M_at_eof(); } │ │ │ │ -228#endif │ │ │ │ -229 }; │ │ │ │ -230 │ │ │ │ -231 template │ │ │ │ -232 _GLIBCXX_NODISCARD │ │ │ │ -233 inline bool │ │ │ │ -234 operator==(const istreambuf_iterator<_CharT, _Traits>& __a, │ │ │ │ -235 const istreambuf_iterator<_CharT, _Traits>& __b) │ │ │ │ -236 { return __a.equal(__b); } │ │ │ │ -237 │ │ │ │ -238#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -239 template │ │ │ │ -240 _GLIBCXX_NODISCARD │ │ │ │ -241 inline bool │ │ │ │ -242 operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, │ │ │ │ -243 const istreambuf_iterator<_CharT, _Traits>& __b) │ │ │ │ -244 { return !__a.equal(__b); } │ │ │ │ -245#endif │ │ │ │ -246 │ │ │ │ -247 /// Provides output iterator semantics for streambufs. │ │ │ │ -248 template │ │ │ │ -_2_4_9 class _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -250 : public _i_t_e_r_a_t_o_r │ │ │ │ -251 { │ │ │ │ -252 public: │ │ │ │ -253 // Types: │ │ │ │ -254 ///@{ │ │ │ │ -255 /// Public typedefs │ │ │ │ -256#if __cplusplus > 201703L │ │ │ │ -_2_5_7 using _d_i_f_f_e_r_e_n_c_e___t_y_p_e = ptrdiff_t; │ │ │ │ -258#endif │ │ │ │ -_2_5_9 typedef _CharT _c_h_a_r___t_y_p_e; │ │ │ │ -_2_6_0 typedef _Traits _t_r_a_i_t_s___t_y_p_e; │ │ │ │ -_2_6_1 typedef _b_a_s_i_c___s_t_r_e_a_m_b_u_f_<___C_h_a_r_T_,_ ___T_r_a_i_t_s_> _s_t_r_e_a_m_b_u_f___t_y_p_e; │ │ │ │ -_2_6_2 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; │ │ │ │ -263 ///@} │ │ │ │ -264 │ │ │ │ -265 template │ │ │ │ -266 friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, │ │ │ │ -267 _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 │ │ │ │ -268 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_>, │ │ │ │ -269 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_<___C_h_a_r_T_2_>); │ │ │ │ -270 │ │ │ │ -271 private: │ │ │ │ -272 _s_t_r_e_a_m_b_u_f___t_y_p_e* _M_sbuf; │ │ │ │ -273 bool _M_failed; │ │ │ │ -274 │ │ │ │ -275 public: │ │ │ │ -276 │ │ │ │ -277#if __cplusplus > 201703L │ │ │ │ -278 constexpr │ │ │ │ -279 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r() noexcept │ │ │ │ -280 : _M_sbuf(nullptr), _M_failed(_t_r_u_e) { } │ │ │ │ -281#endif │ │ │ │ -282 │ │ │ │ -283 /// Construct output iterator from ostream. │ │ │ │ -_2_8_4 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r(_o_s_t_r_e_a_m___t_y_p_e& _____s) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -285 : _M_sbuf(_____s.rdbuf()), _M_failed(!_M_sbuf) { } │ │ │ │ -286 │ │ │ │ -287 /// Construct output iterator from streambuf. │ │ │ │ -_2_8_8 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r(_s_t_r_e_a_m_b_u_f___t_y_p_e* _____s) ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -289 : _M_sbuf(_____s), _M_failed(!_M_sbuf) { } │ │ │ │ -290 │ │ │ │ -291 /// Write character to streambuf. Calls streambuf.sputc(). │ │ │ │ -292 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -_2_9_3 _o_p_e_r_a_t_o_r_=(_CharT __c) │ │ │ │ -294 { │ │ │ │ -295 if (!_M_failed && │ │ │ │ -296 _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) │ │ │ │ -297 _M_failed = true; │ │ │ │ -298 return *this; │ │ │ │ -299 } │ │ │ │ -300 │ │ │ │ -301 /// Return *this. │ │ │ │ -302 _GLIBCXX_NODISCARD │ │ │ │ -303 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -_3_0_4 _o_p_e_r_a_t_o_r_*() │ │ │ │ -305 { return *this; } │ │ │ │ -306 │ │ │ │ -307 /// Return *this. │ │ │ │ -308 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -_3_0_9 _o_p_e_r_a_t_o_r_+_+(int) │ │ │ │ -310 { return *this; } │ │ │ │ -311 │ │ │ │ -312 /// Return *this. │ │ │ │ -313 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -_3_1_4 _o_p_e_r_a_t_o_r_+_+() │ │ │ │ -315 { return *this; } │ │ │ │ -316 │ │ │ │ -317 /// Return true if previous operator=() failed. │ │ │ │ -318 _GLIBCXX_NODISCARD │ │ │ │ -319 bool │ │ │ │ -_3_2_0 _f_a_i_l_e_d() const ___G_L_I_B_C_X_X___U_S_E___N_O_E_X_C_E_P_T │ │ │ │ -321 { return _M_failed; } │ │ │ │ -322 │ │ │ │ -323 _o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r& │ │ │ │ -324 _M_put(const _CharT* _____w_s, _s_t_r_e_a_m_s_i_z_e _____l_e_n) │ │ │ │ -325 { │ │ │ │ -326 if (_____b_u_i_l_t_i_n___e_x_p_e_c_t(!_M_failed, true) │ │ │ │ -327 && _____b_u_i_l_t_i_n___e_x_p_e_c_t(this->_M_sbuf->sputn(_____w_s, _____l_e_n) != _____l_e_n, │ │ │ │ -328 false)) │ │ │ │ -329 _M_failed = true; │ │ │ │ -330 return *this; │ │ │ │ -331 } │ │ │ │ -332 }; │ │ │ │ -333#pragma GCC diagnostic pop │ │ │ │ -334 │ │ │ │ -335 // Overloads for streambuf iterators. │ │ │ │ -336 template │ │ │ │ -337 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -338 ostreambuf_iterator<_CharT> >::__type │ │ │ │ -339 copy(istreambuf_iterator<_CharT> __first, │ │ │ │ -340 istreambuf_iterator<_CharT> __last, │ │ │ │ -341 ostreambuf_iterator<_CharT> __result) │ │ │ │ -342 { │ │ │ │ -343 if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) │ │ │ │ -344 { │ │ │ │ -345 bool __ineof; │ │ │ │ -346 __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); │ │ │ │ -347 if (!__ineof) │ │ │ │ -348 __result._M_failed = true; │ │ │ │ -349 } │ │ │ │ -350 return __result; │ │ │ │ -351 } │ │ │ │ -352 │ │ │ │ -353 template │ │ │ │ -354 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -355 ostreambuf_iterator<_CharT> >::__type │ │ │ │ -356 __copy_move_a2(_CharT* __first, _CharT* __last, │ │ │ │ -357 ostreambuf_iterator<_CharT> __result) │ │ │ │ -358 { │ │ │ │ -359 const _s_t_r_e_a_m_s_i_z_e __num = __last - __first; │ │ │ │ -360 if (__num > 0) │ │ │ │ -361 __result._M_put(__first, __num); │ │ │ │ -362 return __result; │ │ │ │ -363 } │ │ │ │ -364 │ │ │ │ -365 template │ │ │ │ -366 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -367 ostreambuf_iterator<_CharT> >::__type │ │ │ │ -368 __copy_move_a2(const _CharT* __first, const _CharT* __last, │ │ │ │ -369 ostreambuf_iterator<_CharT> __result) │ │ │ │ -370 { │ │ │ │ -371 const _s_t_r_e_a_m_s_i_z_e __num = __last - __first; │ │ │ │ -372 if (__num > 0) │ │ │ │ -373 __result._M_put(__first, __num); │ │ │ │ -374 return __result; │ │ │ │ -375 } │ │ │ │ -376 │ │ │ │ -377 template │ │ │ │ -378 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -379 _CharT*>::__type │ │ │ │ -380 __copy_move_a2(istreambuf_iterator<_CharT> __first, │ │ │ │ -381 istreambuf_iterator<_CharT> __last, _CharT* __result) │ │ │ │ -382 { │ │ │ │ -383 typedef istreambuf_iterator<_CharT> __is_iterator_type; │ │ │ │ -384 typedef typename __is_iterator_type::traits_type traits_type; │ │ │ │ -385 typedef typename __is_iterator_type::streambuf_type streambuf_type; │ │ │ │ -386 typedef typename traits_type::int_type int_type; │ │ │ │ -387 │ │ │ │ -388 if (__first._M_sbuf && !__last._M_sbuf) │ │ │ │ -389 { │ │ │ │ -390 streambuf_type* __sb = __first._M_sbuf; │ │ │ │ -391 int_type __c = __sb->sgetc(); │ │ │ │ -392 while (!traits_type::eq_int_type(__c, traits_type::eof())) │ │ │ │ -393 { │ │ │ │ -394 const _s_t_r_e_a_m_s_i_z_e __n = __sb->egptr() - __sb->gptr(); │ │ │ │ -395 if (__n > 1) │ │ │ │ -396 { │ │ │ │ -397 traits_type::copy(__result, __sb->gptr(), __n); │ │ │ │ -398 __sb->__safe_gbump(__n); │ │ │ │ -399 __result += __n; │ │ │ │ -400 __c = __sb->underflow(); │ │ │ │ -401 } │ │ │ │ -402 else │ │ │ │ -403 { │ │ │ │ -404 *__result++ = traits_type::to_char_type(__c); │ │ │ │ -405 __c = __sb->snextc(); │ │ │ │ -406 } │ │ │ │ -407 } │ │ │ │ -408 } │ │ │ │ -409 return __result; │ │ │ │ -410 } │ │ │ │ -411 │ │ │ │ -412 template │ │ │ │ -413 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -414 _CharT*>::__type │ │ │ │ -415 __copy_n_a(istreambuf_iterator<_CharT> __it, _Size __n, _CharT* __result, │ │ │ │ -416 bool __strict __attribute__((__unused__))) │ │ │ │ -417 { │ │ │ │ -418 if (__n == 0) │ │ │ │ -419 return __result; │ │ │ │ -420 │ │ │ │ -421 __glibcxx_requires_cond(__it._M_sbuf, │ │ │ │ -422 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -423 ._M_iterator(__it)); │ │ │ │ -424 _CharT* __beg = __result; │ │ │ │ -425 __result += __it._M_sbuf->sgetn(__beg, __n); │ │ │ │ -426 __glibcxx_requires_cond(!__strict || __result - __beg == __n, │ │ │ │ -427 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -428 ._M_iterator(__it)); │ │ │ │ -429 return __result; │ │ │ │ -430 } │ │ │ │ -431 │ │ │ │ -432 template │ │ │ │ -433 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -434 istreambuf_iterator<_CharT> >::__type │ │ │ │ -435 find(istreambuf_iterator<_CharT> __first, │ │ │ │ -436 istreambuf_iterator<_CharT> __last, const _CharT& __val) │ │ │ │ -437 { │ │ │ │ -438 typedef istreambuf_iterator<_CharT> __is_iterator_type; │ │ │ │ -439 typedef typename __is_iterator_type::traits_type traits_type; │ │ │ │ -440 typedef typename __is_iterator_type::streambuf_type streambuf_type; │ │ │ │ -441 typedef typename traits_type::int_type int_type; │ │ │ │ -442 const int_type __eof = traits_type::eof(); │ │ │ │ -443 │ │ │ │ -444 if (__first._M_sbuf && !__last._M_sbuf) │ │ │ │ -445 { │ │ │ │ -446 const int_type __ival = traits_type::to_int_type(__val); │ │ │ │ -447 streambuf_type* __sb = __first._M_sbuf; │ │ │ │ -448 int_type __c = __sb->sgetc(); │ │ │ │ -449 while (!traits_type::eq_int_type(__c, __eof) │ │ │ │ -450 && !traits_type::eq_int_type(__c, __ival)) │ │ │ │ -451 { │ │ │ │ -452 _s_t_r_e_a_m_s_i_z_e __n = __sb->egptr() - __sb->gptr(); │ │ │ │ -453 if (__n > 1) │ │ │ │ -454 { │ │ │ │ -455 const _CharT* __p = traits_type::find(__sb->gptr(), │ │ │ │ -456 __n, __val); │ │ │ │ -457 if (__p) │ │ │ │ -458 __n = __p - __sb->gptr(); │ │ │ │ -459 __sb->__safe_gbump(__n); │ │ │ │ -460 __c = __sb->sgetc(); │ │ │ │ -461 } │ │ │ │ -462 else │ │ │ │ -463 __c = __sb->snextc(); │ │ │ │ -464 } │ │ │ │ -465 │ │ │ │ -466 __first._M_c = __eof; │ │ │ │ -467 } │ │ │ │ -468 │ │ │ │ -469 return __first; │ │ │ │ -470 } │ │ │ │ -471 │ │ │ │ -472 template │ │ │ │ -473 typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, │ │ │ │ -474 void>::__type │ │ │ │ -475 _a_d_v_a_n_c_e(istreambuf_iterator<_CharT>& __i, _Distance __n) │ │ │ │ -476 { │ │ │ │ -477 if (__n == 0) │ │ │ │ -478 return; │ │ │ │ -479 │ │ │ │ -480 __glibcxx_assert(__n > 0); │ │ │ │ -481 __glibcxx_requires_cond(!__i._M_at_eof(), │ │ │ │ -482 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -483 ._M_iterator(__i)); │ │ │ │ -484 │ │ │ │ -485 typedef istreambuf_iterator<_CharT> __is_iterator_type; │ │ │ │ -486 typedef typename __is_iterator_type::traits_type traits_type; │ │ │ │ -487 typedef typename __is_iterator_type::streambuf_type streambuf_type; │ │ │ │ -488 typedef typename traits_type::int_type int_type; │ │ │ │ -489 const int_type __eof = traits_type::eof(); │ │ │ │ -490 │ │ │ │ -491 streambuf_type* __sb = __i._M_sbuf; │ │ │ │ -492 while (__n > 0) │ │ │ │ -493 { │ │ │ │ -494 _s_t_r_e_a_m_s_i_z_e __size = __sb->egptr() - __sb->gptr(); │ │ │ │ -495 if (__size > __n) │ │ │ │ -496 { │ │ │ │ -497 __sb->__safe_gbump(__n); │ │ │ │ -498 break; │ │ │ │ -499 } │ │ │ │ -500 │ │ │ │ -501 __sb->__safe_gbump(__size); │ │ │ │ -502 __n -= __size; │ │ │ │ -503 if (traits_type::eq_int_type(__sb->underflow(), __eof)) │ │ │ │ -504 { │ │ │ │ -505 __glibcxx_requires_cond(__n == 0, │ │ │ │ -506 _M_message(__gnu_debug::__msg_inc_istreambuf) │ │ │ │ -507 ._M_iterator(__i)); │ │ │ │ -508 break; │ │ │ │ -509 } │ │ │ │ -510 } │ │ │ │ -511 │ │ │ │ -512 __i._M_c = __eof; │ │ │ │ -513 } │ │ │ │ -514 │ │ │ │ -515/// @} group iterators │ │ │ │ -516 │ │ │ │ -517_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -518} // namespace │ │ │ │ -519 │ │ │ │ -520#endif │ │ │ │ -_s_t_r_e_a_m_b_u_f │ │ │ │ -_s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h │ │ │ │ -_d_e_b_u_g_._h │ │ │ │ -_s_t_d │ │ │ │ -ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_s_t_r_e_a_m_s_i_z_e │ │ │ │ -ptrdiff_t streamsize │ │ │ │ -Integral type for I/O operation counts and buffer sizes. │ │ │ │ -DDeeffiinniittiioonn _p_o_s_t_y_p_e_s_._h_:_6_8 │ │ │ │ -_s_t_d_:_:_a_d_v_a_n_c_e │ │ │ │ -constexpr void advance(_InputIterator &__i, _Distance __n) │ │ │ │ -A generalization of pointer arithmetic. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___f_u_n_c_s_._h_:_2_2_0 │ │ │ │ -_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_7 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_s_t_r_e_a_m_b_u_f___t_y_p_e │ │ │ │ -basic_streambuf< _CharT, _Traits > streambuf_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_7_3 │ │ │ │ -_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_8 │ │ │ │ -_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_4 │ │ │ │ -_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_5_0 │ │ │ │ -_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_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++() │ │ │ │ -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_6 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_t_r_a_i_t_s___t_y_p_e │ │ │ │ -_Traits traits_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_7_1 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -istreambuf_iterator(istream_type &__s) noexcept │ │ │ │ -Construct start of input stream iterator. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_1_3_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++(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_8_0 │ │ │ │ -_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_:_7_0 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -istreambuf_iterator(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_7 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_i_n_t___t_y_p_e │ │ │ │ -_Traits::int_type int_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_7_2 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -Provides output iterator semantics for streambufs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_5_1 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_+_+ │ │ │ │ -ostreambuf_iterator & operator++(int) │ │ │ │ -Return *this. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_3_0_9 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -ptrdiff_t difference_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_5_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_1_4 │ │ │ │ -_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_2_0 │ │ │ │ -_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_6_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=(_CharT __c) │ │ │ │ -Write character to streambuf. Calls streambuf.sputc(). │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_9_3 │ │ │ │ -_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_4 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m___t_y_p_e │ │ │ │ -basic_ostream< _CharT, _Traits > ostream_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_6_2 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_s_t_r_e_a_m_b_u_f___t_y_p_e │ │ │ │ -basic_streambuf< _CharT, _Traits > streambuf_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_6_1 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -ostreambuf_iterator(ostream_type &__s) noexcept │ │ │ │ -Construct output iterator from ostream. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_8_4 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_c_h_a_r___t_y_p_e │ │ │ │ -_CharT char_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_5_9 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r │ │ │ │ -ostreambuf_iterator(streambuf_type *__s) noexcept │ │ │ │ -Construct output iterator from streambuf. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_r_._h_:_2_8_8 │ │ │ │ -_s_t_d_:_:_d_e_f_a_u_l_t___s_e_n_t_i_n_e_l___t │ │ │ │ -DDeeffiinniittiioonn _i_t_e_r_a_t_o_r___c_o_n_c_e_p_t_s_._h_:_5_8 │ │ │ │ -_s_t_d_:_:_i_t_e_r_a_t_o_r │ │ │ │ -Common iterator class. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_2_8 │ │ │ │ -_s_t_d_:_:_i_t_e_r_a_t_o_r_<_ _i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g_,_ ___C_h_a_r_T_,_ ___T_r_a_i_t_s_:_:_o_f_f___t_y_p_e_,_ ___C_h_a_r_T_ _*_,_ ___C_h_a_r_T │ │ │ │ -_>_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ -_CharT reference │ │ │ │ -This type represents a reference-to-value_type. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_3_8 │ │ │ │ -_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ -DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ +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 │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_e_a_m_b_u_f___i_t_e_r_a_t_o_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.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00383.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stream_iterator.h File Reference │ │ │ +libstdc++: shared_ptr_atomic.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,42 +46,317 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00383.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces
│ │ │ -
stream_iterator.h File Reference
│ │ │ +Namespaces | │ │ │ +Macros | │ │ │ +Variables
│ │ │ +
shared_ptr_atomic.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 >
 
│ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ Namespaces

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

│ │ │ +Macros

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

│ │ │ +Functions

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

│ │ │ +Variables

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

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ + │ │ │ +

Definition in file shared_ptr_atomic.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ __cpp_lib_atomic_shared_ptr

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

Definition at line 359 of file shared_ptr_atomic.h.

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

◆ _GLIBCXX_TSAN_MUTEX_DESTROY

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

Definition in file stream_iterator.h.

│ │ │ -
│ │ │ +

Definition at line 51 of file shared_ptr_atomic.h.

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

◆ _GLIBCXX_TSAN_MUTEX_LOCKED

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

Definition at line 54 of file shared_ptr_atomic.h.

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

◆ _GLIBCXX_TSAN_MUTEX_POST_SIGNAL

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

Definition at line 58 of file shared_ptr_atomic.h.

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

◆ _GLIBCXX_TSAN_MUTEX_POST_UNLOCK

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

Definition at line 56 of file shared_ptr_atomic.h.

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

◆ _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL

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

Definition at line 57 of file shared_ptr_atomic.h.

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

◆ _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK

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

Definition at line 55 of file shared_ptr_atomic.h.

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

◆ _GLIBCXX_TSAN_MUTEX_TRY_LOCK

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

Definition at line 52 of file shared_ptr_atomic.h.

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

◆ _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED

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

Definition at line 53 of file shared_ptr_atomic.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,19 +1,166 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ -stream_iterator.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +shared_ptr_atomic.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r_<_ ___T_p_,_ ___C_h_a_r_T_,_ ___T_r_a_i_t_s_,_ ___D_i_s_t_ _> │ │ │ │ -  │ │ │ │ -class   _s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_<_ ___T_p_,_ ___C_h_a_r_T_,_ ___T_r_a_i_t_s_ _> │ │ │ │ -  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _____c_p_p___l_i_b___a_t_o_m_i_c___s_h_a_r_e_d___p_t_r │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___D_E_S_T_R_O_Y(X) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___L_O_C_K_E_D(X) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___P_O_S_T___S_I_G_N_A_L(X) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___P_O_S_T___U_N_L_O_C_K(X) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___P_R_E___S_I_G_N_A_L(X) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___P_R_E___U_N_L_O_C_K(X) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___T_R_Y___L_O_C_K(X) │ │ │ │ +  │ │ │ │ +#define  ___G_L_I_B_C_X_X___T_S_A_N___M_U_T_E_X___T_R_Y___L_O_C_K___F_A_I_L_E_D(X) │ │ │ │ +  │ │ │ │ +FFuunnccttiioonnss │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___i_s___l_o_c_k___f_r_e_e (const __shared_ptr< _Tp, │ │ │ │ + ___L_p > *) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___i_s___l_o_c_k___f_r_e_e (const _s_h_a_r_e_d___p_t_r< _Tp > │ │ │ │ + *__p) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_a_t_o_m_i_c___l_o_a_d (const __shared_ptr< _Tp, ___L_p > │ │ │ │ + *__p) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp >  _s_t_d_:_:_a_t_o_m_i_c___l_o_a_d (const _s_h_a_r_e_d___p_t_r< _Tp > *__p) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_a_t_o_m_i_c___l_o_a_d___e_x_p_l_i_c_i_t (const __shared_ptr< _Tp, │ │ │ │ + ___L_p > *__p, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp >  _s_t_d_:_:_a_t_o_m_i_c___l_o_a_d___e_x_p_l_i_c_i_t (const _s_h_a_r_e_d___p_t_r< _Tp > │ │ │ │ + *__p, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + _v_o_i_d  _s_t_d_:_:_a_t_o_m_i_c___s_t_o_r_e (__shared_ptr< _Tp, ___L_p > *__p, │ │ │ │ + __shared_ptr< _Tp, ___L_p > __r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + _v_o_i_d  _s_t_d_:_:_a_t_o_m_i_c___s_t_o_r_e (_s_h_a_r_e_d___p_t_r< _Tp > *__p, │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp > __r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + _v_o_i_d  _s_t_d_:_:_a_t_o_m_i_c___s_t_o_r_e___e_x_p_l_i_c_i_t (__shared_ptr< _Tp, ___L_p > │ │ │ │ + *__p, __shared_ptr< _Tp, ___L_p > __r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + _v_o_i_d  _s_t_d_:_:_a_t_o_m_i_c___s_t_o_r_e___e_x_p_l_i_c_i_t (_s_h_a_r_e_d___p_t_r< _Tp > *__p, │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp > __r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_a_t_o_m_i_c___e_x_c_h_a_n_g_e (__shared_ptr< _Tp, ___L_p > *__p, │ │ │ │ + __shared_ptr< _Tp, ___L_p > __r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp >  _s_t_d_:_:_a_t_o_m_i_c___e_x_c_h_a_n_g_e (_s_h_a_r_e_d___p_t_r< _Tp > *__p, │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp > __r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_a_t_o_m_i_c___e_x_c_h_a_n_g_e___e_x_p_l_i_c_i_t (__shared_ptr< _Tp, ___L_p │ │ │ │ + > *__p, __shared_ptr< _Tp, ___L_p > __r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp >  _s_t_d_:_:_a_t_o_m_i_c___e_x_c_h_a_n_g_e___e_x_p_l_i_c_i_t (_s_h_a_r_e_d___p_t_r< _Tp > │ │ │ │ + *__p, _s_h_a_r_e_d___p_t_r< _Tp > __r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___s_t_r_o_n_g (__shared_ptr< │ │ │ │ + _Tp, ___L_p > *__p, __shared_ptr< _Tp, ___L_p > *_____v, │ │ │ │ + __shared_ptr< _Tp, ___L_p > _____w) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___s_t_r_o_n_g (_s_h_a_r_e_d___p_t_r< _Tp │ │ │ │ + > *__p, _s_h_a_r_e_d___p_t_r< _Tp > *_____v, _s_h_a_r_e_d___p_t_r< _Tp > │ │ │ │ + _____w) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___s_t_r_o_n_g___e_x_p_l_i_c_i_t │ │ │ │ + (__shared_ptr< _Tp, ___L_p > *__p, __shared_ptr< _Tp, │ │ │ │ + ___L_p > *_____v, __shared_ptr< _Tp, ___L_p > _____w, │ │ │ │ + _m_e_m_o_r_y___o_r_d_e_r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___s_t_r_o_n_g___e_x_p_l_i_c_i_t │ │ │ │ + (_s_h_a_r_e_d___p_t_r< _Tp > *__p, _s_h_a_r_e_d___p_t_r< _Tp > *_____v, │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp > _____w, _m_e_m_o_r_y___o_r_d_e_r, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___w_e_a_k (__shared_ptr< _Tp, │ │ │ │ + ___L_p > *__p, __shared_ptr< _Tp, ___L_p > *_____v, │ │ │ │ + __shared_ptr< _Tp, ___L_p > _____w) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___w_e_a_k (_s_h_a_r_e_d___p_t_r< _Tp > │ │ │ │ + *__p, _s_h_a_r_e_d___p_t_r< _Tp > *_____v, _s_h_a_r_e_d___p_t_r< _Tp > _____w) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___w_e_a_k___e_x_p_l_i_c_i_t │ │ │ │ + (__shared_ptr< _Tp, ___L_p > *__p, __shared_ptr< _Tp, │ │ │ │ + ___L_p > *_____v, __shared_ptr< _Tp, ___L_p > _____w, │ │ │ │ + _m_e_m_o_r_y___o_r_d_e_r _____s_u_c_c_e_s_s, _m_e_m_o_r_y___o_r_d_e_r _____f_a_i_l_u_r_e) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + bool  _s_t_d_:_:_a_t_o_m_i_c___c_o_m_p_a_r_e___e_x_c_h_a_n_g_e___w_e_a_k___e_x_p_l_i_c_i_t │ │ │ │ + (_s_h_a_r_e_d___p_t_r< _Tp > *__p, _s_h_a_r_e_d___p_t_r< _Tp > *_____v, │ │ │ │ + _s_h_a_r_e_d___p_t_r< _Tp > _____w, _m_e_m_o_r_y___o_r_d_e_r _____s_u_c_c_e_s_s, │ │ │ │ + _m_e_m_o_r_y___o_r_d_e_r _____f_a_i_l_u_r_e) │ │ │ │ +  │ │ │ │ +VVaarriiaabblleess │ │ │ │ +template<_t_y_p_e_n_a_m_e _Up > │ │ │ │ +_s_t_a_t_i_c constexpr bool  _s_t_d_:_:_____i_s___s_h_a_r_e_d___p_t_r │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Up > │ │ │ │ +_s_t_a_t_i_c constexpr bool  _s_t_d_:_:_____i_s___s_h_a_r_e_d___p_t_r_<_ _s_h_a_r_e_d___p_t_r_<_ ___U_p_ _>_ _> │ │ │ │ +  │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _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_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__aattoommiicc__sshhaarreedd__ppttrr ********** │ │ │ │ +#define __cpp_lib_atomic_shared_ptr │ │ │ │ +Definition at line _3_5_9 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__DDEESSTTRROOYY ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_DESTROY (   X ) │ │ │ │ +Definition at line _5_1 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__LLOOCCKKEEDD ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_LOCKED (   X ) │ │ │ │ +Definition at line _5_4 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__PPOOSSTT__SSIIGGNNAALL ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_POST_SIGNAL (   X ) │ │ │ │ +Definition at line _5_8 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__PPOOSSTT__UUNNLLOOCCKK ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_POST_UNLOCK (   X ) │ │ │ │ +Definition at line _5_6 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__PPRREE__SSIIGGNNAALL ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL (   X ) │ │ │ │ +Definition at line _5_7 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__PPRREE__UUNNLLOOCCKK ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK (   X ) │ │ │ │ +Definition at line _5_5 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__TTRRYY__LLOOCCKK ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK (   X ) │ │ │ │ +Definition at line _5_2 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ +********** _?◆_? __GGLLIIBBCCXXXX__TTSSAANN__MMUUTTEEXX__TTRRYY__LLOOCCKK__FFAAIILLEEDD ********** │ │ │ │ +#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED (   X ) │ │ │ │ +Definition at line _5_3 of file _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h │ │ │ │ + * _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00383_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stream_iterator.h Source File │ │ │ +libstdc++: shared_ptr_atomic.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stream_iterator.h
│ │ │ +
shared_ptr_atomic.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Stream iterators
│ │ │ +Go to the documentation of this file.
1// shared_ptr atomic access -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2001-2023 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2014-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,309 +72,898 @@ │ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │
24
│ │ │ -
25/** @file bits/stream_iterator.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{iterator}
│ │ │ +
27 * Do not attempt to use it directly. @headername{memory}
│ │ │
28 */
│ │ │
29
│ │ │ -
30#ifndef _STREAM_ITERATOR_H
│ │ │ -
31#define _STREAM_ITERATOR_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#include <iosfwd>
│ │ │ -
36#include <bits/move.h>
│ │ │ - │ │ │ -
38#include <debug/debug.h>
│ │ │ -
39
│ │ │ -
40namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
41{
│ │ │ -
42_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
43
│ │ │ -
44 /**
│ │ │ -
45 * @addtogroup iterators
│ │ │ -
46 * @{
│ │ │ -
47 */
│ │ │ -
48
│ │ │ -
49// Ignore warnings about std::iterator.
│ │ │ -
50#pragma GCC diagnostic push
│ │ │ -
51#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ -
52
│ │ │ -
53 /// Provides input iterator semantics for streams.
│ │ │ -
54 template<typename _Tp, typename _CharT = char,
│ │ │ -
55 typename _Traits = char_traits<_CharT>, typename _Dist = ptrdiff_t>
│ │ │ -
│ │ │ - │ │ │ -
57 : public iterator<input_iterator_tag, _Tp, _Dist, const _Tp*, const _Tp&>
│ │ │ -
58 {
│ │ │ -
59 public:
│ │ │ -
60 typedef _CharT char_type;
│ │ │ -
61 typedef _Traits traits_type;
│ │ │ - │ │ │ -
63
│ │ │ -
64 private:
│ │ │ -
65 istream_type* _M_stream;
│ │ │ -
66 _Tp _M_value;
│ │ │ -
67 // This bool becomes false at end-of-stream. It should be sufficient to
│ │ │ -
68 // check _M_stream != nullptr instead, but historically we did not set
│ │ │ -
69 // _M_stream to null when reaching the end, so we need to keep this flag.
│ │ │ -
70 bool _M_ok;
│ │ │ -
71
│ │ │ -
72 public:
│ │ │ -
73 /// Construct end of input stream iterator.
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
76 : _M_stream(0), _M_value(), _M_ok(false) {}
│ │ │ -
│ │ │ -
77
│ │ │ -
78 /// Construct start of input stream iterator.
│ │ │ -
│ │ │ - │ │ │ -
80 : _M_stream(std::__addressof(__s)), _M_ok(true)
│ │ │ -
81 { _M_read(); }
│ │ │ -
│ │ │ -
82
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
86 : _M_stream(__obj._M_stream), _M_value(__obj._M_value),
│ │ │ -
87 _M_ok(__obj._M_ok)
│ │ │ -
88 { }
│ │ │ -
89
│ │ │ -
90#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ -
91 constexpr
│ │ │ -
92 istream_iterator(default_sentinel_t)
│ │ │ -
93 noexcept(is_nothrow_default_constructible_v<_Tp>)
│ │ │ -
94 : istream_iterator() { }
│ │ │ -
95#endif
│ │ │ -
96
│ │ │ -
97#if __cplusplus >= 201103L
│ │ │ -
98 istream_iterator& operator=(const istream_iterator&) = default;
│ │ │ -
99 ~istream_iterator() = default;
│ │ │ -
100#endif
│ │ │ -
101
│ │ │ -
102 _GLIBCXX_NODISCARD
│ │ │ -
103 const _Tp&
│ │ │ -
104 operator*() const _GLIBCXX_NOEXCEPT
│ │ │ -
105 {
│ │ │ -
106 __glibcxx_requires_cond(_M_ok,
│ │ │ -
107 _M_message(__gnu_debug::__msg_deref_istream)
│ │ │ -
108 ._M_iterator(*this));
│ │ │ -
109 return _M_value;
│ │ │ -
110 }
│ │ │ -
111
│ │ │ -
112 _GLIBCXX_NODISCARD
│ │ │ -
113 const _Tp*
│ │ │ -
114 operator->() const _GLIBCXX_NOEXCEPT
│ │ │ -
115 { return std::__addressof((operator*())); }
│ │ │ -
116
│ │ │ - │ │ │ -
118 operator++()
│ │ │ -
119 {
│ │ │ -
120 __glibcxx_requires_cond(_M_ok,
│ │ │ -
121 _M_message(__gnu_debug::__msg_inc_istream)
│ │ │ -
122 ._M_iterator(*this));
│ │ │ -
123 _M_read();
│ │ │ -
124 return *this;
│ │ │ -
125 }
│ │ │ -
126
│ │ │ - │ │ │ -
128 operator++(int)
│ │ │ -
129 {
│ │ │ -
130 __glibcxx_requires_cond(_M_ok,
│ │ │ -
131 _M_message(__gnu_debug::__msg_inc_istream)
│ │ │ -
132 ._M_iterator(*this));
│ │ │ -
133 istream_iterator __tmp = *this;
│ │ │ -
134 _M_read();
│ │ │ -
135 return __tmp;
│ │ │ -
136 }
│ │ │ -
137
│ │ │ -
138 private:
│ │ │ -
139 bool
│ │ │ -
140 _M_equal(const istream_iterator& __x) const _GLIBCXX_NOEXCEPT
│ │ │ -
141 {
│ │ │ -
142 // Ideally this would just return _M_stream == __x._M_stream,
│ │ │ -
143 // but code compiled with old versions never sets _M_stream to null.
│ │ │ -
144 return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream);
│ │ │ -
145 }
│ │ │ -
146
│ │ │ -
147 void
│ │ │ -
148 _M_read()
│ │ │ -
149 {
│ │ │ -
150 if (_M_stream && !(*_M_stream >> _M_value))
│ │ │ -
151 {
│ │ │ -
152 _M_stream = 0;
│ │ │ -
153 _M_ok = false;
│ │ │ -
154 }
│ │ │ -
155 }
│ │ │ -
156
│ │ │ -
157 /// Return true if the iterators refer to the same stream,
│ │ │ -
158 /// or are both at end-of-stream.
│ │ │ -
159 _GLIBCXX_NODISCARD
│ │ │ -
160 friend bool
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
163 { return __x._M_equal(__y); }
│ │ │ -
│ │ │ -
164
│ │ │ -
165#if __cpp_impl_three_way_comparison < 201907L
│ │ │ -
166 /// Return true if the iterators refer to different streams,
│ │ │ -
167 /// or if one is at end-of-stream and the other is not.
│ │ │ -
168 _GLIBCXX_NODISCARD
│ │ │ -
169 friend bool
│ │ │ -
170 operator!=(const istream_iterator& __x, const istream_iterator& __y)
│ │ │ - │ │ │ -
172 { return !__x._M_equal(__y); }
│ │ │ -
173#endif
│ │ │ -
174
│ │ │ -
175#if __cplusplus > 201703L && __cpp_lib_concepts
│ │ │ -
176 [[nodiscard]]
│ │ │ -
177 friend bool
│ │ │ -
178 operator==(const istream_iterator& __i, default_sentinel_t) noexcept
│ │ │ -
179 { return !__i._M_stream; }
│ │ │ -
180#endif
│ │ │ -
181 };
│ │ │ -
│ │ │ -
182
│ │ │ -
183 /**
│ │ │ -
184 * @brief Provides output iterator semantics for streams.
│ │ │ -
185 *
│ │ │ -
186 * This class provides an iterator to write to an ostream. The type Tp is
│ │ │ -
187 * the only type written by this iterator and there must be an
│ │ │ -
188 * operator<<(Tp) defined.
│ │ │ -
189 *
│ │ │ -
190 * @tparam _Tp The type to write to the ostream.
│ │ │ -
191 * @tparam _CharT The ostream char_type.
│ │ │ -
192 * @tparam _Traits The ostream char_traits.
│ │ │ -
193 */
│ │ │ -
194 template<typename _Tp, typename _CharT = char,
│ │ │ -
195 typename _Traits = char_traits<_CharT> >
│ │ │ -
│ │ │ - │ │ │ -
197 : public iterator<output_iterator_tag, void, void, void, void>
│ │ │ -
198 {
│ │ │ -
199 public:
│ │ │ -
200 ///@{
│ │ │ -
201 /// Public typedef
│ │ │ -
202#if __cplusplus > 201703L
│ │ │ -
203 using difference_type = ptrdiff_t;
│ │ │ -
204#endif
│ │ │ -
205 typedef _CharT char_type;
│ │ │ -
206 typedef _Traits traits_type;
│ │ │ - │ │ │ -
208 ///@}
│ │ │ -
209
│ │ │ -
210 private:
│ │ │ -
211 ostream_type* _M_stream;
│ │ │ -
212 const _CharT* _M_string;
│ │ │ -
213
│ │ │ -
214 public:
│ │ │ -
215 /// Construct from an ostream.
│ │ │ -
│ │ │ - │ │ │ -
217 : _M_stream(std::__addressof(__s)), _M_string(0) {}
│ │ │ -
│ │ │ -
218
│ │ │ -
219 /**
│ │ │ -
220 * Construct from an ostream.
│ │ │ -
221 *
│ │ │ -
222 * The delimiter string @a c is written to the stream after every Tp
│ │ │ -
223 * written to the stream. The delimiter is not copied, and thus must
│ │ │ -
224 * not be destroyed while this iterator is in use.
│ │ │ -
225 *
│ │ │ -
226 * @param __s Underlying ostream to write to.
│ │ │ -
227 * @param __c CharT delimiter string to insert.
│ │ │ -
228 */
│ │ │ -
│ │ │ - │ │ │ -
230 : _M_stream(std::__addressof(__s)), _M_string(__c) { }
│ │ │ -
│ │ │ -
231
│ │ │ -
232 /// Copy constructor.
│ │ │ -
│ │ │ - │ │ │ -
234 : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { }
│ │ │ -
│ │ │ -
235
│ │ │ -
236#if __cplusplus >= 201103L
│ │ │ -
237 ostream_iterator& operator=(const ostream_iterator&) = default;
│ │ │ -
238#endif
│ │ │ -
239
│ │ │ -
240 /// Writes @a value to underlying ostream using operator<<. If
│ │ │ -
241 /// constructed with delimiter string, writes delimiter to ostream.
│ │ │ - │ │ │ -
│ │ │ -
243 operator=(const _Tp& __value)
│ │ │ -
244 {
│ │ │ -
245 __glibcxx_requires_cond(_M_stream != 0,
│ │ │ -
246 _M_message(__gnu_debug::__msg_output_ostream)
│ │ │ -
247 ._M_iterator(*this));
│ │ │ -
248 *_M_stream << __value;
│ │ │ -
249 if (_M_string)
│ │ │ -
250 *_M_stream << _M_string;
│ │ │ -
251 return *this;
│ │ │ -
252 }
│ │ │ -
│ │ │ -
253
│ │ │ -
254 _GLIBCXX_NODISCARD
│ │ │ - │ │ │ -
256 operator*() _GLIBCXX_NOEXCEPT
│ │ │ -
257 { return *this; }
│ │ │ -
258
│ │ │ -
259 ostream_iterator&
│ │ │ -
260 operator++() _GLIBCXX_NOEXCEPT
│ │ │ -
261 { return *this; }
│ │ │ -
262
│ │ │ - │ │ │ -
264 operator++(int) _GLIBCXX_NOEXCEPT
│ │ │ -
265 { return *this; }
│ │ │ -
266 };
│ │ │ -
│ │ │ -
267#pragma GCC diagnostic pop
│ │ │ -
268
│ │ │ -
269 /// @} group iterators
│ │ │ -
270
│ │ │ -
271_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
272} // namespace
│ │ │ -
273
│ │ │ -
274#endif
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:51
│ │ │ +
35// Annotations for the custom locking in atomic<shared_ptr<T>>.
│ │ │ +
36#if defined _GLIBCXX_TSAN && __has_include(<sanitizer/tsan_interface.h>)
│ │ │ +
37#include <sanitizer/tsan_interface.h>
│ │ │ +
38#define _GLIBCXX_TSAN_MUTEX_DESTROY(X) \
│ │ │ +
39 __tsan_mutex_destroy(X, __tsan_mutex_not_static)
│ │ │ +
40#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK(X) \
│ │ │ +
41 __tsan_mutex_pre_lock(X, __tsan_mutex_not_static|__tsan_mutex_try_lock)
│ │ │ +
42#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED(X) __tsan_mutex_post_lock(X, \
│ │ │ +
43 __tsan_mutex_not_static|__tsan_mutex_try_lock_failed, 0)
│ │ │ +
44#define _GLIBCXX_TSAN_MUTEX_LOCKED(X) \
│ │ │ +
45 __tsan_mutex_post_lock(X, __tsan_mutex_not_static, 0)
│ │ │ +
46#define _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(X) __tsan_mutex_pre_unlock(X, 0)
│ │ │ +
47#define _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(X) __tsan_mutex_post_unlock(X, 0)
│ │ │ +
48#define _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(X) __tsan_mutex_pre_signal(X, 0)
│ │ │ +
49#define _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(X) __tsan_mutex_post_signal(X, 0)
│ │ │ +
50#else
│ │ │ +
51#define _GLIBCXX_TSAN_MUTEX_DESTROY(X)
│ │ │ +
52#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK(X)
│ │ │ +
53#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED(X)
│ │ │ +
54#define _GLIBCXX_TSAN_MUTEX_LOCKED(X)
│ │ │ +
55#define _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(X)
│ │ │ +
56#define _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(X)
│ │ │ +
57#define _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(X)
│ │ │ +
58#define _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(X)
│ │ │ +
59#endif
│ │ │ +
60
│ │ │ +
61namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
62{
│ │ │ +
63_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
64
│ │ │ +
65 /**
│ │ │ +
66 * @addtogroup pointer_abstractions
│ │ │ +
67 * @relates shared_ptr
│ │ │ +
68 * @{
│ │ │ +
69 */
│ │ │ +
70
│ │ │ +
71 /// @cond undocumented
│ │ │ +
72
│ │ │ +
73 struct _Sp_locker
│ │ │ +
74 {
│ │ │ +
75 _Sp_locker(const _Sp_locker&) = delete;
│ │ │ +
76 _Sp_locker& operator=(const _Sp_locker&) = delete;
│ │ │ +
77
│ │ │ +
78#ifdef __GTHREADS
│ │ │ +
79 explicit
│ │ │ +
80 _Sp_locker(const void*) noexcept;
│ │ │ +
81 _Sp_locker(const void*, const void*) noexcept;
│ │ │ +
82 ~_Sp_locker();
│ │ │ +
83
│ │ │ +
84 private:
│ │ │ +
85 unsigned char _M_key1;
│ │ │ +
86 unsigned char _M_key2;
│ │ │ +
87#else
│ │ │ +
88 explicit _Sp_locker(const void*, const void* = nullptr) { }
│ │ │ +
89#endif
│ │ │ +
90 };
│ │ │ +
91
│ │ │ +
92 /// @endcond
│ │ │ +
93
│ │ │ +
94 /**
│ │ │ +
95 * @brief Report whether shared_ptr atomic operations are lock-free.
│ │ │ +
96 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
97 * @return True if atomic access to @c *__p is lock-free, false otherwise.
│ │ │ +
98 * @{
│ │ │ +
99 */
│ │ │ +
100 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
101 inline bool
│ │ │ +
│ │ │ +
102 atomic_is_lock_free(const __shared_ptr<_Tp, _Lp>*)
│ │ │ +
103 {
│ │ │ +
104#ifdef __GTHREADS
│ │ │ +
105 return __gthread_active_p() == 0;
│ │ │ +
106#else
│ │ │ +
107 return true;
│ │ │ +
108#endif
│ │ │ +
109 }
│ │ │ +
│ │ │ +
110
│ │ │ +
111 template<typename _Tp>
│ │ │ +
112 inline bool
│ │ │ +
│ │ │ +
113 atomic_is_lock_free(const shared_ptr<_Tp>* __p)
│ │ │ + │ │ │ +
│ │ │ +
115
│ │ │ +
116 /// @}
│ │ │ +
117
│ │ │ +
118 /**
│ │ │ +
119 * @brief Atomic load for shared_ptr objects.
│ │ │ +
120 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
121 * @return @c *__p
│ │ │ +
122 *
│ │ │ +
123 * The memory order shall not be `memory_order_release` or
│ │ │ +
124 * `memory_order_acq_rel`.
│ │ │ +
125 * @{
│ │ │ +
126 */
│ │ │ +
127 template<typename _Tp>
│ │ │ +
128 inline shared_ptr<_Tp>
│ │ │ +
│ │ │ +
129 atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order)
│ │ │ +
130 {
│ │ │ +
131 _Sp_locker __lock{__p};
│ │ │ +
132 return *__p;
│ │ │ +
133 }
│ │ │ +
│ │ │ +
134
│ │ │ +
135 template<typename _Tp>
│ │ │ +
136 inline shared_ptr<_Tp>
│ │ │ +
│ │ │ +
137 atomic_load(const shared_ptr<_Tp>* __p)
│ │ │ +
138 { return std::atomic_load_explicit(__p, memory_order_seq_cst); }
│ │ │ +
│ │ │ +
139
│ │ │ +
140 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
141 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ +
142 atomic_load_explicit(const __shared_ptr<_Tp, _Lp>* __p, memory_order)
│ │ │ +
143 {
│ │ │ +
144 _Sp_locker __lock{__p};
│ │ │ +
145 return *__p;
│ │ │ +
146 }
│ │ │ +
│ │ │ +
147
│ │ │ +
148 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
149 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ +
150 atomic_load(const __shared_ptr<_Tp, _Lp>* __p)
│ │ │ +
151 { return std::atomic_load_explicit(__p, memory_order_seq_cst); }
│ │ │ +
│ │ │ +
152 /// @}
│ │ │ +
153
│ │ │ +
154 /**
│ │ │ +
155 * @brief Atomic store for shared_ptr objects.
│ │ │ +
156 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
157 * @param __r The value to store.
│ │ │ +
158 *
│ │ │ +
159 * The memory order shall not be `memory_order_acquire` or
│ │ │ +
160 * `memory_order_acq_rel`.
│ │ │ +
161 * @{
│ │ │ +
162 */
│ │ │ +
163 template<typename _Tp>
│ │ │ +
164 inline void
│ │ │ +
│ │ │ +
165 atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r,
│ │ │ + │ │ │ +
167 {
│ │ │ +
168 _Sp_locker __lock{__p};
│ │ │ +
169 __p->swap(__r); // use swap so that **__p not destroyed while lock held
│ │ │ +
170 }
│ │ │ +
│ │ │ +
171
│ │ │ +
172 template<typename _Tp>
│ │ │ +
173 inline void
│ │ │ +
│ │ │ +
174 atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
│ │ │ +
175 { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); }
│ │ │ +
│ │ │ +
176
│ │ │ +
177 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
178 inline void
│ │ │ +
│ │ │ +
179 atomic_store_explicit(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ + │ │ │ + │ │ │ +
182 {
│ │ │ +
183 _Sp_locker __lock{__p};
│ │ │ +
184 __p->swap(__r); // use swap so that **__p not destroyed while lock held
│ │ │ +
185 }
│ │ │ +
│ │ │ +
186
│ │ │ +
187 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
188 inline void
│ │ │ +
│ │ │ + │ │ │ +
190 { std::atomic_store_explicit(__p, std::move(__r), memory_order_seq_cst); }
│ │ │ +
│ │ │ +
191 /// @}
│ │ │ +
192
│ │ │ +
193 /**
│ │ │ +
194 * @brief Atomic exchange for shared_ptr objects.
│ │ │ +
195 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
196 * @param __r New value to store in `*__p`.
│ │ │ +
197 * @return The original value of `*__p`
│ │ │ +
198 * @{
│ │ │ +
199 */
│ │ │ +
200 template<typename _Tp>
│ │ │ +
201 inline shared_ptr<_Tp>
│ │ │ +
│ │ │ +
202 atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r,
│ │ │ + │ │ │ +
204 {
│ │ │ +
205 _Sp_locker __lock{__p};
│ │ │ +
206 __p->swap(__r);
│ │ │ +
207 return __r;
│ │ │ +
208 }
│ │ │ +
│ │ │ +
209
│ │ │ +
210 template<typename _Tp>
│ │ │ +
211 inline shared_ptr<_Tp>
│ │ │ +
│ │ │ +
212 atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
│ │ │ +
213 {
│ │ │ +
214 return std::atomic_exchange_explicit(__p, std::move(__r),
│ │ │ +
215 memory_order_seq_cst);
│ │ │ +
216 }
│ │ │ +
│ │ │ +
217
│ │ │ +
218 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
219 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ +
220 atomic_exchange_explicit(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ + │ │ │ + │ │ │ +
223 {
│ │ │ +
224 _Sp_locker __lock{__p};
│ │ │ +
225 __p->swap(__r);
│ │ │ +
226 return __r;
│ │ │ +
227 }
│ │ │ +
│ │ │ +
228
│ │ │ +
229 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
230 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ + │ │ │ +
232 {
│ │ │ +
233 return std::atomic_exchange_explicit(__p, std::move(__r),
│ │ │ +
234 memory_order_seq_cst);
│ │ │ +
235 }
│ │ │ +
│ │ │ +
236 /// @}
│ │ │ +
237
│ │ │ +
238 /**
│ │ │ +
239 * @brief Atomic compare-and-swap for shared_ptr objects.
│ │ │ +
240 * @param __p A non-null pointer to a shared_ptr object.
│ │ │ +
241 * @param __v A non-null pointer to a shared_ptr object.
│ │ │ +
242 * @param __w A non-null pointer to a shared_ptr object.
│ │ │ +
243 * @return True if `*__p` was equivalent to `*__v`, false otherwise.
│ │ │ +
244 *
│ │ │ +
245 * The memory order for failure shall not be `memory_order_release` or
│ │ │ +
246 * `memory_order_acq_rel`.
│ │ │ +
247 * @{
│ │ │ +
248 */
│ │ │ +
249 template<typename _Tp>
│ │ │ +
250 bool
│ │ │ +
│ │ │ +
251 atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p,
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
256 {
│ │ │ +
257 shared_ptr<_Tp> __x; // goes out of scope after __lock
│ │ │ +
258 _Sp_locker __lock{__p, __v};
│ │ │ + │ │ │ +
260 if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p))
│ │ │ +
261 {
│ │ │ +
262 __x = std::move(*__p);
│ │ │ +
263 *__p = std::move(__w);
│ │ │ +
264 return true;
│ │ │ +
265 }
│ │ │ +
266 __x = std::move(*__v);
│ │ │ +
267 *__v = *__p;
│ │ │ +
268 return false;
│ │ │ +
269 }
│ │ │ +
│ │ │ +
270
│ │ │ +
271 template<typename _Tp>
│ │ │ +
272 inline bool
│ │ │ +
│ │ │ +
273 atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
│ │ │ + │ │ │ +
275 {
│ │ │ +
276 return std::atomic_compare_exchange_strong_explicit(__p, __v,
│ │ │ +
277 std::move(__w), memory_order_seq_cst, memory_order_seq_cst);
│ │ │ +
278 }
│ │ │ +
│ │ │ +
279
│ │ │ +
280 template<typename _Tp>
│ │ │ +
281 inline bool
│ │ │ +
│ │ │ +
282 atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p,
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
287 {
│ │ │ +
288 return std::atomic_compare_exchange_strong_explicit(__p, __v,
│ │ │ + │ │ │ +
290 }
│ │ │ +
│ │ │ +
291
│ │ │ +
292 template<typename _Tp>
│ │ │ +
293 inline bool
│ │ │ +
│ │ │ +
294 atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
│ │ │ + │ │ │ +
296 {
│ │ │ +
297 return std::atomic_compare_exchange_weak_explicit(__p, __v,
│ │ │ +
298 std::move(__w), memory_order_seq_cst, memory_order_seq_cst);
│ │ │ +
299 }
│ │ │ +
│ │ │ +
300
│ │ │ +
301 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
302 bool
│ │ │ +
│ │ │ +
303 atomic_compare_exchange_strong_explicit(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
308 {
│ │ │ +
309 __shared_ptr<_Tp, _Lp> __x; // goes out of scope after __lock
│ │ │ +
310 _Sp_locker __lock{__p, __v};
│ │ │ + │ │ │ +
312 if (*__p == *__v && !__less(*__p, *__v) && !__less(*__v, *__p))
│ │ │ +
313 {
│ │ │ +
314 __x = std::move(*__p);
│ │ │ +
315 *__p = std::move(__w);
│ │ │ +
316 return true;
│ │ │ +
317 }
│ │ │ +
318 __x = std::move(*__v);
│ │ │ +
319 *__v = *__p;
│ │ │ +
320 return false;
│ │ │ +
321 }
│ │ │ +
│ │ │ +
322
│ │ │ +
323 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
324 inline bool
│ │ │ +
│ │ │ +
325 atomic_compare_exchange_strong(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ + │ │ │ + │ │ │ +
328 {
│ │ │ +
329 return std::atomic_compare_exchange_strong_explicit(__p, __v,
│ │ │ +
330 std::move(__w), memory_order_seq_cst, memory_order_seq_cst);
│ │ │ +
331 }
│ │ │ +
│ │ │ +
332
│ │ │ +
333 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
334 inline bool
│ │ │ +
│ │ │ +
335 atomic_compare_exchange_weak_explicit(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
340 {
│ │ │ +
341 return std::atomic_compare_exchange_strong_explicit(__p, __v,
│ │ │ + │ │ │ +
343 }
│ │ │ +
│ │ │ +
344
│ │ │ +
345 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
346 inline bool
│ │ │ +
│ │ │ +
347 atomic_compare_exchange_weak(__shared_ptr<_Tp, _Lp>* __p,
│ │ │ + │ │ │ + │ │ │ +
350 {
│ │ │ +
351 return std::atomic_compare_exchange_weak_explicit(__p, __v,
│ │ │ +
352 std::move(__w), memory_order_seq_cst, memory_order_seq_cst);
│ │ │ +
353 }
│ │ │ +
│ │ │ +
354 /// @}
│ │ │ +
355
│ │ │ +
356 /// @} group pointer_abstractions
│ │ │ +
357
│ │ │ +
358#if __cplusplus >= 202002L
│ │ │ +
359# define __cpp_lib_atomic_shared_ptr 201711L
│ │ │ +
360 template<typename _Tp>
│ │ │ +
361 struct atomic;
│ │ │ +
362
│ │ │ +
363 /**
│ │ │ +
364 * @addtogroup pointer_abstractions
│ │ │ +
365 * @relates shared_ptr
│ │ │ +
366 * @{
│ │ │ +
367 */
│ │ │ +
368
│ │ │ +
369 template<typename _Up>
│ │ │ +
370 static constexpr bool __is_shared_ptr = false;
│ │ │ +
371 template<typename _Up>
│ │ │ +
372 static constexpr bool __is_shared_ptr<shared_ptr<_Up>> = true;
│ │ │ +
373
│ │ │ +
374 template<typename _Tp>
│ │ │ +
375 class _Sp_atomic
│ │ │ +
376 {
│ │ │ +
377 using value_type = _Tp;
│ │ │ +
378
│ │ │ +
379 friend struct atomic<_Tp>;
│ │ │ +
380
│ │ │ +
381 // An atomic version of __shared_count<> and __weak_count<>.
│ │ │ +
382 // Stores a _Sp_counted_base<>* but uses the LSB as a lock.
│ │ │ +
383 struct _Atomic_count
│ │ │ +
384 {
│ │ │ +
385 // Either __shared_count<> or __weak_count<>
│ │ │ +
386 using __count_type = decltype(_Tp::_M_refcount);
│ │ │ +
387
│ │ │ +
388 // _Sp_counted_base<>*
│ │ │ +
389 using pointer = decltype(__count_type::_M_pi);
│ │ │ +
390
│ │ │ +
391 // Ensure we can use the LSB as the lock bit.
│ │ │ +
392 static_assert(alignof(remove_pointer_t<pointer>) > 1);
│ │ │ +
393
│ │ │ +
394 constexpr _Atomic_count() noexcept = default;
│ │ │ +
395
│ │ │ +
396 explicit
│ │ │ +
397 _Atomic_count(__count_type&& __c) noexcept
│ │ │ +
398 : _M_val(reinterpret_cast<uintptr_t>(__c._M_pi))
│ │ │ +
399 {
│ │ │ +
400 __c._M_pi = nullptr;
│ │ │ +
401 }
│ │ │ +
402
│ │ │ +
403 ~_Atomic_count()
│ │ │ +
404 {
│ │ │ +
405 auto __val = _M_val.load(memory_order_relaxed);
│ │ │ +
406 _GLIBCXX_TSAN_MUTEX_DESTROY(&_M_val);
│ │ │ +
407 __glibcxx_assert(!(__val & _S_lock_bit));
│ │ │ +
408 if (auto __pi = reinterpret_cast<pointer>(__val))
│ │ │ +
409 {
│ │ │ +
410 if constexpr (__is_shared_ptr<_Tp>)
│ │ │ +
411 __pi->_M_release();
│ │ │ +
412 else
│ │ │ +
413 __pi->_M_weak_release();
│ │ │ +
414 }
│ │ │ +
415 }
│ │ │ +
416
│ │ │ +
417 _Atomic_count(const _Atomic_count&) = delete;
│ │ │ +
418 _Atomic_count& operator=(const _Atomic_count&) = delete;
│ │ │ +
419
│ │ │ +
420 // Precondition: Caller does not hold lock!
│ │ │ +
421 // Returns the raw pointer value without the lock bit set.
│ │ │ +
422 pointer
│ │ │ +
423 lock(memory_order __o) const noexcept
│ │ │ +
424 {
│ │ │ +
425 // To acquire the lock we flip the LSB from 0 to 1.
│ │ │ +
426
│ │ │ +
427 auto __current = _M_val.load(memory_order_relaxed);
│ │ │ +
428 while (__current & _S_lock_bit)
│ │ │ +
429 {
│ │ │ +
430#if __cpp_lib_atomic_wait
│ │ │ +
431 __detail::__thread_relax();
│ │ │ +
432#endif
│ │ │ +
433 __current = _M_val.load(memory_order_relaxed);
│ │ │ +
434 }
│ │ │ +
435
│ │ │ +
436 _GLIBCXX_TSAN_MUTEX_TRY_LOCK(&_M_val);
│ │ │ +
437
│ │ │ +
438 while (!_M_val.compare_exchange_strong(__current,
│ │ │ +
439 __current | _S_lock_bit,
│ │ │ +
440 __o,
│ │ │ +
441 memory_order_relaxed))
│ │ │ +
442 {
│ │ │ +
443 _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED(&_M_val);
│ │ │ +
444#if __cpp_lib_atomic_wait
│ │ │ +
445 __detail::__thread_relax();
│ │ │ +
446#endif
│ │ │ +
447 __current = __current & ~_S_lock_bit;
│ │ │ +
448 _GLIBCXX_TSAN_MUTEX_TRY_LOCK(&_M_val);
│ │ │ +
449 }
│ │ │ +
450 _GLIBCXX_TSAN_MUTEX_LOCKED(&_M_val);
│ │ │ +
451 return reinterpret_cast<pointer>(__current);
│ │ │ +
452 }
│ │ │ +
453
│ │ │ +
454 // Precondition: caller holds lock!
│ │ │ +
455 void
│ │ │ +
456 unlock(memory_order __o) const noexcept
│ │ │ +
457 {
│ │ │ +
458 _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(&_M_val);
│ │ │ +
459 _M_val.fetch_sub(1, __o);
│ │ │ +
460 _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(&_M_val);
│ │ │ +
461 }
│ │ │ +
462
│ │ │ +
463 // Swaps the values of *this and __c, and unlocks *this.
│ │ │ +
464 // Precondition: caller holds lock!
│ │ │ +
465 void
│ │ │ +
466 _M_swap_unlock(__count_type& __c, memory_order __o) noexcept
│ │ │ +
467 {
│ │ │ +
468 if (__o != memory_order_seq_cst)
│ │ │ +
469 __o = memory_order_release;
│ │ │ +
470 auto __x = reinterpret_cast<uintptr_t>(__c._M_pi);
│ │ │ +
471 _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(&_M_val);
│ │ │ +
472 __x = _M_val.exchange(__x, __o);
│ │ │ +
473 _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(&_M_val);
│ │ │ +
474 __c._M_pi = reinterpret_cast<pointer>(__x & ~_S_lock_bit);
│ │ │ +
475 }
│ │ │ +
476
│ │ │ +
477#if __cpp_lib_atomic_wait
│ │ │ +
478 // Precondition: caller holds lock!
│ │ │ +
479 void
│ │ │ +
480 _M_wait_unlock(memory_order __o) const noexcept
│ │ │ +
481 {
│ │ │ +
482 _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(&_M_val);
│ │ │ +
483 auto __v = _M_val.fetch_sub(1, memory_order_relaxed);
│ │ │ +
484 _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(&_M_val);
│ │ │ +
485 _M_val.wait(__v & ~_S_lock_bit, __o);
│ │ │ +
486 }
│ │ │ +
487
│ │ │ +
488 void
│ │ │ +
489 notify_one() noexcept
│ │ │ +
490 {
│ │ │ +
491 _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(&_M_val);
│ │ │ +
492 _M_val.notify_one();
│ │ │ +
493 _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(&_M_val);
│ │ │ +
494 }
│ │ │ +
495
│ │ │ +
496 void
│ │ │ +
497 notify_all() noexcept
│ │ │ +
498 {
│ │ │ +
499 _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(&_M_val);
│ │ │ +
500 _M_val.notify_all();
│ │ │ +
501 _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(&_M_val);
│ │ │ +
502 }
│ │ │ +
503#endif
│ │ │ +
504
│ │ │ +
505 private:
│ │ │ +
506 mutable __atomic_base<uintptr_t> _M_val{0};
│ │ │ +
507 static constexpr uintptr_t _S_lock_bit{1};
│ │ │ +
508 };
│ │ │ +
509
│ │ │ +
510 typename _Tp::element_type* _M_ptr = nullptr;
│ │ │ +
511 _Atomic_count _M_refcount;
│ │ │ +
512
│ │ │ +
513 static typename _Atomic_count::pointer
│ │ │ +
514 _S_add_ref(typename _Atomic_count::pointer __p)
│ │ │ +
515 {
│ │ │ +
516 if (__p)
│ │ │ +
517 {
│ │ │ +
518 if constexpr (__is_shared_ptr<_Tp>)
│ │ │ +
519 __p->_M_add_ref_copy();
│ │ │ +
520 else
│ │ │ +
521 __p->_M_weak_add_ref();
│ │ │ +
522 }
│ │ │ +
523 return __p;
│ │ │ +
524 }
│ │ │ +
525
│ │ │ +
526 constexpr _Sp_atomic() noexcept = default;
│ │ │ +
527
│ │ │ +
528 explicit
│ │ │ +
529 _Sp_atomic(value_type __r) noexcept
│ │ │ +
530 : _M_ptr(__r._M_ptr), _M_refcount(std::move(__r._M_refcount))
│ │ │ +
531 { }
│ │ │ +
532
│ │ │ +
533 ~_Sp_atomic() = default;
│ │ │ +
534
│ │ │ +
535 _Sp_atomic(const _Sp_atomic&) = delete;
│ │ │ +
536 void operator=(const _Sp_atomic&) = delete;
│ │ │ +
537
│ │ │ +
538 value_type
│ │ │ +
539 load(memory_order __o) const noexcept
│ │ │ +
540 {
│ │ │ +
541 __glibcxx_assert(__o != memory_order_release
│ │ │ +
542 && __o != memory_order_acq_rel);
│ │ │ +
543 // Ensure that the correct value of _M_ptr is visible after locking.,
│ │ │ +
544 // by upgrading relaxed or consume to acquire.
│ │ │ +
545 if (__o != memory_order_seq_cst)
│ │ │ +
546 __o = memory_order_acquire;
│ │ │ +
547
│ │ │ +
548 value_type __ret;
│ │ │ +
549 auto __pi = _M_refcount.lock(__o);
│ │ │ +
550 __ret._M_ptr = _M_ptr;
│ │ │ +
551 __ret._M_refcount._M_pi = _S_add_ref(__pi);
│ │ │ +
552 _M_refcount.unlock(memory_order_relaxed);
│ │ │ +
553 return __ret;
│ │ │ +
554 }
│ │ │ +
555
│ │ │ +
556 void
│ │ │ +
557 swap(value_type& __r, memory_order __o) noexcept
│ │ │ +
558 {
│ │ │ +
559 _M_refcount.lock(memory_order_acquire);
│ │ │ +
560 std::swap(_M_ptr, __r._M_ptr);
│ │ │ +
561 _M_refcount._M_swap_unlock(__r._M_refcount, __o);
│ │ │ +
562 }
│ │ │ +
563
│ │ │ +
564 bool
│ │ │ +
565 compare_exchange_strong(value_type& __expected, value_type __desired,
│ │ │ +
566 memory_order __o, memory_order __o2) noexcept
│ │ │ +
567 {
│ │ │ +
568 bool __result = true;
│ │ │ +
569 auto __pi = _M_refcount.lock(memory_order_acquire);
│ │ │ +
570 if (_M_ptr == __expected._M_ptr
│ │ │ +
571 && __pi == __expected._M_refcount._M_pi)
│ │ │ +
572 {
│ │ │ +
573 _M_ptr = __desired._M_ptr;
│ │ │ +
574 _M_refcount._M_swap_unlock(__desired._M_refcount, __o);
│ │ │ +
575 }
│ │ │ +
576 else
│ │ │ +
577 {
│ │ │ +
578 _Tp __sink = std::move(__expected);
│ │ │ +
579 __expected._M_ptr = _M_ptr;
│ │ │ +
580 __expected._M_refcount._M_pi = _S_add_ref(__pi);
│ │ │ +
581 _M_refcount.unlock(__o2);
│ │ │ +
582 __result = false;
│ │ │ +
583 }
│ │ │ +
584 return __result;
│ │ │ +
585 }
│ │ │ +
586
│ │ │ +
587#if __cpp_lib_atomic_wait
│ │ │ +
588 void
│ │ │ +
589 wait(value_type __old, memory_order __o) const noexcept
│ │ │ +
590 {
│ │ │ +
591 auto __pi = _M_refcount.lock(memory_order_acquire);
│ │ │ +
592 if (_M_ptr == __old._M_ptr && __pi == __old._M_refcount._M_pi)
│ │ │ +
593 _M_refcount._M_wait_unlock(__o);
│ │ │ +
594 else
│ │ │ +
595 _M_refcount.unlock(memory_order_relaxed);
│ │ │ +
596 }
│ │ │ +
597
│ │ │ +
598 void
│ │ │ +
599 notify_one() noexcept
│ │ │ +
600 {
│ │ │ +
601 _M_refcount.notify_one();
│ │ │ +
602 }
│ │ │ +
603
│ │ │ +
604 void
│ │ │ +
605 notify_all() noexcept
│ │ │ +
606 {
│ │ │ +
607 _M_refcount.notify_all();
│ │ │ +
608 }
│ │ │ +
609#endif
│ │ │ +
610 };
│ │ │ +
611
│ │ │ +
612 template<typename _Tp>
│ │ │ +
613 struct atomic<shared_ptr<_Tp>>
│ │ │ +
614 {
│ │ │ +
615 public:
│ │ │ +
616 using value_type = shared_ptr<_Tp>;
│ │ │ +
617
│ │ │ +
618 static constexpr bool is_always_lock_free = false;
│ │ │ +
619
│ │ │ +
620 bool
│ │ │ +
621 is_lock_free() const noexcept
│ │ │ +
622 { return false; }
│ │ │ +
623
│ │ │ +
624 constexpr atomic() noexcept = default;
│ │ │ +
625
│ │ │ +
626 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
627 // 3661. constinit atomic<shared_ptr<T>> a(nullptr); should work
│ │ │ +
628 constexpr atomic(nullptr_t) noexcept : atomic() { }
│ │ │ +
629
│ │ │ +
630 atomic(shared_ptr<_Tp> __r) noexcept
│ │ │ +
631 : _M_impl(std::move(__r))
│ │ │ +
632 { }
│ │ │ +
633
│ │ │ +
634 atomic(const atomic&) = delete;
│ │ │ +
635 void operator=(const atomic&) = delete;
│ │ │ +
636
│ │ │ +
637 shared_ptr<_Tp>
│ │ │ +
638 load(memory_order __o = memory_order_seq_cst) const noexcept
│ │ │ +
639 { return _M_impl.load(__o); }
│ │ │ +
640
│ │ │ +
641 operator shared_ptr<_Tp>() const noexcept
│ │ │ +
642 { return _M_impl.load(memory_order_seq_cst); }
│ │ │ +
643
│ │ │ +
644 void
│ │ │ +
645 store(shared_ptr<_Tp> __desired,
│ │ │ +
646 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
647 { _M_impl.swap(__desired, __o); }
│ │ │ +
648
│ │ │ +
649 void
│ │ │ +
650 operator=(shared_ptr<_Tp> __desired) noexcept
│ │ │ +
651 { _M_impl.swap(__desired, memory_order_seq_cst); }
│ │ │ +
652
│ │ │ +
653 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
654 // 3893. LWG 3661 broke atomic<shared_ptr<T>> a; a = nullptr;
│ │ │ +
655 void
│ │ │ +
656 operator=(nullptr_t) noexcept
│ │ │ +
657 { store(nullptr); }
│ │ │ +
658
│ │ │ +
659 shared_ptr<_Tp>
│ │ │ +
660 exchange(shared_ptr<_Tp> __desired,
│ │ │ +
661 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
662 {
│ │ │ +
663 _M_impl.swap(__desired, __o);
│ │ │ +
664 return __desired;
│ │ │ +
665 }
│ │ │ +
666
│ │ │ +
667 bool
│ │ │ +
668 compare_exchange_strong(shared_ptr<_Tp>& __expected,
│ │ │ +
669 shared_ptr<_Tp> __desired,
│ │ │ +
670 memory_order __o, memory_order __o2) noexcept
│ │ │ +
671 {
│ │ │ +
672 return _M_impl.compare_exchange_strong(__expected, __desired, __o, __o2);
│ │ │ +
673 }
│ │ │ +
674
│ │ │ +
675 bool
│ │ │ +
676 compare_exchange_strong(value_type& __expected, value_type __desired,
│ │ │ +
677 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
678 {
│ │ │ +
679 memory_order __o2;
│ │ │ +
680 switch (__o)
│ │ │ +
681 {
│ │ │ +
682 case memory_order_acq_rel:
│ │ │ +
683 __o2 = memory_order_acquire;
│ │ │ +
684 break;
│ │ │ +
685 case memory_order_release:
│ │ │ +
686 __o2 = memory_order_relaxed;
│ │ │ +
687 break;
│ │ │ +
688 default:
│ │ │ +
689 __o2 = __o;
│ │ │ +
690 }
│ │ │ +
691 return compare_exchange_strong(__expected, std::move(__desired),
│ │ │ +
692 __o, __o2);
│ │ │ +
693 }
│ │ │ +
694
│ │ │ +
695 bool
│ │ │ +
696 compare_exchange_weak(value_type& __expected, value_type __desired,
│ │ │ +
697 memory_order __o, memory_order __o2) noexcept
│ │ │ +
698 {
│ │ │ +
699 return compare_exchange_strong(__expected, std::move(__desired),
│ │ │ +
700 __o, __o2);
│ │ │ +
701 }
│ │ │ +
702
│ │ │ +
703 bool
│ │ │ +
704 compare_exchange_weak(value_type& __expected, value_type __desired,
│ │ │ +
705 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
706 {
│ │ │ +
707 return compare_exchange_strong(__expected, std::move(__desired), __o);
│ │ │ +
708 }
│ │ │ +
709
│ │ │ +
710#if __cpp_lib_atomic_wait
│ │ │ +
711 void
│ │ │ +
712 wait(value_type __old,
│ │ │ +
713 memory_order __o = memory_order_seq_cst) const noexcept
│ │ │ +
714 {
│ │ │ +
715 _M_impl.wait(std::move(__old), __o);
│ │ │ +
716 }
│ │ │ +
717
│ │ │ +
718 void
│ │ │ +
719 notify_one() noexcept
│ │ │ +
720 {
│ │ │ +
721 _M_impl.notify_one();
│ │ │ +
722 }
│ │ │ +
723
│ │ │ +
724 void
│ │ │ +
725 notify_all() noexcept
│ │ │ +
726 {
│ │ │ +
727 _M_impl.notify_all();
│ │ │ +
728 }
│ │ │ +
729#endif
│ │ │ +
730
│ │ │ +
731 private:
│ │ │ +
732 _Sp_atomic<shared_ptr<_Tp>> _M_impl;
│ │ │ +
733 };
│ │ │ +
734
│ │ │ +
735 template<typename _Tp>
│ │ │ +
736 struct atomic<weak_ptr<_Tp>>
│ │ │ +
737 {
│ │ │ +
738 public:
│ │ │ +
739 using value_type = weak_ptr<_Tp>;
│ │ │ +
740
│ │ │ +
741 static constexpr bool is_always_lock_free = false;
│ │ │ +
742
│ │ │ +
743 bool
│ │ │ +
744 is_lock_free() const noexcept
│ │ │ +
745 { return false; }
│ │ │ +
746
│ │ │ +
747 constexpr atomic() noexcept = default;
│ │ │ +
748
│ │ │ +
749 atomic(weak_ptr<_Tp> __r) noexcept
│ │ │ +
750 : _M_impl(move(__r))
│ │ │ +
751 { }
│ │ │ +
752
│ │ │ +
753 atomic(const atomic&) = delete;
│ │ │ +
754 void operator=(const atomic&) = delete;
│ │ │ +
755
│ │ │ +
756 weak_ptr<_Tp>
│ │ │ +
757 load(memory_order __o = memory_order_seq_cst) const noexcept
│ │ │ +
758 { return _M_impl.load(__o); }
│ │ │ +
759
│ │ │ +
760 operator weak_ptr<_Tp>() const noexcept
│ │ │ +
761 { return _M_impl.load(memory_order_seq_cst); }
│ │ │ +
762
│ │ │ +
763 void
│ │ │ +
764 store(weak_ptr<_Tp> __desired,
│ │ │ +
765 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
766 { _M_impl.swap(__desired, __o); }
│ │ │ +
767
│ │ │ +
768 void
│ │ │ +
769 operator=(weak_ptr<_Tp> __desired) noexcept
│ │ │ +
770 { _M_impl.swap(__desired, memory_order_seq_cst); }
│ │ │ +
771
│ │ │ +
772 weak_ptr<_Tp>
│ │ │ +
773 exchange(weak_ptr<_Tp> __desired,
│ │ │ +
774 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
775 {
│ │ │ +
776 _M_impl.swap(__desired, __o);
│ │ │ +
777 return __desired;
│ │ │ +
778 }
│ │ │ +
779
│ │ │ +
780 bool
│ │ │ +
781 compare_exchange_strong(weak_ptr<_Tp>& __expected,
│ │ │ +
782 weak_ptr<_Tp> __desired,
│ │ │ +
783 memory_order __o, memory_order __o2) noexcept
│ │ │ +
784 {
│ │ │ +
785 return _M_impl.compare_exchange_strong(__expected, __desired, __o, __o2);
│ │ │ +
786 }
│ │ │ +
787
│ │ │ +
788 bool
│ │ │ +
789 compare_exchange_strong(value_type& __expected, value_type __desired,
│ │ │ +
790 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
791 {
│ │ │ +
792 memory_order __o2;
│ │ │ +
793 switch (__o)
│ │ │ +
794 {
│ │ │ +
795 case memory_order_acq_rel:
│ │ │ +
796 __o2 = memory_order_acquire;
│ │ │ +
797 break;
│ │ │ +
798 case memory_order_release:
│ │ │ +
799 __o2 = memory_order_relaxed;
│ │ │ +
800 break;
│ │ │ +
801 default:
│ │ │ +
802 __o2 = __o;
│ │ │ +
803 }
│ │ │ +
804 return compare_exchange_strong(__expected, std::move(__desired),
│ │ │ +
805 __o, __o2);
│ │ │ +
806 }
│ │ │ +
807
│ │ │ +
808 bool
│ │ │ +
809 compare_exchange_weak(value_type& __expected, value_type __desired,
│ │ │ +
810 memory_order __o, memory_order __o2) noexcept
│ │ │ +
811 {
│ │ │ +
812 return compare_exchange_strong(__expected, std::move(__desired),
│ │ │ +
813 __o, __o2);
│ │ │ +
814 }
│ │ │ +
815
│ │ │ +
816 bool
│ │ │ +
817 compare_exchange_weak(value_type& __expected, value_type __desired,
│ │ │ +
818 memory_order __o = memory_order_seq_cst) noexcept
│ │ │ +
819 {
│ │ │ +
820 return compare_exchange_strong(__expected, std::move(__desired), __o);
│ │ │ +
821 }
│ │ │ +
822
│ │ │ +
823#if __cpp_lib_atomic_wait
│ │ │ +
824 void
│ │ │ +
825 wait(value_type __old,
│ │ │ +
826 memory_order __o = memory_order_seq_cst) const noexcept
│ │ │ +
827 {
│ │ │ +
828 _M_impl.wait(std::move(__old), __o);
│ │ │ +
829 }
│ │ │ +
830
│ │ │ +
831 void
│ │ │ +
832 notify_one() noexcept
│ │ │ +
833 {
│ │ │ +
834 _M_impl.notify_one();
│ │ │ +
835 }
│ │ │ +
836
│ │ │ +
837 void
│ │ │ +
838 notify_all() noexcept
│ │ │ +
839 {
│ │ │ +
840 _M_impl.notify_all();
│ │ │ +
841 }
│ │ │ +
842#endif
│ │ │ +
843
│ │ │ +
844 private:
│ │ │ +
845 _Sp_atomic<weak_ptr<_Tp>> _M_impl;
│ │ │ +
846 };
│ │ │ +
847 /// @} group pointer_abstractions
│ │ │ +
848#endif // C++20
│ │ │ +
849
│ │ │ +
850_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
851} // namespace
│ │ │ +
852
│ │ │ +
853#endif // _SHARED_PTR_ATOMIC_H
│ │ │ + │ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:97
│ │ │ +
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ +
memory_order
Enumeration for memory_order.
Definition atomic_base.h:63
│ │ │ +
void lock(_L1 &__l1, _L2 &__l2, _L3 &... __l3)
Generic lock.
Definition mutex:693
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
is_nothrow_default_constructible
Definition type_traits:1124
│ │ │ -
is_nothrow_copy_constructible
Definition type_traits:1133
│ │ │ -
Common iterator class.
│ │ │ -
Provides input iterator semantics for streams.
│ │ │ -
istream_iterator(istream_type &__s)
Construct start of input stream iterator.
│ │ │ -
constexpr istream_iterator() noexcept(/*conditional */)
Construct end of input stream iterator.
│ │ │ -
friend bool operator==(const istream_iterator &__x, const istream_iterator &__y) noexcept
Return true if the iterators refer to the same stream, or are both at end-of-stream.
│ │ │ -
Provides output iterator semantics for streams.
│ │ │ -
_CharT char_type
Public typedef.
│ │ │ -
ostream_iterator(ostream_type &__s) noexcept
Construct from an ostream.
│ │ │ -
ostream_iterator(ostream_type &__s, const _CharT *__c) noexcept
│ │ │ -
_Traits traits_type
Public typedef.
│ │ │ -
ostream_iterator & operator=(const _Tp &__value)
Writes value to underlying ostream using operator<<. If constructed with delimiter string,...
│ │ │ -
ptrdiff_t difference_type
Public typedef.
│ │ │ -
basic_ostream< _CharT, _Traits > ostream_type
Public typedef.
│ │ │ -
ostream_iterator(const ostream_iterator &__obj) noexcept
Copy constructor.
│ │ │ - │ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -stream_iterator.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// Stream iterators │ │ │ │ +1// shared_ptr atomic access -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2001-2023 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2014-2023 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,333 +21,860 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/** @file bits/stream_iterator.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{iterator} │ │ │ │ +27 * Do not attempt to use it directly. @headername{memory} │ │ │ │ 28 */ │ │ │ │ 29 │ │ │ │ -30#ifndef _STREAM_ITERATOR_H │ │ │ │ -31#define _STREAM_ITERATOR_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#include <_i_o_s_f_w_d> │ │ │ │ -36#include <_b_i_t_s_/_m_o_v_e_._h> │ │ │ │ -37#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> │ │ │ │ -38#include <_d_e_b_u_g_/_d_e_b_u_g_._h> │ │ │ │ -39 │ │ │ │ -40namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -41{ │ │ │ │ -42_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -43 │ │ │ │ -44 /** │ │ │ │ -45 * @addtogroup iterators │ │ │ │ -46 * @{ │ │ │ │ -47 */ │ │ │ │ -48 │ │ │ │ -49// Ignore warnings about std::iterator. │ │ │ │ -50#pragma GCC diagnostic push │ │ │ │ -51#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ -52 │ │ │ │ -53 /// Provides input iterator semantics for streams. │ │ │ │ -54 template, typename _Dist = ptrdiff_t> │ │ │ │ -_5_6 class _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -57 : public _i_t_e_r_a_t_o_r │ │ │ │ -58 { │ │ │ │ -59 public: │ │ │ │ -60 typedef _CharT char_type; │ │ │ │ -61 typedef _Traits traits_type; │ │ │ │ -62 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; │ │ │ │ -63 │ │ │ │ -64 private: │ │ │ │ -65 _i_s_t_r_e_a_m___t_y_p_e* _M_stream; │ │ │ │ -66 _Tp _M_value; │ │ │ │ -67 // This bool becomes false at end-of-stream. It should be sufficient to │ │ │ │ -68 // check _M_stream != nullptr instead, but historically we did not set │ │ │ │ -69 // _M_stream to null when reaching the end, so we need to keep this flag. │ │ │ │ -70 bool _M_ok; │ │ │ │ -71 │ │ │ │ -72 public: │ │ │ │ -73 /// Construct end of input stream iterator. │ │ │ │ -_7_4 ___G_L_I_B_C_X_X___C_O_N_S_T_E_X_P_R _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r() │ │ │ │ -75 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T___I_F(_i_s___n_o_t_h_r_o_w___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t_i_b_l_e<_Tp>::value) │ │ │ │ -76 : _M_stream(0), _M_value(), _M_ok(_f_a_l_s_e) {} │ │ │ │ +35// Annotations for the custom locking in atomic>. │ │ │ │ +36#if defined _GLIBCXX_TSAN && __has_include() │ │ │ │ +37#include │ │ │ │ +38#define _GLIBCXX_TSAN_MUTEX_DESTROY(X) \ │ │ │ │ +39 __tsan_mutex_destroy(X, __tsan_mutex_not_static) │ │ │ │ +40#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK(X) \ │ │ │ │ +41 __tsan_mutex_pre_lock(X, __tsan_mutex_not_static|__tsan_mutex_try_lock) │ │ │ │ +42#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED(X) __tsan_mutex_post_lock(X, \ │ │ │ │ +43 __tsan_mutex_not_static|__tsan_mutex_try_lock_failed, 0) │ │ │ │ +44#define _GLIBCXX_TSAN_MUTEX_LOCKED(X) \ │ │ │ │ +45 __tsan_mutex_post_lock(X, __tsan_mutex_not_static, 0) │ │ │ │ +46#define _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(X) __tsan_mutex_pre_unlock(X, 0) │ │ │ │ +47#define _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(X) __tsan_mutex_post_unlock(X, 0) │ │ │ │ +48#define _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(X) __tsan_mutex_pre_signal(X, 0) │ │ │ │ +49#define _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(X) __tsan_mutex_post_signal(X, 0) │ │ │ │ +50#else │ │ │ │ +51#define _GLIBCXX_TSAN_MUTEX_DESTROY(X) │ │ │ │ +52#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK(X) │ │ │ │ +53#define _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED(X) │ │ │ │ +54#define _GLIBCXX_TSAN_MUTEX_LOCKED(X) │ │ │ │ +55#define _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(X) │ │ │ │ +56#define _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(X) │ │ │ │ +57#define _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(X) │ │ │ │ +58#define _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(X) │ │ │ │ +59#endif │ │ │ │ +60 │ │ │ │ +61namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +62{ │ │ │ │ +63_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +64 │ │ │ │ +65 /** │ │ │ │ +66 * @addtogroup pointer_abstractions │ │ │ │ +67 * @relates shared_ptr │ │ │ │ +68 * @{ │ │ │ │ +69 */ │ │ │ │ +70 │ │ │ │ +71 /// @cond undocumented │ │ │ │ +72 │ │ │ │ +73 struct _Sp_locker │ │ │ │ +74 { │ │ │ │ +75 _Sp_locker(const _Sp_locker&) = delete; │ │ │ │ +76 _Sp_locker& operator=(const _Sp_locker&) = delete; │ │ │ │ 77 │ │ │ │ -78 /// Construct start of input stream iterator. │ │ │ │ -_7_9 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(_i_s_t_r_e_a_m___t_y_p_e& _____s) │ │ │ │ -80 : _M_stream(_s_t_d::_____a_d_d_r_e_s_s_o_f(_____s)), _M_ok(_t_r_u_e) │ │ │ │ -81 { _M_read(); } │ │ │ │ -82 │ │ │ │ -83 ___G_L_I_B_C_X_X___C_O_N_S_T_E_X_P_R │ │ │ │ -84 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& _____o_b_j) │ │ │ │ -85 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T___I_F(_i_s___n_o_t_h_r_o_w___c_o_p_y___c_o_n_s_t_r_u_c_t_i_b_l_e_<___T_p_>_:_:_v_a_l_u_e) │ │ │ │ -86 : _M_stream(_____o_b_j._M_stream), _M_value(_____o_b_j._M_value), │ │ │ │ -87 _M_ok(_____o_b_j._M_ok) │ │ │ │ -88 { } │ │ │ │ -89 │ │ │ │ -90#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ -91 constexpr │ │ │ │ -92 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r(default_sentinel_t) │ │ │ │ -93 noexcept(is_nothrow_default_constructible_v<_Tp>) │ │ │ │ -94 : _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r() { } │ │ │ │ -95#endif │ │ │ │ -96 │ │ │ │ -97#if __cplusplus >= 201103L │ │ │ │ -98 _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; │ │ │ │ -99 ~istream_iterator() = default; │ │ │ │ -100#endif │ │ │ │ -101 │ │ │ │ -102 _GLIBCXX_NODISCARD │ │ │ │ -103 const _Tp& │ │ │ │ -104 operator*() const _GLIBCXX_NOEXCEPT │ │ │ │ -105 { │ │ │ │ -106 __glibcxx_requires_cond(_M_ok, │ │ │ │ -107 _M_message(__gnu_debug::__msg_deref_istream) │ │ │ │ -108 ._M_iterator(*this)); │ │ │ │ -109 return _M_value; │ │ │ │ -110 } │ │ │ │ -111 │ │ │ │ -112 _GLIBCXX_NODISCARD │ │ │ │ -113 const _Tp* │ │ │ │ -114 operator->() const _GLIBCXX_NOEXCEPT │ │ │ │ -115 { return _s_t_d_:_:_____a_d_d_r_e_s_s_o_f((operator*())); } │ │ │ │ -116 │ │ │ │ -117 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ -118 operator++() │ │ │ │ -119 { │ │ │ │ -120 __glibcxx_requires_cond(_M_ok, │ │ │ │ -121 _M_message(__gnu_debug::__msg_inc_istream) │ │ │ │ -122 ._M_iterator(*this)); │ │ │ │ -123 _M_read(); │ │ │ │ -124 return *this; │ │ │ │ -125 } │ │ │ │ -126 │ │ │ │ -127 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -128 operator++(int) │ │ │ │ -129 { │ │ │ │ -130 __glibcxx_requires_cond(_M_ok, │ │ │ │ -131 _M_message(__gnu_debug::__msg_inc_istream) │ │ │ │ -132 ._M_iterator(*this)); │ │ │ │ -133 _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r __tmp = *this; │ │ │ │ -134 _M_read(); │ │ │ │ -135 return __tmp; │ │ │ │ -136 } │ │ │ │ -137 │ │ │ │ -138 private: │ │ │ │ -139 bool │ │ │ │ -140 _M_equal(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __x) const _GLIBCXX_NOEXCEPT │ │ │ │ -141 { │ │ │ │ -142 // Ideally this would just return _M_stream == __x._M_stream, │ │ │ │ -143 // but code compiled with old versions never sets _M_stream to null. │ │ │ │ -144 return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); │ │ │ │ -145 } │ │ │ │ -146 │ │ │ │ -147 void │ │ │ │ -148 _M_read() │ │ │ │ -149 { │ │ │ │ -150 if (_M_stream && !(*_M_stream >> _M_value)) │ │ │ │ -151 { │ │ │ │ -152 _M_stream = 0; │ │ │ │ -153 _M_ok = false; │ │ │ │ -154 } │ │ │ │ -155 } │ │ │ │ -156 │ │ │ │ -157 /// Return true if the iterators refer to the same stream, │ │ │ │ -158 /// or are both at end-of-stream. │ │ │ │ -159 _GLIBCXX_NODISCARD │ │ │ │ -160 friend bool │ │ │ │ -_1_6_1 _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) │ │ │ │ -162 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -163 { return __x._M_equal(__y); } │ │ │ │ -164 │ │ │ │ -165#if __cpp_impl_three_way_comparison < 201907L │ │ │ │ -166 /// Return true if the iterators refer to different streams, │ │ │ │ -167 /// or if one is at end-of-stream and the other is not. │ │ │ │ -168 _GLIBCXX_NODISCARD │ │ │ │ -169 friend bool │ │ │ │ -170 operator!=(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __x, const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __y) │ │ │ │ -171 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -172 { return !__x._M_equal(__y); } │ │ │ │ -173#endif │ │ │ │ -174 │ │ │ │ -175#if __cplusplus > 201703L && __cpp_lib_concepts │ │ │ │ -176 [[nodiscard]] │ │ │ │ -177 friend bool │ │ │ │ -178 _o_p_e_r_a_t_o_r_=_=(const _i_s_t_r_e_a_m___i_t_e_r_a_t_o_r& __i, default_sentinel_t) noexcept │ │ │ │ -179 { return !__i._M_stream; } │ │ │ │ -180#endif │ │ │ │ -181 }; │ │ │ │ -182 │ │ │ │ -183 /** │ │ │ │ -184 * @brief Provides output iterator semantics for streams. │ │ │ │ -185 * │ │ │ │ -186 * This class provides an iterator to write to an ostream. The type Tp is │ │ │ │ -187 * the only type written by this iterator and there must be an │ │ │ │ -188 * operator<<(Tp) defined. │ │ │ │ -189 * │ │ │ │ -190 * @tparam _Tp The type to write to the ostream. │ │ │ │ -191 * @tparam _CharT The ostream char_type. │ │ │ │ -192 * @tparam _Traits The ostream char_traits. │ │ │ │ -193 */ │ │ │ │ -194 template > │ │ │ │ -_1_9_6 class _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -197 : public _i_t_e_r_a_t_o_r │ │ │ │ -198 { │ │ │ │ -199 public: │ │ │ │ -200 ///@{ │ │ │ │ -201 /// Public typedef │ │ │ │ -202#if __cplusplus > 201703L │ │ │ │ -_2_0_3 using _d_i_f_f_e_r_e_n_c_e___t_y_p_e = ptrdiff_t; │ │ │ │ -204#endif │ │ │ │ -_2_0_5 typedef _CharT _c_h_a_r___t_y_p_e; │ │ │ │ -_2_0_6 typedef _Traits _t_r_a_i_t_s___t_y_p_e; │ │ │ │ -_2_0_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; │ │ │ │ -208 ///@} │ │ │ │ +78#ifdef __GTHREADS │ │ │ │ +79 explicit │ │ │ │ +80 _Sp_locker(const void*) noexcept; │ │ │ │ +81 _Sp_locker(const void*, const void*) noexcept; │ │ │ │ +82 ~_Sp_locker(); │ │ │ │ +83 │ │ │ │ +84 private: │ │ │ │ +85 unsigned char _M_key1; │ │ │ │ +86 unsigned char _M_key2; │ │ │ │ +87#else │ │ │ │ +88 explicit _Sp_locker(const void*, const void* = nullptr) { } │ │ │ │ +89#endif │ │ │ │ +90 }; │ │ │ │ +91 │ │ │ │ +92 /// @endcond │ │ │ │ +93 │ │ │ │ +94 /** │ │ │ │ +95 * @brief Report whether shared_ptr atomic operations are lock-free. │ │ │ │ +96 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +97 * @return True if atomic access to @c *__p is lock-free, false otherwise. │ │ │ │ +98 * @{ │ │ │ │ +99 */ │ │ │ │ +100 template │ │ │ │ +101 inline bool │ │ │ │ +_1_0_2 atomic_is_lock_free(const _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>*) │ │ │ │ +103 { │ │ │ │ +104#ifdef __GTHREADS │ │ │ │ +105 return __gthread_active_p() == 0; │ │ │ │ +106#else │ │ │ │ +107 return true; │ │ │ │ +108#endif │ │ │ │ +109 } │ │ │ │ +110 │ │ │ │ +111 template │ │ │ │ +112 inline bool │ │ │ │ +_1_1_3 atomic_is_lock_free(const _s_h_a_r_e_d___p_t_r_<___T_p_>* __p) │ │ │ │ +114 { return _s_t_d_:_:_a_t_o_m_i_c___i_s___l_o_c_k___f_r_e_e_<___T_p_,_ _____d_e_f_a_u_l_t___l_o_c_k___p_o_l_i_c_y_>(__p); } │ │ │ │ +115 │ │ │ │ +116 /// @} │ │ │ │ +117 │ │ │ │ +118 /** │ │ │ │ +119 * @brief Atomic load for shared_ptr objects. │ │ │ │ +120 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +121 * @return @c *__p │ │ │ │ +122 * │ │ │ │ +123 * The memory order shall not be `memory_order_release` or │ │ │ │ +124 * `memory_order_acq_rel`. │ │ │ │ +125 * @{ │ │ │ │ +126 */ │ │ │ │ +127 template │ │ │ │ +128 inline shared_ptr<_Tp> │ │ │ │ +_1_2_9 atomic_load_explicit(const _s_h_a_r_e_d___p_t_r_<___T_p_>* __p, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +130 { │ │ │ │ +131 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p}; │ │ │ │ +132 return *__p; │ │ │ │ +133 } │ │ │ │ +134 │ │ │ │ +135 template │ │ │ │ +136 inline shared_ptr<_Tp> │ │ │ │ +_1_3_7 atomic_load(const _s_h_a_r_e_d___p_t_r_<___T_p_>* __p) │ │ │ │ +138 { return std::atomic_load_explicit(__p, memory_order_seq_cst); } │ │ │ │ +139 │ │ │ │ +140 template │ │ │ │ +141 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_4_2 atomic_load_explicit(const _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +143 { │ │ │ │ +144 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p}; │ │ │ │ +145 return *__p; │ │ │ │ +146 } │ │ │ │ +147 │ │ │ │ +148 template │ │ │ │ +149 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_5_0 atomic_load(const _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p) │ │ │ │ +151 { return std::atomic_load_explicit(__p, memory_order_seq_cst); } │ │ │ │ +152 /// @} │ │ │ │ +153 │ │ │ │ +154 /** │ │ │ │ +155 * @brief Atomic store for shared_ptr objects. │ │ │ │ +156 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +157 * @param __r The value to store. │ │ │ │ +158 * │ │ │ │ +159 * The memory order shall not be `memory_order_acquire` or │ │ │ │ +160 * `memory_order_acq_rel`. │ │ │ │ +161 * @{ │ │ │ │ +162 */ │ │ │ │ +163 template │ │ │ │ +164 inline void │ │ │ │ +_1_6_5 atomic_store_explicit(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, _s_h_a_r_e_d___p_t_r_<___T_p_> __r, │ │ │ │ +166 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +167 { │ │ │ │ +168 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p}; │ │ │ │ +169 __p->swap(__r); // use swap so that **__p not destroyed while lock held │ │ │ │ +170 } │ │ │ │ +171 │ │ │ │ +172 template │ │ │ │ +173 inline void │ │ │ │ +_1_7_4 atomic_store(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, _s_h_a_r_e_d___p_t_r_<___T_p_> __r) │ │ │ │ +175 { std::atomic_store_explicit(__p, _s_t_d_:_:_m_o_v_e(__r), memory_order_seq_cst); } │ │ │ │ +176 │ │ │ │ +177 template │ │ │ │ +178 inline void │ │ │ │ +_1_7_9 atomic_store_explicit(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, │ │ │ │ +180 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> __r, │ │ │ │ +181 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +182 { │ │ │ │ +183 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p}; │ │ │ │ +184 __p->swap(__r); // use swap so that **__p not destroyed while lock held │ │ │ │ +185 } │ │ │ │ +186 │ │ │ │ +187 template │ │ │ │ +188 inline void │ │ │ │ +_1_8_9 atomic_store(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> __r) │ │ │ │ +190 { std::atomic_store_explicit(__p, _s_t_d_:_:_m_o_v_e(__r), memory_order_seq_cst); } │ │ │ │ +191 /// @} │ │ │ │ +192 │ │ │ │ +193 /** │ │ │ │ +194 * @brief Atomic exchange for shared_ptr objects. │ │ │ │ +195 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +196 * @param __r New value to store in `*__p`. │ │ │ │ +197 * @return The original value of `*__p` │ │ │ │ +198 * @{ │ │ │ │ +199 */ │ │ │ │ +200 template │ │ │ │ +201 inline shared_ptr<_Tp> │ │ │ │ +_2_0_2 atomic_exchange_explicit(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, _s_h_a_r_e_d___p_t_r_<___T_p_> __r, │ │ │ │ +203 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +204 { │ │ │ │ +205 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p}; │ │ │ │ +206 __p->swap(__r); │ │ │ │ +207 return __r; │ │ │ │ +208 } │ │ │ │ 209 │ │ │ │ -210 private: │ │ │ │ -211 _o_s_t_r_e_a_m___t_y_p_e* _M_stream; │ │ │ │ -212 const _CharT* _M_string; │ │ │ │ -213 │ │ │ │ -214 public: │ │ │ │ -215 /// Construct from an ostream. │ │ │ │ -_2_1_6 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r(_o_s_t_r_e_a_m___t_y_p_e& _____s) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -217 : _M_stream(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____s)), _M_string(0) {} │ │ │ │ -218 │ │ │ │ -219 /** │ │ │ │ -220 * Construct from an ostream. │ │ │ │ -221 * │ │ │ │ -222 * The delimiter string @a c is written to the stream after every Tp │ │ │ │ -223 * written to the stream. The delimiter is not copied, and thus must │ │ │ │ -224 * not be destroyed while this iterator is in use. │ │ │ │ -225 * │ │ │ │ -226 * @param __s Underlying ostream to write to. │ │ │ │ -227 * @param __c CharT delimiter string to insert. │ │ │ │ -228 */ │ │ │ │ -_2_2_9 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r(_o_s_t_r_e_a_m___t_y_p_e& _____s, const _CharT* __c) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -230 : _M_stream(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_____s)), _M_string(__c) { } │ │ │ │ -231 │ │ │ │ -232 /// Copy constructor. │ │ │ │ -_2_3_3 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r(const _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& _____o_b_j) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -234 : _M_stream(_____o_b_j._M_stream), _M_string(_____o_b_j._M_string) { } │ │ │ │ -235 │ │ │ │ -236#if __cplusplus >= 201103L │ │ │ │ -237 _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; │ │ │ │ -238#endif │ │ │ │ -239 │ │ │ │ -240 /// Writes @a value to underlying ostream using operator<<. If │ │ │ │ -241 /// constructed with delimiter string, writes delimiter to ostream. │ │ │ │ -242 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ -_2_4_3 _o_p_e_r_a_t_o_r_=(const _Tp& __value) │ │ │ │ -244 { │ │ │ │ -245 __glibcxx_requires_cond(_M_stream != 0, │ │ │ │ -246 _M_message(__gnu_debug::__msg_output_ostream) │ │ │ │ -247 ._M_iterator(*this)); │ │ │ │ -248 *_M_stream << __value; │ │ │ │ -249 if (_M_string) │ │ │ │ -250 *_M_stream << _M_string; │ │ │ │ -251 return *this; │ │ │ │ -252 } │ │ │ │ -253 │ │ │ │ -254 _GLIBCXX_NODISCARD │ │ │ │ -255 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ -256 operator*() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -257 { return *this; } │ │ │ │ -258 │ │ │ │ -259 ostream_iterator& │ │ │ │ -260 operator++() _GLIBCXX_NOEXCEPT │ │ │ │ -261 { return *this; } │ │ │ │ -262 │ │ │ │ -263 _o_s_t_r_e_a_m___i_t_e_r_a_t_o_r& │ │ │ │ -264 operator++(int) _GLIBCXX_NOEXCEPT │ │ │ │ -265 { return *this; } │ │ │ │ -266 }; │ │ │ │ -267#pragma GCC diagnostic pop │ │ │ │ -268 │ │ │ │ -269 /// @} group iterators │ │ │ │ +210 template │ │ │ │ +211 inline shared_ptr<_Tp> │ │ │ │ +_2_1_2 atomic_exchange(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, _s_h_a_r_e_d___p_t_r_<___T_p_> __r) │ │ │ │ +213 { │ │ │ │ +214 return std::atomic_exchange_explicit(__p, _s_t_d_:_:_m_o_v_e(__r), │ │ │ │ +215 memory_order_seq_cst); │ │ │ │ +216 } │ │ │ │ +217 │ │ │ │ +218 template │ │ │ │ +219 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_2_2_0 atomic_exchange_explicit(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, │ │ │ │ +221 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> __r, │ │ │ │ +222 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +223 { │ │ │ │ +224 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p}; │ │ │ │ +225 __p->swap(__r); │ │ │ │ +226 return __r; │ │ │ │ +227 } │ │ │ │ +228 │ │ │ │ +229 template │ │ │ │ +230 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_2_3_1 atomic_exchange(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> __r) │ │ │ │ +232 { │ │ │ │ +233 return std::atomic_exchange_explicit(__p, _s_t_d_:_:_m_o_v_e(__r), │ │ │ │ +234 memory_order_seq_cst); │ │ │ │ +235 } │ │ │ │ +236 /// @} │ │ │ │ +237 │ │ │ │ +238 /** │ │ │ │ +239 * @brief Atomic compare-and-swap for shared_ptr objects. │ │ │ │ +240 * @param __p A non-null pointer to a shared_ptr object. │ │ │ │ +241 * @param __v A non-null pointer to a shared_ptr object. │ │ │ │ +242 * @param __w A non-null pointer to a shared_ptr object. │ │ │ │ +243 * @return True if `*__p` was equivalent to `*__v`, false otherwise. │ │ │ │ +244 * │ │ │ │ +245 * The memory order for failure shall not be `memory_order_release` or │ │ │ │ +246 * `memory_order_acq_rel`. │ │ │ │ +247 * @{ │ │ │ │ +248 */ │ │ │ │ +249 template │ │ │ │ +250 bool │ │ │ │ +_2_5_1 atomic_compare_exchange_strong_explicit(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, │ │ │ │ +252 _s_h_a_r_e_d___p_t_r_<___T_p_>* _____v, │ │ │ │ +253 _s_h_a_r_e_d___p_t_r_<___T_p_> _____w, │ │ │ │ +254 _m_e_m_o_r_y___o_r_d_e_r, │ │ │ │ +255 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +256 { │ │ │ │ +257 _s_h_a_r_e_d___p_t_r_<___T_p_> __x; // goes out of scope after __lock │ │ │ │ +258 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p, _____v}; │ │ │ │ +259 _o_w_n_e_r___l_e_s_s_<_s_h_a_r_e_d___p_t_r_<___T_p_>> __less; │ │ │ │ +260 if (*__p == *_____v && !__less(*__p, *_____v) && !__less(*_____v, *__p)) │ │ │ │ +261 { │ │ │ │ +262 __x = _s_t_d_:_:_m_o_v_e(*__p); │ │ │ │ +263 *__p = _s_t_d_:_:_m_o_v_e(_____w); │ │ │ │ +264 return true; │ │ │ │ +265 } │ │ │ │ +266 __x = _s_t_d_:_:_m_o_v_e(*_____v); │ │ │ │ +267 *_____v = *__p; │ │ │ │ +268 return false; │ │ │ │ +269 } │ │ │ │ 270 │ │ │ │ -271_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -272} // namespace │ │ │ │ -273 │ │ │ │ -274#endif │ │ │ │ -_i_o_s_f_w_d │ │ │ │ -_s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h │ │ │ │ -_m_o_v_e_._h │ │ │ │ -_d_e_b_u_g_._h │ │ │ │ -_s_t_d_:_:_____a_d_d_r_e_s_s_o_f │ │ │ │ -constexpr _Tp * __addressof(_Tp &__r) noexcept │ │ │ │ -Same as C++11 std::addressof. │ │ │ │ -DDeeffiinniittiioonn _m_o_v_e_._h_:_5_1 │ │ │ │ +271 template │ │ │ │ +272 inline bool │ │ │ │ +_2_7_3 atomic_compare_exchange_strong(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, _s_h_a_r_e_d___p_t_r_<___T_p_>* _____v, │ │ │ │ +274 _s_h_a_r_e_d___p_t_r_<___T_p_> _____w) │ │ │ │ +275 { │ │ │ │ +276 return std::atomic_compare_exchange_strong_explicit(__p, _____v, │ │ │ │ +277 _s_t_d_:_:_m_o_v_e(_____w), memory_order_seq_cst, memory_order_seq_cst); │ │ │ │ +278 } │ │ │ │ +279 │ │ │ │ +280 template │ │ │ │ +281 inline bool │ │ │ │ +_2_8_2 atomic_compare_exchange_weak_explicit(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, │ │ │ │ +283 _s_h_a_r_e_d___p_t_r_<___T_p_>* _____v, │ │ │ │ +284 _s_h_a_r_e_d___p_t_r_<___T_p_> _____w, │ │ │ │ +285 _m_e_m_o_r_y___o_r_d_e_r _____s_u_c_c_e_s_s, │ │ │ │ +286 _m_e_m_o_r_y___o_r_d_e_r _____f_a_i_l_u_r_e) │ │ │ │ +287 { │ │ │ │ +288 return std::atomic_compare_exchange_strong_explicit(__p, _____v, │ │ │ │ +289 _s_t_d_:_:_m_o_v_e(_____w), _____s_u_c_c_e_s_s, _____f_a_i_l_u_r_e); │ │ │ │ +290 } │ │ │ │ +291 │ │ │ │ +292 template │ │ │ │ +293 inline bool │ │ │ │ +_2_9_4 atomic_compare_exchange_weak(_s_h_a_r_e_d___p_t_r_<___T_p_>* __p, _s_h_a_r_e_d___p_t_r_<___T_p_>* _____v, │ │ │ │ +295 _s_h_a_r_e_d___p_t_r_<___T_p_> _____w) │ │ │ │ +296 { │ │ │ │ +297 return std::atomic_compare_exchange_weak_explicit(__p, _____v, │ │ │ │ +298 _s_t_d_:_:_m_o_v_e(_____w), memory_order_seq_cst, memory_order_seq_cst); │ │ │ │ +299 } │ │ │ │ +300 │ │ │ │ +301 template │ │ │ │ +302 bool │ │ │ │ +_3_0_3 atomic_compare_exchange_strong_explicit(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, │ │ │ │ +304 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* _____v, │ │ │ │ +305 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> _____w, │ │ │ │ +306 _m_e_m_o_r_y___o_r_d_e_r, │ │ │ │ +307 _m_e_m_o_r_y___o_r_d_e_r) │ │ │ │ +308 { │ │ │ │ +309 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> __x; // goes out of scope after __lock │ │ │ │ +310 ___S_p___l_o_c_k_e_r _____l_o_c_k{__p, _____v}; │ │ │ │ +311 _o_w_n_e_r___l_e_s_s_<_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>> __less; │ │ │ │ +312 if (*__p == *_____v && !__less(*__p, *_____v) && !__less(*_____v, *__p)) │ │ │ │ +313 { │ │ │ │ +314 __x = _s_t_d_:_:_m_o_v_e(*__p); │ │ │ │ +315 *__p = _s_t_d_:_:_m_o_v_e(_____w); │ │ │ │ +316 return true; │ │ │ │ +317 } │ │ │ │ +318 __x = _s_t_d_:_:_m_o_v_e(*_____v); │ │ │ │ +319 *_____v = *__p; │ │ │ │ +320 return false; │ │ │ │ +321 } │ │ │ │ +322 │ │ │ │ +323 template │ │ │ │ +324 inline bool │ │ │ │ +_3_2_5 atomic_compare_exchange_strong(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, │ │ │ │ +326 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* _____v, │ │ │ │ +327 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> _____w) │ │ │ │ +328 { │ │ │ │ +329 return std::atomic_compare_exchange_strong_explicit(__p, _____v, │ │ │ │ +330 _s_t_d_:_:_m_o_v_e(_____w), memory_order_seq_cst, memory_order_seq_cst); │ │ │ │ +331 } │ │ │ │ +332 │ │ │ │ +333 template │ │ │ │ +334 inline bool │ │ │ │ +_3_3_5 atomic_compare_exchange_weak_explicit(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, │ │ │ │ +336 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* _____v, │ │ │ │ +337 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> _____w, │ │ │ │ +338 _m_e_m_o_r_y___o_r_d_e_r _____s_u_c_c_e_s_s, │ │ │ │ +339 _m_e_m_o_r_y___o_r_d_e_r _____f_a_i_l_u_r_e) │ │ │ │ +340 { │ │ │ │ +341 return std::atomic_compare_exchange_strong_explicit(__p, _____v, │ │ │ │ +342 _s_t_d_:_:_m_o_v_e(_____w), _____s_u_c_c_e_s_s, _____f_a_i_l_u_r_e); │ │ │ │ +343 } │ │ │ │ +344 │ │ │ │ +345 template │ │ │ │ +346 inline bool │ │ │ │ +_3_4_7 atomic_compare_exchange_weak(_____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* __p, │ │ │ │ +348 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>* _____v, │ │ │ │ +349 _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_> _____w) │ │ │ │ +350 { │ │ │ │ +351 return std::atomic_compare_exchange_weak_explicit(__p, _____v, │ │ │ │ +352 _s_t_d_:_:_m_o_v_e(_____w), memory_order_seq_cst, memory_order_seq_cst); │ │ │ │ +353 } │ │ │ │ +354 /// @} │ │ │ │ +355 │ │ │ │ +356 /// @} group pointer_abstractions │ │ │ │ +357 │ │ │ │ +358#if __cplusplus >= 202002L │ │ │ │ +359# define __cpp_lib_atomic_shared_ptr 201711L │ │ │ │ +360 template │ │ │ │ +361 struct atomic; │ │ │ │ +362 │ │ │ │ +363 /** │ │ │ │ +364 * @addtogroup pointer_abstractions │ │ │ │ +365 * @relates shared_ptr │ │ │ │ +366 * @{ │ │ │ │ +367 */ │ │ │ │ +368 │ │ │ │ +369 template │ │ │ │ +370 static constexpr bool __is_shared_ptr = false; │ │ │ │ +371 template │ │ │ │ +372 static constexpr bool __is_shared_ptr> = true; │ │ │ │ +373 │ │ │ │ +374 template │ │ │ │ +375 class _Sp_atomic │ │ │ │ +376 { │ │ │ │ +377 using value_type = _Tp; │ │ │ │ +378 │ │ │ │ +379 friend struct atomic<_Tp>; │ │ │ │ +380 │ │ │ │ +381 // An atomic version of __shared_count<> and __weak_count<>. │ │ │ │ +382 // Stores a _Sp_counted_base<>* but uses the LSB as a lock. │ │ │ │ +383 struct _Atomic_count │ │ │ │ +384 { │ │ │ │ +385 // Either __shared_count<> or __weak_count<> │ │ │ │ +386 using __count_type = decltype(_Tp::_M_refcount); │ │ │ │ +387 │ │ │ │ +388 // _Sp_counted_base<>* │ │ │ │ +389 using pointer = decltype(__count_type::_M_pi); │ │ │ │ +390 │ │ │ │ +391 // Ensure we can use the LSB as the lock bit. │ │ │ │ +392 static_assert(alignof(remove_pointer_t) > 1); │ │ │ │ +393 │ │ │ │ +394 constexpr _Atomic_count() noexcept = default; │ │ │ │ +395 │ │ │ │ +396 explicit │ │ │ │ +397 _Atomic_count(__count_type&& __c) noexcept │ │ │ │ +398 : _M_val(reinterpret_cast(__c._M_pi)) │ │ │ │ +399 { │ │ │ │ +400 __c._M_pi = nullptr; │ │ │ │ +401 } │ │ │ │ +402 │ │ │ │ +403 ~_Atomic_count() │ │ │ │ +404 { │ │ │ │ +405 auto __val = _M_val.load(memory_order_relaxed); │ │ │ │ +406 _GLIBCXX_TSAN_MUTEX_DESTROY(&_M_val); │ │ │ │ +407 __glibcxx_assert(!(__val & _S_lock_bit)); │ │ │ │ +408 if (auto __pi = reinterpret_cast(__val)) │ │ │ │ +409 { │ │ │ │ +410 if constexpr (__is_shared_ptr<_Tp>) │ │ │ │ +411 __pi->_M_release(); │ │ │ │ +412 else │ │ │ │ +413 __pi->_M_weak_release(); │ │ │ │ +414 } │ │ │ │ +415 } │ │ │ │ +416 │ │ │ │ +417 _Atomic_count(const _Atomic_count&) = delete; │ │ │ │ +418 _Atomic_count& operator=(const _Atomic_count&) = delete; │ │ │ │ +419 │ │ │ │ +420 // Precondition: Caller does not hold lock! │ │ │ │ +421 // Returns the raw pointer value without the lock bit set. │ │ │ │ +422 pointer │ │ │ │ +423 _l_o_c_k(_m_e_m_o_r_y___o_r_d_e_r __o) const noexcept │ │ │ │ +424 { │ │ │ │ +425 // To acquire the lock we flip the LSB from 0 to 1. │ │ │ │ +426 │ │ │ │ +427 auto __current = _M_val.load(memory_order_relaxed); │ │ │ │ +428 while (__current & _S_lock_bit) │ │ │ │ +429 { │ │ │ │ +430#if __cpp_lib_atomic_wait │ │ │ │ +431 __detail::__thread_relax(); │ │ │ │ +432#endif │ │ │ │ +433 __current = _M_val.load(memory_order_relaxed); │ │ │ │ +434 } │ │ │ │ +435 │ │ │ │ +436 _GLIBCXX_TSAN_MUTEX_TRY_LOCK(&_M_val); │ │ │ │ +437 │ │ │ │ +438 while (!_M_val.compare_exchange_strong(__current, │ │ │ │ +439 __current | _S_lock_bit, │ │ │ │ +440 __o, │ │ │ │ +441 memory_order_relaxed)) │ │ │ │ +442 { │ │ │ │ +443 _GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED(&_M_val); │ │ │ │ +444#if __cpp_lib_atomic_wait │ │ │ │ +445 __detail::__thread_relax(); │ │ │ │ +446#endif │ │ │ │ +447 __current = __current & ~_S_lock_bit; │ │ │ │ +448 _GLIBCXX_TSAN_MUTEX_TRY_LOCK(&_M_val); │ │ │ │ +449 } │ │ │ │ +450 _GLIBCXX_TSAN_MUTEX_LOCKED(&_M_val); │ │ │ │ +451 return reinterpret_cast(__current); │ │ │ │ +452 } │ │ │ │ +453 │ │ │ │ +454 // Precondition: caller holds lock! │ │ │ │ +455 void │ │ │ │ +456 unlock(_m_e_m_o_r_y___o_r_d_e_r __o) const noexcept │ │ │ │ +457 { │ │ │ │ +458 _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(&_M_val); │ │ │ │ +459 _M_val.fetch_sub(1, __o); │ │ │ │ +460 _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(&_M_val); │ │ │ │ +461 } │ │ │ │ +462 │ │ │ │ +463 // Swaps the values of *this and __c, and unlocks *this. │ │ │ │ +464 // Precondition: caller holds lock! │ │ │ │ +465 void │ │ │ │ +466 _M_swap_unlock(__count_type& __c, _m_e_m_o_r_y___o_r_d_e_r __o) noexcept │ │ │ │ +467 { │ │ │ │ +468 if (__o != memory_order_seq_cst) │ │ │ │ +469 __o = memory_order_release; │ │ │ │ +470 auto __x = reinterpret_cast(__c._M_pi); │ │ │ │ +471 _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(&_M_val); │ │ │ │ +472 __x = _M_val.exchange(__x, __o); │ │ │ │ +473 _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(&_M_val); │ │ │ │ +474 __c._M_pi = reinterpret_cast(__x & ~_S_lock_bit); │ │ │ │ +475 } │ │ │ │ +476 │ │ │ │ +477#if __cpp_lib_atomic_wait │ │ │ │ +478 // Precondition: caller holds lock! │ │ │ │ +479 void │ │ │ │ +480 _M_wait_unlock(_m_e_m_o_r_y___o_r_d_e_r __o) const noexcept │ │ │ │ +481 { │ │ │ │ +482 _GLIBCXX_TSAN_MUTEX_PRE_UNLOCK(&_M_val); │ │ │ │ +483 auto __v = _M_val.fetch_sub(1, memory_order_relaxed); │ │ │ │ +484 _GLIBCXX_TSAN_MUTEX_POST_UNLOCK(&_M_val); │ │ │ │ +485 _M_val.wait(__v & ~_S_lock_bit, __o); │ │ │ │ +486 } │ │ │ │ +487 │ │ │ │ +488 void │ │ │ │ +489 notify_one() noexcept │ │ │ │ +490 { │ │ │ │ +491 _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(&_M_val); │ │ │ │ +492 _M_val.notify_one(); │ │ │ │ +493 _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(&_M_val); │ │ │ │ +494 } │ │ │ │ +495 │ │ │ │ +496 void │ │ │ │ +497 notify_all() noexcept │ │ │ │ +498 { │ │ │ │ +499 _GLIBCXX_TSAN_MUTEX_PRE_SIGNAL(&_M_val); │ │ │ │ +500 _M_val.notify_all(); │ │ │ │ +501 _GLIBCXX_TSAN_MUTEX_POST_SIGNAL(&_M_val); │ │ │ │ +502 } │ │ │ │ +503#endif │ │ │ │ +504 │ │ │ │ +505 private: │ │ │ │ +506 mutable __atomic_base _M_val{0}; │ │ │ │ +507 static constexpr uintptr_t _S_lock_bit{1}; │ │ │ │ +508 }; │ │ │ │ +509 │ │ │ │ +510 typename _Tp::element_type* _M_ptr = nullptr; │ │ │ │ +511 _Atomic_count _M_refcount; │ │ │ │ +512 │ │ │ │ +513 static typename _Atomic_count::pointer │ │ │ │ +514 _S_add_ref(typename _Atomic_count::pointer __p) │ │ │ │ +515 { │ │ │ │ +516 if (__p) │ │ │ │ +517 { │ │ │ │ +518 if constexpr (__is_shared_ptr<_Tp>) │ │ │ │ +519 __p->_M_add_ref_copy(); │ │ │ │ +520 else │ │ │ │ +521 __p->_M_weak_add_ref(); │ │ │ │ +522 } │ │ │ │ +523 return __p; │ │ │ │ +524 } │ │ │ │ +525 │ │ │ │ +526 constexpr _Sp_atomic() noexcept = default; │ │ │ │ +527 │ │ │ │ +528 explicit │ │ │ │ +529 _Sp_atomic(value_type __r) noexcept │ │ │ │ +530 : _M_ptr(__r._M_ptr), _M_refcount(_s_t_d::_m_o_v_e(__r._M_refcount)) │ │ │ │ +531 { } │ │ │ │ +532 │ │ │ │ +533 ~_Sp_atomic() = default; │ │ │ │ +534 │ │ │ │ +535 _Sp_atomic(const _Sp_atomic&) = delete; │ │ │ │ +536 void operator=(const _Sp_atomic&) = delete; │ │ │ │ +537 │ │ │ │ +538 value_type │ │ │ │ +539 load(_m_e_m_o_r_y___o_r_d_e_r __o) const noexcept │ │ │ │ +540 { │ │ │ │ +541 __glibcxx_assert(__o != memory_order_release │ │ │ │ +542 && __o != memory_order_acq_rel); │ │ │ │ +543 // Ensure that the correct value of _M_ptr is visible after locking., │ │ │ │ +544 // by upgrading relaxed or consume to acquire. │ │ │ │ +545 if (__o != memory_order_seq_cst) │ │ │ │ +546 __o = memory_order_acquire; │ │ │ │ +547 │ │ │ │ +548 value_type __ret; │ │ │ │ +549 auto __pi = _M_refcount.lock(__o); │ │ │ │ +550 __ret._M_ptr = _M_ptr; │ │ │ │ +551 __ret._M_refcount._M_pi = _S_add_ref(__pi); │ │ │ │ +552 _M_refcount.unlock(memory_order_relaxed); │ │ │ │ +553 return __ret; │ │ │ │ +554 } │ │ │ │ +555 │ │ │ │ +556 void │ │ │ │ +557 swap(value_type& __r, _m_e_m_o_r_y___o_r_d_e_r __o) noexcept │ │ │ │ +558 { │ │ │ │ +559 _M_refcount.lock(memory_order_acquire); │ │ │ │ +560 _s_t_d_:_:_s_w_a_p(_M_ptr, __r._M_ptr); │ │ │ │ +561 _M_refcount._M_swap_unlock(__r._M_refcount, __o); │ │ │ │ +562 } │ │ │ │ +563 │ │ │ │ +564 bool │ │ │ │ +565 compare_exchange_strong(value_type& __expected, value_type __desired, │ │ │ │ +566 _m_e_m_o_r_y___o_r_d_e_r __o, _m_e_m_o_r_y___o_r_d_e_r __o2) noexcept │ │ │ │ +567 { │ │ │ │ +568 bool __result = true; │ │ │ │ +569 auto __pi = _M_refcount.lock(memory_order_acquire); │ │ │ │ +570 if (_M_ptr == __expected._M_ptr │ │ │ │ +571 && __pi == __expected._M_refcount._M_pi) │ │ │ │ +572 { │ │ │ │ +573 _M_ptr = __desired._M_ptr; │ │ │ │ +574 _M_refcount._M_swap_unlock(__desired._M_refcount, __o); │ │ │ │ +575 } │ │ │ │ +576 else │ │ │ │ +577 { │ │ │ │ +578 _Tp __sink = _s_t_d_:_:_m_o_v_e(__expected); │ │ │ │ +579 __expected._M_ptr = _M_ptr; │ │ │ │ +580 __expected._M_refcount._M_pi = _S_add_ref(__pi); │ │ │ │ +581 _M_refcount.unlock(__o2); │ │ │ │ +582 __result = false; │ │ │ │ +583 } │ │ │ │ +584 return __result; │ │ │ │ +585 } │ │ │ │ +586 │ │ │ │ +587#if __cpp_lib_atomic_wait │ │ │ │ +588 void │ │ │ │ +589 wait(value_type __old, _m_e_m_o_r_y___o_r_d_e_r __o) const noexcept │ │ │ │ +590 { │ │ │ │ +591 auto __pi = _M_refcount.lock(memory_order_acquire); │ │ │ │ +592 if (_M_ptr == __old._M_ptr && __pi == __old._M_refcount._M_pi) │ │ │ │ +593 _M_refcount._M_wait_unlock(__o); │ │ │ │ +594 else │ │ │ │ +595 _M_refcount.unlock(memory_order_relaxed); │ │ │ │ +596 } │ │ │ │ +597 │ │ │ │ +598 void │ │ │ │ +599 notify_one() noexcept │ │ │ │ +600 { │ │ │ │ +601 _M_refcount.notify_one(); │ │ │ │ +602 } │ │ │ │ +603 │ │ │ │ +604 void │ │ │ │ +605 notify_all() noexcept │ │ │ │ +606 { │ │ │ │ +607 _M_refcount.notify_all(); │ │ │ │ +608 } │ │ │ │ +609#endif │ │ │ │ +610 }; │ │ │ │ +611 │ │ │ │ +612 template │ │ │ │ +613 struct atomic> │ │ │ │ +614 { │ │ │ │ +615 public: │ │ │ │ +616 using value_type = shared_ptr<_Tp>; │ │ │ │ +617 │ │ │ │ +618 static constexpr bool is_always_lock_free = false; │ │ │ │ +619 │ │ │ │ +620 bool │ │ │ │ +621 is_lock_free() const noexcept │ │ │ │ +622 { return false; } │ │ │ │ +623 │ │ │ │ +624 constexpr atomic() noexcept = default; │ │ │ │ +625 │ │ │ │ +626 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +627 // 3661. constinit atomic> a(nullptr); should work │ │ │ │ +628 constexpr atomic(nullptr_t) noexcept : atomic() { } │ │ │ │ +629 │ │ │ │ +630 atomic(shared_ptr<_Tp> __r) noexcept │ │ │ │ +631 : _M_impl(_s_t_d_:_:_m_o_v_e(__r)) │ │ │ │ +632 { } │ │ │ │ +633 │ │ │ │ +634 atomic(const atomic&) = delete; │ │ │ │ +635 void operator=(const atomic&) = delete; │ │ │ │ +636 │ │ │ │ +637 shared_ptr<_Tp> │ │ │ │ +638 load(_m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) const noexcept │ │ │ │ +639 { return _M_impl.load(__o); } │ │ │ │ +640 │ │ │ │ +641 operator shared_ptr<_Tp>() const noexcept │ │ │ │ +642 { return _M_impl.load(memory_order_seq_cst); } │ │ │ │ +643 │ │ │ │ +644 void │ │ │ │ +645 store(shared_ptr<_Tp> __desired, │ │ │ │ +646 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +647 { _M_impl.swap(__desired, __o); } │ │ │ │ +648 │ │ │ │ +649 void │ │ │ │ +650 operator=(shared_ptr<_Tp> __desired) noexcept │ │ │ │ +651 { _M_impl.swap(__desired, memory_order_seq_cst); } │ │ │ │ +652 │ │ │ │ +653 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +654 // 3893. LWG 3661 broke atomic> a; a = nullptr; │ │ │ │ +655 void │ │ │ │ +656 operator=(nullptr_t) noexcept │ │ │ │ +657 { store(nullptr); } │ │ │ │ +658 │ │ │ │ +659 shared_ptr<_Tp> │ │ │ │ +660 exchange(shared_ptr<_Tp> __desired, │ │ │ │ +661 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +662 { │ │ │ │ +663 _M_impl.swap(__desired, __o); │ │ │ │ +664 return __desired; │ │ │ │ +665 } │ │ │ │ +666 │ │ │ │ +667 bool │ │ │ │ +668 compare_exchange_strong(shared_ptr<_Tp>& __expected, │ │ │ │ +669 shared_ptr<_Tp> __desired, │ │ │ │ +670 _m_e_m_o_r_y___o_r_d_e_r __o, _m_e_m_o_r_y___o_r_d_e_r __o2) noexcept │ │ │ │ +671 { │ │ │ │ +672 return _M_impl.compare_exchange_strong(__expected, __desired, __o, __o2); │ │ │ │ +673 } │ │ │ │ +674 │ │ │ │ +675 bool │ │ │ │ +676 compare_exchange_strong(value_type& __expected, value_type __desired, │ │ │ │ +677 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +678 { │ │ │ │ +679 _m_e_m_o_r_y___o_r_d_e_r __o2; │ │ │ │ +680 switch (__o) │ │ │ │ +681 { │ │ │ │ +682 case memory_order_acq_rel: │ │ │ │ +683 __o2 = memory_order_acquire; │ │ │ │ +684 break; │ │ │ │ +685 case memory_order_release: │ │ │ │ +686 __o2 = memory_order_relaxed; │ │ │ │ +687 break; │ │ │ │ +688 default: │ │ │ │ +689 __o2 = __o; │ │ │ │ +690 } │ │ │ │ +691 return compare_exchange_strong(__expected, _s_t_d_:_:_m_o_v_e(__desired), │ │ │ │ +692 __o, __o2); │ │ │ │ +693 } │ │ │ │ +694 │ │ │ │ +695 bool │ │ │ │ +696 compare_exchange_weak(value_type& __expected, value_type __desired, │ │ │ │ +697 _m_e_m_o_r_y___o_r_d_e_r __o, _m_e_m_o_r_y___o_r_d_e_r __o2) noexcept │ │ │ │ +698 { │ │ │ │ +699 return compare_exchange_strong(__expected, _s_t_d_:_:_m_o_v_e(__desired), │ │ │ │ +700 __o, __o2); │ │ │ │ +701 } │ │ │ │ +702 │ │ │ │ +703 bool │ │ │ │ +704 compare_exchange_weak(value_type& __expected, value_type __desired, │ │ │ │ +705 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +706 { │ │ │ │ +707 return compare_exchange_strong(__expected, _s_t_d_:_:_m_o_v_e(__desired), __o); │ │ │ │ +708 } │ │ │ │ +709 │ │ │ │ +710#if __cpp_lib_atomic_wait │ │ │ │ +711 void │ │ │ │ +712 wait(value_type __old, │ │ │ │ +713 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) const noexcept │ │ │ │ +714 { │ │ │ │ +715 _M_impl.wait(_s_t_d_:_:_m_o_v_e(__old), __o); │ │ │ │ +716 } │ │ │ │ +717 │ │ │ │ +718 void │ │ │ │ +719 notify_one() noexcept │ │ │ │ +720 { │ │ │ │ +721 _M_impl.notify_one(); │ │ │ │ +722 } │ │ │ │ +723 │ │ │ │ +724 void │ │ │ │ +725 notify_all() noexcept │ │ │ │ +726 { │ │ │ │ +727 _M_impl.notify_all(); │ │ │ │ +728 } │ │ │ │ +729#endif │ │ │ │ +730 │ │ │ │ +731 private: │ │ │ │ +732 _Sp_atomic> _M_impl; │ │ │ │ +733 }; │ │ │ │ +734 │ │ │ │ +735 template │ │ │ │ +736 struct atomic> │ │ │ │ +737 { │ │ │ │ +738 public: │ │ │ │ +739 using value_type = weak_ptr<_Tp>; │ │ │ │ +740 │ │ │ │ +741 static constexpr bool is_always_lock_free = false; │ │ │ │ +742 │ │ │ │ +743 bool │ │ │ │ +744 is_lock_free() const noexcept │ │ │ │ +745 { return false; } │ │ │ │ +746 │ │ │ │ +747 constexpr atomic() noexcept = default; │ │ │ │ +748 │ │ │ │ +749 atomic(weak_ptr<_Tp> __r) noexcept │ │ │ │ +750 : _M_impl(_m_o_v_e(__r)) │ │ │ │ +751 { } │ │ │ │ +752 │ │ │ │ +753 atomic(const atomic&) = delete; │ │ │ │ +754 void operator=(const atomic&) = delete; │ │ │ │ +755 │ │ │ │ +756 weak_ptr<_Tp> │ │ │ │ +757 load(_m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) const noexcept │ │ │ │ +758 { return _M_impl.load(__o); } │ │ │ │ +759 │ │ │ │ +760 operator weak_ptr<_Tp>() const noexcept │ │ │ │ +761 { return _M_impl.load(memory_order_seq_cst); } │ │ │ │ +762 │ │ │ │ +763 void │ │ │ │ +764 store(weak_ptr<_Tp> __desired, │ │ │ │ +765 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +766 { _M_impl.swap(__desired, __o); } │ │ │ │ +767 │ │ │ │ +768 void │ │ │ │ +769 operator=(weak_ptr<_Tp> __desired) noexcept │ │ │ │ +770 { _M_impl.swap(__desired, memory_order_seq_cst); } │ │ │ │ +771 │ │ │ │ +772 weak_ptr<_Tp> │ │ │ │ +773 exchange(weak_ptr<_Tp> __desired, │ │ │ │ +774 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +775 { │ │ │ │ +776 _M_impl.swap(__desired, __o); │ │ │ │ +777 return __desired; │ │ │ │ +778 } │ │ │ │ +779 │ │ │ │ +780 bool │ │ │ │ +781 compare_exchange_strong(weak_ptr<_Tp>& __expected, │ │ │ │ +782 weak_ptr<_Tp> __desired, │ │ │ │ +783 _m_e_m_o_r_y___o_r_d_e_r __o, _m_e_m_o_r_y___o_r_d_e_r __o2) noexcept │ │ │ │ +784 { │ │ │ │ +785 return _M_impl.compare_exchange_strong(__expected, __desired, __o, __o2); │ │ │ │ +786 } │ │ │ │ +787 │ │ │ │ +788 bool │ │ │ │ +789 compare_exchange_strong(value_type& __expected, value_type __desired, │ │ │ │ +790 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +791 { │ │ │ │ +792 _m_e_m_o_r_y___o_r_d_e_r __o2; │ │ │ │ +793 switch (__o) │ │ │ │ +794 { │ │ │ │ +795 case memory_order_acq_rel: │ │ │ │ +796 __o2 = memory_order_acquire; │ │ │ │ +797 break; │ │ │ │ +798 case memory_order_release: │ │ │ │ +799 __o2 = memory_order_relaxed; │ │ │ │ +800 break; │ │ │ │ +801 default: │ │ │ │ +802 __o2 = __o; │ │ │ │ +803 } │ │ │ │ +804 return compare_exchange_strong(__expected, _s_t_d_:_:_m_o_v_e(__desired), │ │ │ │ +805 __o, __o2); │ │ │ │ +806 } │ │ │ │ +807 │ │ │ │ +808 bool │ │ │ │ +809 compare_exchange_weak(value_type& __expected, value_type __desired, │ │ │ │ +810 _m_e_m_o_r_y___o_r_d_e_r __o, _m_e_m_o_r_y___o_r_d_e_r __o2) noexcept │ │ │ │ +811 { │ │ │ │ +812 return compare_exchange_strong(__expected, _s_t_d_:_:_m_o_v_e(__desired), │ │ │ │ +813 __o, __o2); │ │ │ │ +814 } │ │ │ │ +815 │ │ │ │ +816 bool │ │ │ │ +817 compare_exchange_weak(value_type& __expected, value_type __desired, │ │ │ │ +818 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) noexcept │ │ │ │ +819 { │ │ │ │ +820 return compare_exchange_strong(__expected, _s_t_d_:_:_m_o_v_e(__desired), __o); │ │ │ │ +821 } │ │ │ │ +822 │ │ │ │ +823#if __cpp_lib_atomic_wait │ │ │ │ +824 void │ │ │ │ +825 wait(value_type __old, │ │ │ │ +826 _m_e_m_o_r_y___o_r_d_e_r __o = memory_order_seq_cst) const noexcept │ │ │ │ +827 { │ │ │ │ +828 _M_impl.wait(_s_t_d_:_:_m_o_v_e(__old), __o); │ │ │ │ +829 } │ │ │ │ +830 │ │ │ │ +831 void │ │ │ │ +832 notify_one() noexcept │ │ │ │ +833 { │ │ │ │ +834 _M_impl.notify_one(); │ │ │ │ +835 } │ │ │ │ +836 │ │ │ │ +837 void │ │ │ │ +838 notify_all() noexcept │ │ │ │ +839 { │ │ │ │ +840 _M_impl.notify_all(); │ │ │ │ +841 } │ │ │ │ +842#endif │ │ │ │ +843 │ │ │ │ +844 private: │ │ │ │ +845 _Sp_atomic> _M_impl; │ │ │ │ +846 }; │ │ │ │ +847 /// @} group pointer_abstractions │ │ │ │ +848#endif // C++20 │ │ │ │ +849 │ │ │ │ +850_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +851} // namespace │ │ │ │ +852 │ │ │ │ +853#endif // _SHARED_PTR_ATOMIC_H │ │ │ │ +_a_t_o_m_i_c___b_a_s_e_._h │ │ │ │ +_s_t_d_:_:_m_o_v_e │ │ │ │ +constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ +Convert a value to an rvalue. │ │ │ │ +DDeeffiinniittiioonn _m_o_v_e_._h_:_9_7 │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ +void swap(any &__x, any &__y) noexcept │ │ │ │ +Exchange the states of two any objects. │ │ │ │ +DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ +_s_t_d_:_:_m_e_m_o_r_y___o_r_d_e_r │ │ │ │ +memory_order │ │ │ │ +Enumeration for memory_order. │ │ │ │ +DDeeffiinniittiioonn _a_t_o_m_i_c___b_a_s_e_._h_:_6_3 │ │ │ │ +_s_t_d_:_:_l_o_c_k │ │ │ │ +void lock(_L1 &__l1, _L2 &__l2, _L3 &... __l3) │ │ │ │ +Generic lock. │ │ │ │ +DDeeffiinniittiioonn _m_u_t_e_x_:_6_9_3 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_i_s___n_o_t_h_r_o_w___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t_i_b_l_e │ │ │ │ -is_nothrow_default_constructible │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_1_2_4 │ │ │ │ -_s_t_d_:_:_i_s___n_o_t_h_r_o_w___c_o_p_y___c_o_n_s_t_r_u_c_t_i_b_l_e │ │ │ │ -is_nothrow_copy_constructible │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_1_3_3 │ │ │ │ -_s_t_d_:_:_i_t_e_r_a_t_o_r │ │ │ │ -Common iterator class. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_2_8 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -Provides input iterator semantics for streams. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_5_8 │ │ │ │ -_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_9 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -constexpr istream_iterator() noexcept(/*conditional */) │ │ │ │ -Construct end of input stream iterator. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_7_4 │ │ │ │ -_s_t_d_:_:_i_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ -friend bool operator==(const istream_iterator &__x, const istream_iterator │ │ │ │ -&__y) noexcept │ │ │ │ -Return true if the iterators refer to the same stream, or are both at end-of- │ │ │ │ -stream. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_1_6_1 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r │ │ │ │ -Provides output iterator semantics for streams. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_1_9_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_:_2_0_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) noexcept │ │ │ │ -Construct from an ostream. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_1_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(ostream_type &__s, const _CharT *__c) noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_2_9 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_t_r_a_i_t_s___t_y_p_e │ │ │ │ -_Traits traits_type │ │ │ │ -Public typedef. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_6 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -ostream_iterator & operator=(const _Tp &__value) │ │ │ │ -Writes value to underlying ostream using operator<<. If constructed with │ │ │ │ -delimiter string,... │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_4_3 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -ptrdiff_t difference_type │ │ │ │ -Public typedef. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_3 │ │ │ │ -_s_t_d_:_:_o_s_t_r_e_a_m___i_t_e_r_a_t_o_r_:_:_o_s_t_r_e_a_m___t_y_p_e │ │ │ │ -basic_ostream< _CharT, _Traits > ostream_type │ │ │ │ -Public typedef. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_0_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(const ostream_iterator &__obj) noexcept │ │ │ │ -Copy constructor. │ │ │ │ -DDeeffiinniittiioonn _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h_:_2_3_3 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_r_e_a_m___i_t_e_r_a_t_o_r_._h │ │ │ │ + * _s_h_a_r_e_d___p_t_r___a_t_o_m_i_c_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00386.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stl_vector.h File Reference │ │ │ +libstdc++: shared_ptr_base.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -50,194 +50,167 @@ │ │ │
│ │ │
│ │ │
│ │ │ Classes | │ │ │ Namespaces | │ │ │ Macros | │ │ │ Functions
│ │ │ -
stl_vector.h File Reference
│ │ │ +
shared_ptr_base.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ Classes

struct  std::_Vector_base< _Tp, _Alloc >
struct  std::_Sp_ebo_helper< _Nm, _Tp, false >
 
class  std::vector< _Tp, _Alloc >
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_constexpr_vector
 
#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)
 
#define __cpp_lib_shared_ptr_arrays
 
#define __cpp_lib_smart_ptr_for_overwrite
 
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ 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 >
constexpr 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 >
constexpr void std::swap (vector< _Tp, _Alloc > &__x, vector< _Tp, _Alloc > &__y) noexcept(/*conditional */)
 
│ │ │ -template<typename _InputIterator , typename _ValT = typename iterator_traits<_InputIterator>::value_type, typename _Allocator = allocator<_ValT>, typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>>
 std::vector (_InputIterator, _InputIterator, _Allocator=_Allocator()) -> vector< _ValT, _Allocator >
 
template<typename _Tp , _Lock_policy _Lp = __default_lock_policy, typename _Alloc , typename... _Args>
__shared_ptr< _Tp, _Lpstd::__allocate_shared (const _Alloc &__a, _Args &&... __args)
 
template<typename _Tp , _Lock_policy _Lp = __default_lock_policy, typename... _Args>
__shared_ptr< _Tp, _Lpstd::__make_shared (_Args &&... __args)
 
void std::__throw_bad_weak_ptr ()
 
template<typename _Tp , typename _Tp1 , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::const_pointer_cast (const __shared_ptr< _Tp1, _Lp > &__r) noexcept
 
template<typename _Tp , typename _Tp1 , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::dynamic_pointer_cast (const __shared_ptr< _Tp1, _Lp > &__r) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator!= (const __shared_ptr< _Tp, _Lp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 , _Lock_policy _Lp>
bool std::operator!= (const __shared_ptr< _Tp1, _Lp > &__a, const __shared_ptr< _Tp2, _Lp > &__b) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator!= (nullptr_t, const __shared_ptr< _Tp, _Lp > &__a) noexcept
 
template<typename _Tp , typename _Up , _Lock_policy _Lp>
bool std::operator< (const __shared_ptr< _Tp, _Lp > &__a, const __shared_ptr< _Up, _Lp > &__b) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator< (const __shared_ptr< _Tp, _Lp > &__a, nullptr_t) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator< (nullptr_t, const __shared_ptr< _Tp, _Lp > &__a) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator<= (const __shared_ptr< _Tp, _Lp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 , _Lock_policy _Lp>
bool std::operator<= (const __shared_ptr< _Tp1, _Lp > &__a, const __shared_ptr< _Tp2, _Lp > &__b) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator<= (nullptr_t, const __shared_ptr< _Tp, _Lp > &__a) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator== (const __shared_ptr< _Tp, _Lp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 , _Lock_policy _Lp>
bool std::operator== (const __shared_ptr< _Tp1, _Lp > &__a, const __shared_ptr< _Tp2, _Lp > &__b) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator== (nullptr_t, const __shared_ptr< _Tp, _Lp > &__a) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator> (const __shared_ptr< _Tp, _Lp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 , _Lock_policy _Lp>
bool std::operator> (const __shared_ptr< _Tp1, _Lp > &__a, const __shared_ptr< _Tp2, _Lp > &__b) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator> (nullptr_t, const __shared_ptr< _Tp, _Lp > &__a) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator>= (const __shared_ptr< _Tp, _Lp > &__a, nullptr_t) noexcept
 
template<typename _Tp1 , typename _Tp2 , _Lock_policy _Lp>
bool std::operator>= (const __shared_ptr< _Tp1, _Lp > &__a, const __shared_ptr< _Tp2, _Lp > &__b) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
bool std::operator>= (nullptr_t, const __shared_ptr< _Tp, _Lp > &__a) noexcept
 
template<typename _Tp , typename _Tp1 , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::reinterpret_pointer_cast (const __shared_ptr< _Tp1, _Lp > &__r) noexcept
 
template<typename _Tp , typename _Tp1 , _Lock_policy _Lp>
__shared_ptr< _Tp, _Lpstd::static_pointer_cast (const __shared_ptr< _Tp1, _Lp > &__r) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
void std::swap (__shared_ptr< _Tp, _Lp > &__a, __shared_ptr< _Tp, _Lp > &__b) noexcept
 
template<typename _Tp , _Lock_policy _Lp>
void std::swap (__weak_ptr< _Tp, _Lp > &__a, __weak_ptr< _Tp, _Lp > &__b) noexcept
 
│ │ │

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file stl_vector.h.

│ │ │ +

Definition in file shared_ptr_base.h.

│ │ │

Macro Definition Documentation

│ │ │ - │ │ │ -

◆ __cpp_lib_constexpr_vector

│ │ │ - │ │ │ -
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
#define __cpp_lib_constexpr_vector
│ │ │ -
│ │ │ - │ │ │ -

Definition at line 67 of file stl_vector.h.

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

◆ _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC

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

Definition at line 292 of file stl_vector.h.

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

◆ _GLIBCXX_ASAN_ANNOTATE_GREW

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

Definition at line 290 of file stl_vector.h.

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

◆ _GLIBCXX_ASAN_ANNOTATE_GROW

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

Definition at line 289 of file stl_vector.h.

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

◆ _GLIBCXX_ASAN_ANNOTATE_REINIT

│ │ │ + │ │ │ +

◆ __cpp_lib_shared_ptr_arrays

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

Definition at line 288 of file stl_vector.h.

│ │ │ +

Definition at line 720 of file shared_ptr_base.h.

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

◆ _GLIBCXX_ASAN_ANNOTATE_SHRINK

│ │ │ + │ │ │ +

◆ __cpp_lib_smart_ptr_for_overwrite

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

Definition at line 291 of file stl_vector.h.

│ │ │ +

Definition at line 656 of file shared_ptr_base.h.

│ │ │ │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,89 +1,143 @@ │ │ │ │ libstdc++ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -stl_vector.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_:_:___V_e_c_t_o_r___b_a_s_e_<_ ___T_p_,_ ___A_l_l_o_c_ _> │ │ │ │ +struct   _s_t_d_:_:___S_p___e_b_o___h_e_l_p_e_r_<_ ___N_m_,_ ___T_p_,_ _f_a_l_s_e_ _> │ │ │ │   │ │ │ │ - class   _s_t_d_:_:_v_e_c_t_o_r_<_ ___T_p_,_ ___A_l_l_o_c_ _> │ │ │ │ +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___c_o_n_s_t_e_x_p_r___v_e_c_t_o_r │ │ │ │ -  │ │ │ │ -#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  _____c_p_p___l_i_b___s_h_a_r_e_d___p_t_r___a_r_r_a_y_s │ │ │ │   │ │ │ │ -#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) │ │ │ │ +#define  _____c_p_p___l_i_b___s_m_a_r_t___p_t_r___f_o_r___o_v_e_r_w_r_i_t_e │ │ │ │   │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _v_e_c_t_o_r< _Tp, _Alloc > &__x, const │ │ │ │ - _v_e_c_t_o_r< _Tp, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _v_e_c_t_o_r< _Tp, _Alloc > &__x, const _v_e_c_t_o_r< │ │ │ │ - _Tp, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _v_e_c_t_o_r< _Tp, _Alloc > &__x, const │ │ │ │ - _v_e_c_t_o_r< _Tp, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ -constexpr bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _v_e_c_t_o_r< _Tp, _Alloc > &__x, const │ │ │ │ - _v_e_c_t_o_r< _Tp, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _v_e_c_t_o_r< _Tp, _Alloc > &__x, const _v_e_c_t_o_r< │ │ │ │ - _Tp, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _v_e_c_t_o_r< _Tp, _Alloc > &__x, const │ │ │ │ - _v_e_c_t_o_r< _Tp, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ -constexpr _v_o_i_d  _s_t_d_:_:_s_w_a_p (_v_e_c_t_o_r< _Tp, _Alloc > &__x, _v_e_c_t_o_r< _Tp, _Alloc > │ │ │ │ - &__y) noexcept(/*_c_o_n_d_i_t_i_o_n_a_l */) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___V_a_l_T = typename │ │ │ │ -iterator_traits<_InputIterator>::value_type, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = │ │ │ │ -allocator<_ValT>, _t_y_p_e_n_a_m_e = _RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::vveeccttoorr (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ - ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _v_e_c_t_o_r< ___V_a_l_T, ___A_l_l_o_c_a_t_o_r > │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp = __default_lock_policy, _t_y_p_e_n_a_m_e │ │ │ │ +_Alloc , typename... _Args> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_____a_l_l_o_c_a_t_e___s_h_a_r_e_d (const _Alloc &__a, ___A_r_g_s │ │ │ │ + &&... _____a_r_g_s) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp = __default_lock_policy, typename... │ │ │ │ +_Args> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_____m_a_k_e___s_h_a_r_e_d (___A_r_g_s &&... _____a_r_g_s) │ │ │ │ +  │ │ │ │ + _v_o_i_d  _s_t_d_:_:_____t_h_r_o_w___b_a_d___w_e_a_k___p_t_r () │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___T_p_1 , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_c_o_n_s_t___p_o_i_n_t_e_r___c_a_s_t (const __shared_ptr< ___T_p_1, │ │ │ │ + ___L_p > &__r) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___T_p_1 , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_d_y_n_a_m_i_c___p_o_i_n_t_e_r___c_a_s_t (const __shared_ptr< ___T_p_1, │ │ │ │ + ___L_p > &__r) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const __shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_1 , _t_y_p_e_n_a_m_e _Tp2 , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const __shared_ptr< ___T_p_1, ___L_p > │ │ │ │ + &__a, const __shared_ptr< _Tp2, ___L_p > &__b) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + ___L_p > &__a) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Up , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const __shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + const __shared_ptr< _Up, ___L_p > &__b) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const __shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + ___L_p > &__a) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const __shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_1 , _t_y_p_e_n_a_m_e _Tp2 , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const __shared_ptr< ___T_p_1, ___L_p > │ │ │ │ + &__a, const __shared_ptr< _Tp2, ___L_p > &__b) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + ___L_p > &__a) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const __shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_1 , _t_y_p_e_n_a_m_e _Tp2 , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const __shared_ptr< ___T_p_1, ___L_p > │ │ │ │ + &__a, const __shared_ptr< _Tp2, ___L_p > &__b) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + ___L_p > &__a) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const __shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_1 , _t_y_p_e_n_a_m_e _Tp2 , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const __shared_ptr< ___T_p_1, ___L_p > &__a, │ │ │ │ + const __shared_ptr< _Tp2, ___L_p > &__b) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + ___L_p > &__a) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const __shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + nullptr_t) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___T_p_1 , _t_y_p_e_n_a_m_e _Tp2 , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const __shared_ptr< ___T_p_1, ___L_p > │ │ │ │ + &__a, const __shared_ptr< _Tp2, ___L_p > &__b) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (nullptr_t, const __shared_ptr< _Tp, │ │ │ │ + ___L_p > &__a) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___T_p_1 , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_r_e_i_n_t_e_r_p_r_e_t___p_o_i_n_t_e_r___c_a_s_t (const __shared_ptr< │ │ │ │ + ___T_p_1, ___L_p > &__r) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___T_p_1 , _Lock_policy _Lp> │ │ │ │ +__shared_ptr< _Tp, ___L_p >  _s_t_d_:_:_s_t_a_t_i_c___p_o_i_n_t_e_r___c_a_s_t (const __shared_ptr< ___T_p_1, │ │ │ │ + ___L_p > &__r) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + _v_o_i_d  _s_t_d_:_:_s_w_a_p (__shared_ptr< _Tp, ___L_p > &__a, │ │ │ │ + __shared_ptr< _Tp, ___L_p > &__b) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _Lock_policy _Lp> │ │ │ │ + _v_o_i_d  _s_t_d_:_:_s_w_a_p (__weak_ptr< _Tp, ___L_p > &__a, __weak_ptr< │ │ │ │ + _Tp, ___L_p > &__b) noexcept │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _s_t_l___v_e_c_t_o_r_._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__ccoonnsstteexxpprr__vveeccttoorr ********** │ │ │ │ -#define __cpp_lib_constexpr_vector │ │ │ │ -Definition at line _6_7 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ -********** _?◆_? __GGLLIIBBCCXXXX__AASSAANN__AANNNNOOTTAATTEE__BBEEFFOORREE__DDEEAALLLLOOCC ********** │ │ │ │ -#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC │ │ │ │ -Definition at line _2_9_2 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ -********** _?◆_? __GGLLIIBBCCXXXX__AASSAANN__AANNNNOOTTAATTEE__GGRREEWW ********** │ │ │ │ -#define _GLIBCXX_ASAN_ANNOTATE_GREW (   n ) │ │ │ │ -Definition at line _2_9_0 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ -********** _?◆_? __GGLLIIBBCCXXXX__AASSAANN__AANNNNOOTTAATTEE__GGRROOWW ********** │ │ │ │ -#define _GLIBCXX_ASAN_ANNOTATE_GROW (   n ) │ │ │ │ -Definition at line _2_8_9 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_8_8 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ -********** _?◆_? __GGLLIIBBCCXXXX__AASSAANN__AANNNNOOTTAATTEE__SSHHRRIINNKK ********** │ │ │ │ -#define _GLIBCXX_ASAN_ANNOTATE_SHRINK (   n ) │ │ │ │ -Definition at line _2_9_1 of file _s_t_l___v_e_c_t_o_r_._h. │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__sshhaarreedd__ppttrr__aarrrraayyss ********** │ │ │ │ +#define __cpp_lib_shared_ptr_arrays │ │ │ │ +Definition at line _7_2_0 of file _s_h_a_r_e_d___p_t_r___b_a_s_e_._h. │ │ │ │ +********** _?◆_? ____ccpppp__lliibb__ssmmaarrtt__ppttrr__ffoorr__oovveerrwwrriittee ********** │ │ │ │ +#define __cpp_lib_smart_ptr_for_overwrite │ │ │ │ +Definition at line _6_5_6 of file _s_h_a_r_e_d___p_t_r___b_a_s_e_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_l___v_e_c_t_o_r_._h │ │ │ │ + * _s_h_a_r_e_d___p_t_r___b_a_s_e_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00386.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1,10 +1,8 @@ │ │ │ │ var a00386 = [ │ │ │ │ - ["std::_Vector_base< _Tp, _Alloc >", "a08675.html", null], │ │ │ │ - ["operator!=", "a00386.html#aa8e4871fc2d47ad1f14e43949b9ce938", null], │ │ │ │ - ["operator<", "a00386.html#a8fcefae1f44d9e5656f2231d04742454", null], │ │ │ │ - ["operator<=", "a00386.html#acc2c10d2a7234cc66fd327a6f65954f7", null], │ │ │ │ - ["operator==", "a00386.html#a00026fa9234350d37423e7f059da985f", null], │ │ │ │ - ["operator>", "a00386.html#a3a727df15fd08af612b872262e50a95f", null], │ │ │ │ - ["operator>=", "a00386.html#a9a32938be630f180eddc69f0402d13ca", null], │ │ │ │ - ["swap", "a00386.html#ad420ada7eccdee66b60c11f6c84fce2f", null] │ │ │ │ + ["std::_Sp_ebo_helper< _Nm, _Tp, false >", "a07587.html", null], │ │ │ │ + ["std::_Sp_ebo_helper< _Nm, _Tp, true >", "a07583.html", null], │ │ │ │ + ["std::hash< __shared_ptr< _Tp, _Lp > >", "a07739.html", null], │ │ │ │ + ["const_pointer_cast", "a00386.html#adb18eb46e1822ef9603a6c3e8e852bf7", null], │ │ │ │ + ["dynamic_pointer_cast", "a00386.html#a571f41a06af9b30a36822738fe0ab992", null], │ │ │ │ + ["static_pointer_cast", "a00386.html#aabfc33012523ee37216271c6256af371", null] │ │ │ │ ]; │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00386_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stl_vector.h Source File │ │ │ +libstdc++: shared_ptr_base.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stl_vector.h
│ │ │ +
shared_ptr_base.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Vector implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// shared_ptr and weak_ptr implementation details -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2001-2023 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2007-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -72,2353 +72,2305 @@ │ │ │
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 >= 202002L
│ │ │ -
66# include <compare>
│ │ │ -
67#define __cpp_lib_constexpr_vector 201907L
│ │ │ +
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// weak_ptr.hpp
│ │ │ +
35// Copyright (C) 2001, 2002, 2003 Peter Dimov
│ │ │ +
36
│ │ │ +
37// enable_shared_from_this.hpp
│ │ │ +
38// Copyright (C) 2002 Peter Dimov
│ │ │ +
39
│ │ │ +
40// Distributed under the Boost Software License, Version 1.0. (See
│ │ │ +
41// accompanying file LICENSE_1_0.txt or copy at
│ │ │ +
42// http://www.boost.org/LICENSE_1_0.txt)
│ │ │ +
43
│ │ │ +
44/** @file bits/shared_ptr_base.h
│ │ │ +
45 * This is an internal header file, included by other library headers.
│ │ │ +
46 * Do not attempt to use it directly. @headername{memory}
│ │ │ +
47 */
│ │ │ +
48
│ │ │ +
49#ifndef _SHARED_PTR_BASE_H
│ │ │ +
50#define _SHARED_PTR_BASE_H 1
│ │ │ +
51
│ │ │ +
52#include <typeinfo>
│ │ │ +
53#include <bits/allocated_ptr.h>
│ │ │ +
54#include <bits/allocator.h>
│ │ │ + │ │ │ + │ │ │ +
57#include <bits/refwrap.h>
│ │ │ +
58#include <bits/stl_function.h> // std::less
│ │ │ +
59#include <bits/unique_ptr.h>
│ │ │ +
60#include <ext/aligned_buffer.h>
│ │ │ +
61#include <ext/atomicity.h>
│ │ │ +
62#include <ext/concurrence.h>
│ │ │ +
63#if __cplusplus >= 202002L
│ │ │ +
64# include <bit> // __bit_floor
│ │ │ +
65# include <compare>
│ │ │ +
66# include <bits/align.h> // std::align
│ │ │ + │ │ │
68#endif
│ │ │
69
│ │ │ -
70#include <debug/assertions.h>
│ │ │ -
71
│ │ │ -
72#if _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR
│ │ │ -
73extern "C" void
│ │ │ -
74__sanitizer_annotate_contiguous_container(const void*, const void*,
│ │ │ -
75 const void*, const void*);
│ │ │ -
76#endif
│ │ │ -
77
│ │ │ -
78namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
79{
│ │ │ -
80_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
81_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
│ │ │ -
82
│ │ │ -
83 /// See bits/stl_deque.h's _Deque_base for an explanation.
│ │ │ -
84 template<typename _Tp, typename _Alloc>
│ │ │ +
70namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
71{
│ │ │ +
72_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
73
│ │ │ +
74#if _GLIBCXX_USE_DEPRECATED
│ │ │ +
75#pragma GCC diagnostic push
│ │ │ +
76#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
77 template<typename> class auto_ptr;
│ │ │ +
78#pragma GCC diagnostic pop
│ │ │ +
79#endif
│ │ │ +
80
│ │ │ +
81 /**
│ │ │ +
82 * @brief Exception possibly thrown by @c shared_ptr.
│ │ │ +
83 * @ingroup exceptions
│ │ │ +
84 */
│ │ │
│ │ │ - │ │ │ -
86 {
│ │ │ - │ │ │ -
88 rebind<_Tp>::other _Tp_alloc_type;
│ │ │ -
89 typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer
│ │ │ -
90 pointer;
│ │ │ -
91
│ │ │ -
92 struct _Vector_impl_data
│ │ │ -
93 {
│ │ │ -
94 pointer _M_start;
│ │ │ -
95 pointer _M_finish;
│ │ │ -
96 pointer _M_end_of_storage;
│ │ │ + │ │ │ +
86 {
│ │ │ +
87 public:
│ │ │ +
88 virtual char const* what() const noexcept;
│ │ │ +
89
│ │ │ +
90 virtual ~bad_weak_ptr() noexcept;
│ │ │ +
91 };
│ │ │ +
│ │ │ +
92
│ │ │ +
93 // Substitute for bad_weak_ptr object in the case of -fno-exceptions.
│ │ │ +
94 inline void
│ │ │ +
95 __throw_bad_weak_ptr()
│ │ │ +
96 { _GLIBCXX_THROW_OR_ABORT(bad_weak_ptr()); }
│ │ │
97
│ │ │ - │ │ │ -
99 _Vector_impl_data() _GLIBCXX_NOEXCEPT
│ │ │ -
100 : _M_start(), _M_finish(), _M_end_of_storage()
│ │ │ -
101 { }
│ │ │ -
102
│ │ │ -
103#if __cplusplus >= 201103L
│ │ │ - │ │ │ -
105 _Vector_impl_data(_Vector_impl_data&& __x) noexcept
│ │ │ -
106 : _M_start(__x._M_start), _M_finish(__x._M_finish),
│ │ │ -
107 _M_end_of_storage(__x._M_end_of_storage)
│ │ │ -
108 { __x._M_start = __x._M_finish = __x._M_end_of_storage = pointer(); }
│ │ │ -
109#endif
│ │ │ -
110
│ │ │ - │ │ │ -
112 void
│ │ │ -
113 _M_copy_data(_Vector_impl_data const& __x) _GLIBCXX_NOEXCEPT
│ │ │ -
114 {
│ │ │ -
115 _M_start = __x._M_start;
│ │ │ -
116 _M_finish = __x._M_finish;
│ │ │ -
117 _M_end_of_storage = __x._M_end_of_storage;
│ │ │ -
118 }
│ │ │ -
119
│ │ │ - │ │ │ -
121 void
│ │ │ -
122 _M_swap_data(_Vector_impl_data& __x) _GLIBCXX_NOEXCEPT
│ │ │ -
123 {
│ │ │ -
124 // Do not use std::swap(_M_start, __x._M_start), etc as it loses
│ │ │ -
125 // information used by TBAA.
│ │ │ -
126 _Vector_impl_data __tmp;
│ │ │ -
127 __tmp._M_copy_data(*this);
│ │ │ -
128 _M_copy_data(__x);
│ │ │ -
129 __x._M_copy_data(__tmp);
│ │ │ -
130 }
│ │ │ -
131 };
│ │ │ -
132
│ │ │ -
133 struct _Vector_impl
│ │ │ -
134 : public _Tp_alloc_type, public _Vector_impl_data
│ │ │ -
135 {
│ │ │ - │ │ │ -
137 _Vector_impl() _GLIBCXX_NOEXCEPT_IF(
│ │ │ - │ │ │ -
139#if __cpp_lib_concepts
│ │ │ - │ │ │ -
141#endif
│ │ │ -
142 : _Tp_alloc_type()
│ │ │ -
143 { }
│ │ │ -
144
│ │ │ - │ │ │ -
146 _Vector_impl(_Tp_alloc_type const& __a) _GLIBCXX_NOEXCEPT
│ │ │ -
147 : _Tp_alloc_type(__a)
│ │ │ -
148 { }
│ │ │ -
149
│ │ │ -
150#if __cplusplus >= 201103L
│ │ │ -
151 // Not defaulted, to enforce noexcept(true) even when
│ │ │ -
152 // !is_nothrow_move_constructible<_Tp_alloc_type>.
│ │ │ - │ │ │ -
154 _Vector_impl(_Vector_impl&& __x) noexcept
│ │ │ -
155 : _Tp_alloc_type(std::move(__x)), _Vector_impl_data(std::move(__x))
│ │ │ -
156 { }
│ │ │ -
157
│ │ │ - │ │ │ -
159 _Vector_impl(_Tp_alloc_type&& __a) noexcept
│ │ │ -
160 : _Tp_alloc_type(std::move(__a))
│ │ │ -
161 { }
│ │ │ -
162
│ │ │ - │ │ │ -
164 _Vector_impl(_Tp_alloc_type&& __a, _Vector_impl&& __rv) noexcept
│ │ │ -
165 : _Tp_alloc_type(std::move(__a)), _Vector_impl_data(std::move(__rv))
│ │ │ -
166 { }
│ │ │ -
167#endif
│ │ │ -
168
│ │ │ -
169#if _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR
│ │ │ -
170 template<typename = _Tp_alloc_type>
│ │ │ -
171 struct _Asan
│ │ │ -
172 {
│ │ │ - │ │ │ -
174 ::size_type size_type;
│ │ │ -
175
│ │ │ -
176 static _GLIBCXX20_CONSTEXPR void
│ │ │ -
177 _S_shrink(_Vector_impl&, size_type) { }
│ │ │ -
178 static _GLIBCXX20_CONSTEXPR void
│ │ │ -
179 _S_on_dealloc(_Vector_impl&) { }
│ │ │ -
180
│ │ │ -
181 typedef _Vector_impl& _Reinit;
│ │ │ -
182
│ │ │ -
183 struct _Grow
│ │ │ -
184 {
│ │ │ -
185 _GLIBCXX20_CONSTEXPR _Grow(_Vector_impl&, size_type) { }
│ │ │ -
186 _GLIBCXX20_CONSTEXPR void _M_grew(size_type) { }
│ │ │ -
187 };
│ │ │ -
188 };
│ │ │ -
189
│ │ │ -
190 // Enable ASan annotations for memory obtained from std::allocator.
│ │ │ -
191 template<typename _Up>
│ │ │ -
192 struct _Asan<allocator<_Up> >
│ │ │ -
193 {
│ │ │ - │ │ │ -
195 ::size_type size_type;
│ │ │ -
196
│ │ │ -
197 // Adjust ASan annotation for [_M_start, _M_end_of_storage) to
│ │ │ -
198 // mark end of valid region as __curr instead of __prev.
│ │ │ -
199 static _GLIBCXX20_CONSTEXPR void
│ │ │ -
200 _S_adjust(_Vector_impl& __impl, pointer __prev, pointer __curr)
│ │ │ -
201 {
│ │ │ -
202#if __cpp_lib_is_constant_evaluated
│ │ │ - │ │ │ -
204 return;
│ │ │ -
205#endif
│ │ │ - │ │ │ -
207 __impl._M_end_of_storage, __prev, __curr);
│ │ │ -
208 }
│ │ │ -
209
│ │ │ -
210 static _GLIBCXX20_CONSTEXPR void
│ │ │ -
211 _S_grow(_Vector_impl& __impl, size_type __n)
│ │ │ -
212 { _S_adjust(__impl, __impl._M_finish, __impl._M_finish + __n); }
│ │ │ -
213
│ │ │ -
214 static _GLIBCXX20_CONSTEXPR void
│ │ │ -
215 _S_shrink(_Vector_impl& __impl, size_type __n)
│ │ │ -
216 { _S_adjust(__impl, __impl._M_finish + __n, __impl._M_finish); }
│ │ │ -
217
│ │ │ -
218 static _GLIBCXX20_CONSTEXPR void
│ │ │ -
219 _S_on_dealloc(_Vector_impl& __impl)
│ │ │ -
220 {
│ │ │ -
221 if (__impl._M_start)
│ │ │ -
222 _S_adjust(__impl, __impl._M_finish, __impl._M_end_of_storage);
│ │ │ -
223 }
│ │ │ +
98 using __gnu_cxx::_Lock_policy;
│ │ │ +
99 using __gnu_cxx::__default_lock_policy;
│ │ │ +
100 using __gnu_cxx::_S_single;
│ │ │ +
101 using __gnu_cxx::_S_mutex;
│ │ │ +
102 using __gnu_cxx::_S_atomic;
│ │ │ +
103
│ │ │ +
104 // Empty helper class except when the template argument is _S_mutex.
│ │ │ +
105 template<_Lock_policy _Lp>
│ │ │ +
106 class _Mutex_base
│ │ │ +
107 {
│ │ │ +
108 protected:
│ │ │ +
109 // The atomic policy uses fully-fenced builtins, single doesn't care.
│ │ │ +
110 enum { _S_need_barriers = 0 };
│ │ │ +
111 };
│ │ │ +
112
│ │ │ +
113 template<>
│ │ │ +
114 class _Mutex_base<_S_mutex>
│ │ │ +
115 : public __gnu_cxx::__mutex
│ │ │ +
116 {
│ │ │ +
117 protected:
│ │ │ +
118 // This policy is used when atomic builtins are not available.
│ │ │ +
119 // The replacement atomic operations might not have the necessary
│ │ │ +
120 // memory barriers.
│ │ │ +
121 enum { _S_need_barriers = 1 };
│ │ │ +
122 };
│ │ │ +
123
│ │ │ +
124 template<_Lock_policy _Lp = __default_lock_policy>
│ │ │ +
125 class _Sp_counted_base
│ │ │ +
126 : public _Mutex_base<_Lp>
│ │ │ +
127 {
│ │ │ +
128 public:
│ │ │ +
129 _Sp_counted_base() noexcept
│ │ │ +
130 : _M_use_count(1), _M_weak_count(1) { }
│ │ │ +
131
│ │ │ +
132 virtual
│ │ │ +
133 ~_Sp_counted_base() noexcept
│ │ │ +
134 { }
│ │ │ +
135
│ │ │ +
136 // Called when _M_use_count drops to zero, to release the resources
│ │ │ +
137 // managed by *this.
│ │ │ +
138 virtual void
│ │ │ +
139 _M_dispose() noexcept = 0;
│ │ │ +
140
│ │ │ +
141 // Called when _M_weak_count drops to zero.
│ │ │ +
142 virtual void
│ │ │ +
143 _M_destroy() noexcept
│ │ │ +
144 { delete this; }
│ │ │ +
145
│ │ │ +
146 virtual void*
│ │ │ +
147 _M_get_deleter(const std::type_info&) noexcept = 0;
│ │ │ +
148
│ │ │ +
149 // Increment the use count (used when the count is greater than zero).
│ │ │ +
150 void
│ │ │ +
151 _M_add_ref_copy()
│ │ │ +
152 { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); }
│ │ │ +
153
│ │ │ +
154 // Increment the use count if it is non-zero, throw otherwise.
│ │ │ +
155 void
│ │ │ +
156 _M_add_ref_lock()
│ │ │ +
157 {
│ │ │ +
158 if (!_M_add_ref_lock_nothrow())
│ │ │ +
159 __throw_bad_weak_ptr();
│ │ │ +
160 }
│ │ │ +
161
│ │ │ +
162 // Increment the use count if it is non-zero.
│ │ │ +
163 bool
│ │ │ +
164 _M_add_ref_lock_nothrow() noexcept;
│ │ │ +
165
│ │ │ +
166 // Decrement the use count.
│ │ │ +
167 void
│ │ │ +
168 _M_release() noexcept;
│ │ │ +
169
│ │ │ +
170 // Called by _M_release() when the use count reaches zero.
│ │ │ +
171 void
│ │ │ +
172 _M_release_last_use() noexcept
│ │ │ +
173 {
│ │ │ +
174 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_use_count);
│ │ │ +
175 _M_dispose();
│ │ │ +
176 // There must be a memory barrier between dispose() and destroy()
│ │ │ +
177 // to ensure that the effects of dispose() are observed in the
│ │ │ +
178 // thread that runs destroy().
│ │ │ +
179 // See http://gcc.gnu.org/ml/libstdc++/2005-11/msg00136.html
│ │ │ +
180 if (_Mutex_base<_Lp>::_S_need_barriers)
│ │ │ +
181 {
│ │ │ +
182 __atomic_thread_fence (__ATOMIC_ACQ_REL);
│ │ │ +
183 }
│ │ │ +
184
│ │ │ +
185 // Be race-detector-friendly. For more info see bits/c++config.
│ │ │ +
186 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count);
│ │ │ +
187 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count,
│ │ │ +
188 -1) == 1)
│ │ │ +
189 {
│ │ │ +
190 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count);
│ │ │ +
191 _M_destroy();
│ │ │ +
192 }
│ │ │ +
193 }
│ │ │ +
194
│ │ │ +
195 // As above, but 'noinline' to reduce code size on the cold path.
│ │ │ +
196 __attribute__((__noinline__))
│ │ │ +
197 void
│ │ │ +
198 _M_release_last_use_cold() noexcept
│ │ │ +
199 { _M_release_last_use(); }
│ │ │ +
200
│ │ │ +
201 // Increment the weak count.
│ │ │ +
202 void
│ │ │ +
203 _M_weak_add_ref() noexcept
│ │ │ +
204 { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); }
│ │ │ +
205
│ │ │ +
206 // Decrement the weak count.
│ │ │ +
207 void
│ │ │ +
208 _M_weak_release() noexcept
│ │ │ +
209 {
│ │ │ +
210 // Be race-detector-friendly. For more info see bits/c++config.
│ │ │ +
211 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count);
│ │ │ +
212 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1)
│ │ │ +
213 {
│ │ │ +
214 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count);
│ │ │ +
215 if (_Mutex_base<_Lp>::_S_need_barriers)
│ │ │ +
216 {
│ │ │ +
217 // See _M_release(),
│ │ │ +
218 // destroy() must observe results of dispose()
│ │ │ +
219 __atomic_thread_fence (__ATOMIC_ACQ_REL);
│ │ │ +
220 }
│ │ │ +
221 _M_destroy();
│ │ │ +
222 }
│ │ │ +
223 }
│ │ │
224
│ │ │ -
225 // Used on reallocation to tell ASan unused capacity is invalid.
│ │ │ -
226 struct _Reinit
│ │ │ -
227 {
│ │ │ -
228 explicit _GLIBCXX20_CONSTEXPR
│ │ │ -
229 _Reinit(_Vector_impl& __impl) : _M_impl(__impl)
│ │ │ -
230 {
│ │ │ -
231 // Mark unused capacity as valid again before deallocating it.
│ │ │ -
232 _S_on_dealloc(_M_impl);
│ │ │ -
233 }
│ │ │ -
234
│ │ │ - │ │ │ -
236 ~_Reinit()
│ │ │ -
237 {
│ │ │ -
238 // Mark unused capacity as invalid after reallocation.
│ │ │ -
239 if (_M_impl._M_start)
│ │ │ -
240 _S_adjust(_M_impl, _M_impl._M_end_of_storage,
│ │ │ -
241 _M_impl._M_finish);
│ │ │ -
242 }
│ │ │ -
243
│ │ │ -
244 _Vector_impl& _M_impl;
│ │ │ -
245
│ │ │ -
246#if __cplusplus >= 201103L
│ │ │ -
247 _Reinit(const _Reinit&) = delete;
│ │ │ -
248 _Reinit& operator=(const _Reinit&) = delete;
│ │ │ -
249#endif
│ │ │ -
250 };
│ │ │ +
225 long
│ │ │ +
226 _M_get_use_count() const noexcept
│ │ │ +
227 {
│ │ │ +
228 // No memory barrier is used here so there is no synchronization
│ │ │ +
229 // with other threads.
│ │ │ +
230 return __atomic_load_n(&_M_use_count, __ATOMIC_RELAXED);
│ │ │ +
231 }
│ │ │ +
232
│ │ │ +
233 private:
│ │ │ +
234 _Sp_counted_base(_Sp_counted_base const&) = delete;
│ │ │ +
235 _Sp_counted_base& operator=(_Sp_counted_base const&) = delete;
│ │ │ +
236
│ │ │ +
237 _Atomic_word _M_use_count; // #shared
│ │ │ +
238 _Atomic_word _M_weak_count; // #weak + (#shared != 0)
│ │ │ +
239 };
│ │ │ +
240
│ │ │ +
241 template<>
│ │ │ +
242 inline bool
│ │ │ +
243 _Sp_counted_base<_S_single>::
│ │ │ +
244 _M_add_ref_lock_nothrow() noexcept
│ │ │ +
245 {
│ │ │ +
246 if (_M_use_count == 0)
│ │ │ +
247 return false;
│ │ │ +
248 ++_M_use_count;
│ │ │ +
249 return true;
│ │ │ +
250 }
│ │ │
251
│ │ │ -
252 // Tell ASan when unused capacity is initialized to be valid.
│ │ │ -
253 struct _Grow
│ │ │ -
254 {
│ │ │ - │ │ │ -
256 _Grow(_Vector_impl& __impl, size_type __n)
│ │ │ -
257 : _M_impl(__impl), _M_n(__n)
│ │ │ -
258 { _S_grow(_M_impl, __n); }
│ │ │ -
259
│ │ │ - │ │ │ -
261 ~_Grow() { if (_M_n) _S_shrink(_M_impl, _M_n); }
│ │ │ -
262
│ │ │ - │ │ │ -
264 void _M_grew(size_type __n) { _M_n -= __n; }
│ │ │ +
252 template<>
│ │ │ +
253 inline bool
│ │ │ +
254 _Sp_counted_base<_S_mutex>::
│ │ │ +
255 _M_add_ref_lock_nothrow() noexcept
│ │ │ +
256 {
│ │ │ +
257 __gnu_cxx::__scoped_lock sentry(*this);
│ │ │ +
258 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0)
│ │ │ +
259 {
│ │ │ +
260 _M_use_count = 0;
│ │ │ +
261 return false;
│ │ │ +
262 }
│ │ │ +
263 return true;
│ │ │ +
264 }
│ │ │
265
│ │ │ -
266#if __cplusplus >= 201103L
│ │ │ -
267 _Grow(const _Grow&) = delete;
│ │ │ -
268 _Grow& operator=(const _Grow&) = delete;
│ │ │ -
269#endif
│ │ │ -
270 private:
│ │ │ -
271 _Vector_impl& _M_impl;
│ │ │ -
272 size_type _M_n;
│ │ │ -
273 };
│ │ │ -
274 };
│ │ │ -
275
│ │ │ -
276#define _GLIBCXX_ASAN_ANNOTATE_REINIT \
│ │ │ -
277 typename _Base::_Vector_impl::template _Asan<>::_Reinit const \
│ │ │ -
278 __attribute__((__unused__)) __reinit_guard(this->_M_impl)
│ │ │ -
279#define _GLIBCXX_ASAN_ANNOTATE_GROW(n) \
│ │ │ -
280 typename _Base::_Vector_impl::template _Asan<>::_Grow \
│ │ │ -
281 __attribute__((__unused__)) __grow_guard(this->_M_impl, (n))
│ │ │ -
282#define _GLIBCXX_ASAN_ANNOTATE_GREW(n) __grow_guard._M_grew(n)
│ │ │ -
283#define _GLIBCXX_ASAN_ANNOTATE_SHRINK(n) \
│ │ │ -
284 _Base::_Vector_impl::template _Asan<>::_S_shrink(this->_M_impl, n)
│ │ │ -
285#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC \
│ │ │ -
286 _Base::_Vector_impl::template _Asan<>::_S_on_dealloc(this->_M_impl)
│ │ │ -
287#else // ! (_GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR)
│ │ │ -
288#define _GLIBCXX_ASAN_ANNOTATE_REINIT
│ │ │ -
289#define _GLIBCXX_ASAN_ANNOTATE_GROW(n)
│ │ │ -
290#define _GLIBCXX_ASAN_ANNOTATE_GREW(n)
│ │ │ -
291#define _GLIBCXX_ASAN_ANNOTATE_SHRINK(n)
│ │ │ -
292#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC
│ │ │ -
293#endif // _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR
│ │ │ -
294 };
│ │ │ -
295
│ │ │ -
296 public:
│ │ │ -
297 typedef _Alloc allocator_type;
│ │ │ -
298
│ │ │ - │ │ │ -
300 _Tp_alloc_type&
│ │ │ -
301 _M_get_Tp_allocator() _GLIBCXX_NOEXCEPT
│ │ │ -
302 { return this->_M_impl; }
│ │ │ -
303
│ │ │ - │ │ │ -
305 const _Tp_alloc_type&
│ │ │ -
306 _M_get_Tp_allocator() const _GLIBCXX_NOEXCEPT
│ │ │ -
307 { return this->_M_impl; }
│ │ │ -
308
│ │ │ - │ │ │ -
310 allocator_type
│ │ │ -
│ │ │ -
311 get_allocator() const _GLIBCXX_NOEXCEPT
│ │ │ -
312 { return allocator_type(_M_get_Tp_allocator()); }
│ │ │ -
│ │ │ -
313
│ │ │ -
314#if __cplusplus >= 201103L
│ │ │ -
315 _Vector_base() = default;
│ │ │ -
316#else
│ │ │ -
317 _Vector_base() { }
│ │ │ -
318#endif
│ │ │ -
319
│ │ │ -
320 _GLIBCXX20_CONSTEXPR
│ │ │ -
321 _Vector_base(const allocator_type& __a) _GLIBCXX_NOEXCEPT
│ │ │ -
322 : _M_impl(__a) { }
│ │ │ -
323
│ │ │ -
324 // Kept for ABI compatibility.
│ │ │ -
325#if !_GLIBCXX_INLINE_VERSION
│ │ │ -
326 _GLIBCXX20_CONSTEXPR
│ │ │ -
327 _Vector_base(size_t __n)
│ │ │ -
328 : _M_impl()
│ │ │ -
329 { _M_create_storage(__n); }
│ │ │ -
330#endif
│ │ │ -
331
│ │ │ -
332 _GLIBCXX20_CONSTEXPR
│ │ │ -
333 _Vector_base(size_t __n, const allocator_type& __a)
│ │ │ -
334 : _M_impl(__a)
│ │ │ -
335 { _M_create_storage(__n); }
│ │ │ -
336
│ │ │ -
337#if __cplusplus >= 201103L
│ │ │ -
338 _Vector_base(_Vector_base&&) = default;
│ │ │ -
339
│ │ │ -
340 // Kept for ABI compatibility.
│ │ │ -
341# if !_GLIBCXX_INLINE_VERSION
│ │ │ -
342 _GLIBCXX20_CONSTEXPR
│ │ │ -
343 _Vector_base(_Tp_alloc_type&& __a) noexcept
│ │ │ -
344 : _M_impl(std::move(__a)) { }
│ │ │ -
345
│ │ │ -
346 _GLIBCXX20_CONSTEXPR
│ │ │ -
347 _Vector_base(_Vector_base&& __x, const allocator_type& __a)
│ │ │ -
348 : _M_impl(__a)
│ │ │ -
349 {
│ │ │ -
350 if (__x.get_allocator() == __a)
│ │ │ -
351 this->_M_impl._M_swap_data(__x._M_impl);
│ │ │ -
352 else
│ │ │ -
353 {
│ │ │ -
354 size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start;
│ │ │ -
355 _M_create_storage(__n);
│ │ │ -
356 }
│ │ │ -
357 }
│ │ │ -
358# endif
│ │ │ -
359
│ │ │ -
360 _GLIBCXX20_CONSTEXPR
│ │ │ -
361 _Vector_base(const allocator_type& __a, _Vector_base&& __x)
│ │ │ -
362 : _M_impl(_Tp_alloc_type(__a), std::move(__x._M_impl))
│ │ │ -
363 { }
│ │ │ -
364#endif
│ │ │ -
365
│ │ │ -
366 _GLIBCXX20_CONSTEXPR
│ │ │ -
367 ~_Vector_base() _GLIBCXX_NOEXCEPT
│ │ │ -
368 {
│ │ │ -
369 _M_deallocate(_M_impl._M_start,
│ │ │ -
370 _M_impl._M_end_of_storage - _M_impl._M_start);
│ │ │ -
371 }
│ │ │ -
372
│ │ │ -
373 public:
│ │ │ -
374 _Vector_impl _M_impl;
│ │ │ -
375
│ │ │ -
376 _GLIBCXX20_CONSTEXPR
│ │ │ -
377 pointer
│ │ │ -
378 _M_allocate(size_t __n)
│ │ │ -
379 {
│ │ │ - │ │ │ -
381 return __n != 0 ? _Tr::allocate(_M_impl, __n) : pointer();
│ │ │ -
382 }
│ │ │ +
266 template<>
│ │ │ +
267 inline bool
│ │ │ +
268 _Sp_counted_base<_S_atomic>::
│ │ │ +
269 _M_add_ref_lock_nothrow() noexcept
│ │ │ +
270 {
│ │ │ +
271 // Perform lock-free add-if-not-zero operation.
│ │ │ +
272 _Atomic_word __count = _M_get_use_count();
│ │ │ +
273 do
│ │ │ +
274 {
│ │ │ +
275 if (__count == 0)
│ │ │ +
276 return false;
│ │ │ +
277 // Replace the current counter value with the old value + 1, as
│ │ │ +
278 // long as it's not changed meanwhile.
│ │ │ +
279 }
│ │ │ +
280 while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1,
│ │ │ +
281 true, __ATOMIC_ACQ_REL,
│ │ │ +
282 __ATOMIC_RELAXED));
│ │ │ +
283 return true;
│ │ │ +
284 }
│ │ │ +
285
│ │ │ +
286 template<>
│ │ │ +
287 inline void
│ │ │ +
288 _Sp_counted_base<_S_single>::_M_add_ref_copy()
│ │ │ +
289 { ++_M_use_count; }
│ │ │ +
290
│ │ │ +
291 template<>
│ │ │ +
292 inline void
│ │ │ +
293 _Sp_counted_base<_S_single>::_M_release() noexcept
│ │ │ +
294 {
│ │ │ +
295 if (--_M_use_count == 0)
│ │ │ +
296 {
│ │ │ +
297 _M_dispose();
│ │ │ +
298 if (--_M_weak_count == 0)
│ │ │ +
299 _M_destroy();
│ │ │ +
300 }
│ │ │ +
301 }
│ │ │ +
302
│ │ │ +
303 template<>
│ │ │ +
304 inline void
│ │ │ +
305 _Sp_counted_base<_S_mutex>::_M_release() noexcept
│ │ │ +
306 {
│ │ │ +
307 // Be race-detector-friendly. For more info see bits/c++config.
│ │ │ +
308 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_use_count);
│ │ │ +
309 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1)
│ │ │ +
310 {
│ │ │ +
311 _M_release_last_use();
│ │ │ +
312 }
│ │ │ +
313 }
│ │ │ +
314
│ │ │ +
315 template<>
│ │ │ +
316 inline void
│ │ │ +
317 _Sp_counted_base<_S_atomic>::_M_release() noexcept
│ │ │ +
318 {
│ │ │ +
319 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_use_count);
│ │ │ +
320#if ! _GLIBCXX_TSAN
│ │ │ +
321 constexpr bool __lock_free
│ │ │ +
322 = __atomic_always_lock_free(sizeof(long long), 0)
│ │ │ +
323 && __atomic_always_lock_free(sizeof(_Atomic_word), 0);
│ │ │ +
324 constexpr bool __double_word
│ │ │ +
325 = sizeof(long long) == 2 * sizeof(_Atomic_word);
│ │ │ +
326 // The ref-count members follow the vptr, so are aligned to
│ │ │ +
327 // alignof(void*).
│ │ │ +
328 constexpr bool __aligned = __alignof(long long) <= alignof(void*);
│ │ │ +
329 if _GLIBCXX17_CONSTEXPR (__lock_free && __double_word && __aligned)
│ │ │ +
330 {
│ │ │ +
331 constexpr int __wordbits = __CHAR_BIT__ * sizeof(_Atomic_word);
│ │ │ +
332 constexpr int __shiftbits = __double_word ? __wordbits : 0;
│ │ │ +
333 constexpr long long __unique_ref = 1LL + (1LL << __shiftbits);
│ │ │ +
334 auto __both_counts = reinterpret_cast<long long*>(&_M_use_count);
│ │ │ +
335
│ │ │ +
336 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count);
│ │ │ +
337 if (__atomic_load_n(__both_counts, __ATOMIC_ACQUIRE) == __unique_ref)
│ │ │ +
338 {
│ │ │ +
339 // Both counts are 1, so there are no weak references and
│ │ │ +
340 // we are releasing the last strong reference. No other
│ │ │ +
341 // threads can observe the effects of this _M_release()
│ │ │ +
342 // call (e.g. calling use_count()) without a data race.
│ │ │ +
343 _M_weak_count = _M_use_count = 0;
│ │ │ +
344 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_use_count);
│ │ │ +
345 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count);
│ │ │ +
346 _M_dispose();
│ │ │ +
347 _M_destroy();
│ │ │ +
348 return;
│ │ │ +
349 }
│ │ │ +
350 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1)
│ │ │ +
351 [[__unlikely__]]
│ │ │ +
352 {
│ │ │ +
353 _M_release_last_use_cold();
│ │ │ +
354 return;
│ │ │ +
355 }
│ │ │ +
356 }
│ │ │ +
357 else
│ │ │ +
358#endif
│ │ │ +
359 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1)
│ │ │ +
360 {
│ │ │ +
361 _M_release_last_use();
│ │ │ +
362 }
│ │ │ +
363 }
│ │ │ +
364
│ │ │ +
365 template<>
│ │ │ +
366 inline void
│ │ │ +
367 _Sp_counted_base<_S_single>::_M_weak_add_ref() noexcept
│ │ │ +
368 { ++_M_weak_count; }
│ │ │ +
369
│ │ │ +
370 template<>
│ │ │ +
371 inline void
│ │ │ +
372 _Sp_counted_base<_S_single>::_M_weak_release() noexcept
│ │ │ +
373 {
│ │ │ +
374 if (--_M_weak_count == 0)
│ │ │ +
375 _M_destroy();
│ │ │ +
376 }
│ │ │ +
377
│ │ │ +
378 template<>
│ │ │ +
379 inline long
│ │ │ +
380 _Sp_counted_base<_S_single>::_M_get_use_count() const noexcept
│ │ │ +
381 { return _M_use_count; }
│ │ │ +
382
│ │ │
383
│ │ │ -
384 _GLIBCXX20_CONSTEXPR
│ │ │ -
385 void
│ │ │ -
386 _M_deallocate(pointer __p, size_t __n)
│ │ │ -
387 {
│ │ │ - │ │ │ -
389 if (__p)
│ │ │ -
390 _Tr::deallocate(_M_impl, __p, __n);
│ │ │ -
391 }
│ │ │ -
392
│ │ │ -
393 protected:
│ │ │ -
394 _GLIBCXX20_CONSTEXPR
│ │ │ -
395 void
│ │ │ -
396 _M_create_storage(size_t __n)
│ │ │ -
397 {
│ │ │ -
398 this->_M_impl._M_start = this->_M_allocate(__n);
│ │ │ -
399 this->_M_impl._M_finish = this->_M_impl._M_start;
│ │ │ -
400 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
│ │ │ -
401 }
│ │ │ -
402 };
│ │ │ -
│ │ │ -
403
│ │ │ -
404 /**
│ │ │ -
405 * @brief A standard container which offers fixed time access to
│ │ │ -
406 * individual elements in any order.
│ │ │ -
407 *
│ │ │ -
408 * @ingroup sequences
│ │ │ -
409 * @headerfile vector
│ │ │ -
410 * @since C++98
│ │ │ -
411 *
│ │ │ -
412 * @tparam _Tp Type of element.
│ │ │ -
413 * @tparam _Alloc Allocator type, defaults to allocator<_Tp>.
│ │ │ -
414 *
│ │ │ -
415 * Meets the requirements of a <a href="tables.html#65">container</a>, a
│ │ │ -
416 * <a href="tables.html#66">reversible container</a>, and a
│ │ │ -
417 * <a href="tables.html#67">sequence</a>, including the
│ │ │ -
418 * <a href="tables.html#68">optional sequence requirements</a> with the
│ │ │ -
419 * %exception of @c push_front and @c pop_front.
│ │ │ -
420 *
│ │ │ -
421 * In some terminology a %vector can be described as a dynamic
│ │ │ -
422 * C-style array, it offers fast and efficient access to individual
│ │ │ -
423 * elements in any order and saves the user from worrying about
│ │ │ -
424 * memory and size allocation. Subscripting ( @c [] ) access is
│ │ │ -
425 * also provided as with C-style arrays.
│ │ │ -
426 */
│ │ │ -
427 template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
│ │ │ -
│ │ │ -
428 class vector : protected _Vector_base<_Tp, _Alloc>
│ │ │ -
429 {
│ │ │ -
430#ifdef _GLIBCXX_CONCEPT_CHECKS
│ │ │ -
431 // Concept requirements.
│ │ │ -
432 typedef typename _Alloc::value_type _Alloc_value_type;
│ │ │ -
433# if __cplusplus < 201103L
│ │ │ -
434 __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
│ │ │ -
435# endif
│ │ │ -
436 __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
│ │ │ -
437#endif
│ │ │ -
438
│ │ │ -
439#if __cplusplus >= 201103L
│ │ │ -
440 static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value,
│ │ │ -
441 "std::vector must have a non-const, non-volatile value_type");
│ │ │ -
442# if __cplusplus > 201703L || defined __STRICT_ANSI__
│ │ │ - │ │ │ -
444 "std::vector must have the same value_type as its allocator");
│ │ │ -
445# endif
│ │ │ -
446#endif
│ │ │ -
447
│ │ │ - │ │ │ -
449 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
│ │ │ - │ │ │ -
451
│ │ │ -
452 public:
│ │ │ -
453 typedef _Tp value_type;
│ │ │ -
454 typedef typename _Base::pointer pointer;
│ │ │ -
455 typedef typename _Alloc_traits::const_pointer const_pointer;
│ │ │ -
456 typedef typename _Alloc_traits::reference reference;
│ │ │ -
457 typedef typename _Alloc_traits::const_reference const_reference;
│ │ │ -
458 typedef __gnu_cxx::__normal_iterator<pointer, vector> iterator;
│ │ │ -
459 typedef __gnu_cxx::__normal_iterator<const_pointer, vector>
│ │ │ -
460 const_iterator;
│ │ │ - │ │ │ - │ │ │ -
463 typedef size_t size_type;
│ │ │ -
464 typedef ptrdiff_t difference_type;
│ │ │ -
465 typedef _Alloc allocator_type;
│ │ │ -
466
│ │ │ -
467 private:
│ │ │ -
468#if __cplusplus >= 201103L
│ │ │ -
469 static constexpr bool
│ │ │ -
470 _S_nothrow_relocate(true_type)
│ │ │ -
471 {
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
476 }
│ │ │ -
477
│ │ │ -
478 static constexpr bool
│ │ │ -
479 _S_nothrow_relocate(false_type)
│ │ │ -
480 { return false; }
│ │ │ -
481
│ │ │ -
482 static constexpr bool
│ │ │ -
483 _S_use_relocate()
│ │ │ -
484 {
│ │ │ -
485 // Instantiating std::__relocate_a might cause an error outside the
│ │ │ -
486 // immediate context (in __relocate_object_a's noexcept-specifier),
│ │ │ -
487 // so only do it if we know the type can be move-inserted into *this.
│ │ │ -
488 return _S_nothrow_relocate(__is_move_insertable<_Tp_alloc_type>{});
│ │ │ -
489 }
│ │ │ -
490
│ │ │ -
491 static pointer
│ │ │ -
492 _S_do_relocate(pointer __first, pointer __last, pointer __result,
│ │ │ -
493 _Tp_alloc_type& __alloc, true_type) noexcept
│ │ │ -
494 {
│ │ │ -
495 return std::__relocate_a(__first, __last, __result, __alloc);
│ │ │ -
496 }
│ │ │ -
497
│ │ │ -
498 static pointer
│ │ │ -
499 _S_do_relocate(pointer, pointer, pointer __result,
│ │ │ -
500 _Tp_alloc_type&, false_type) noexcept
│ │ │ -
501 { return __result; }
│ │ │ -
502
│ │ │ -
503 static _GLIBCXX20_CONSTEXPR pointer
│ │ │ -
504 _S_relocate(pointer __first, pointer __last, pointer __result,
│ │ │ -
505 _Tp_alloc_type& __alloc) noexcept
│ │ │ -
506 {
│ │ │ -
507#if __cpp_if_constexpr
│ │ │ -
508 // All callers have already checked _S_use_relocate() so just do it.
│ │ │ -
509 return std::__relocate_a(__first, __last, __result, __alloc);
│ │ │ -
510#else
│ │ │ -
511 using __do_it = __bool_constant<_S_use_relocate()>;
│ │ │ -
512 return _S_do_relocate(__first, __last, __result, __alloc, __do_it{});
│ │ │ -
513#endif
│ │ │ -
514 }
│ │ │ -
515#endif // C++11
│ │ │ -
516
│ │ │ -
517 protected:
│ │ │ -
518 using _Base::_M_allocate;
│ │ │ -
519 using _Base::_M_deallocate;
│ │ │ -
520 using _Base::_M_impl;
│ │ │ -
521 using _Base::_M_get_Tp_allocator;
│ │ │ +
384 // Forward declarations.
│ │ │ +
385 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
│ │ │ +
386 class __shared_ptr;
│ │ │ +
387
│ │ │ +
388 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
│ │ │ +
389 class __weak_ptr;
│ │ │ +
390
│ │ │ +
391 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
│ │ │ +
392 class __enable_shared_from_this;
│ │ │ +
393
│ │ │ +
394 template<typename _Tp>
│ │ │ +
395 class shared_ptr;
│ │ │ +
396
│ │ │ +
397 template<typename _Tp>
│ │ │ +
398 class weak_ptr;
│ │ │ +
399
│ │ │ +
400 template<typename _Tp>
│ │ │ +
401 struct owner_less;
│ │ │ +
402
│ │ │ +
403 template<typename _Tp>
│ │ │ +
404 class enable_shared_from_this;
│ │ │ +
405
│ │ │ +
406 template<_Lock_policy _Lp = __default_lock_policy>
│ │ │ +
407 class __weak_count;
│ │ │ +
408
│ │ │ +
409 template<_Lock_policy _Lp = __default_lock_policy>
│ │ │ +
410 class __shared_count;
│ │ │ +
411
│ │ │ +
412#if __cplusplus >= 202002L
│ │ │ +
413 template<typename>
│ │ │ +
414 class _Sp_atomic;
│ │ │ +
415#endif
│ │ │ +
416
│ │ │ +
417 // Counted ptr with no deleter or allocator support
│ │ │ +
418 template<typename _Ptr, _Lock_policy _Lp>
│ │ │ +
419 class _Sp_counted_ptr final : public _Sp_counted_base<_Lp>
│ │ │ +
420 {
│ │ │ +
421 public:
│ │ │ +
422 explicit
│ │ │ +
423 _Sp_counted_ptr(_Ptr __p) noexcept
│ │ │ +
424 : _M_ptr(__p) { }
│ │ │ +
425
│ │ │ +
426 virtual void
│ │ │ +
427 _M_dispose() noexcept
│ │ │ +
428 { delete _M_ptr; }
│ │ │ +
429
│ │ │ +
430 virtual void
│ │ │ +
431 _M_destroy() noexcept
│ │ │ +
432 { delete this; }
│ │ │ +
433
│ │ │ +
434 virtual void*
│ │ │ +
435 _M_get_deleter(const std::type_info&) noexcept
│ │ │ +
436 { return nullptr; }
│ │ │ +
437
│ │ │ +
438 _Sp_counted_ptr(const _Sp_counted_ptr&) = delete;
│ │ │ +
439 _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete;
│ │ │ +
440
│ │ │ +
441 private:
│ │ │ +
442 _Ptr _M_ptr;
│ │ │ +
443 };
│ │ │ +
444
│ │ │ +
445 template<>
│ │ │ +
446 inline void
│ │ │ +
447 _Sp_counted_ptr<nullptr_t, _S_single>::_M_dispose() noexcept { }
│ │ │ +
448
│ │ │ +
449 template<>
│ │ │ +
450 inline void
│ │ │ +
451 _Sp_counted_ptr<nullptr_t, _S_mutex>::_M_dispose() noexcept { }
│ │ │ +
452
│ │ │ +
453 template<>
│ │ │ +
454 inline void
│ │ │ +
455 _Sp_counted_ptr<nullptr_t, _S_atomic>::_M_dispose() noexcept { }
│ │ │ +
456
│ │ │ +
457 // FIXME: once __has_cpp_attribute(__no_unique_address__)) is true for
│ │ │ +
458 // all supported compilers we can greatly simplify _Sp_ebo_helper.
│ │ │ +
459 // N.B. unconditionally applying the attribute could change layout for
│ │ │ +
460 // final types, which currently cannot use EBO so have a unique address.
│ │ │ +
461
│ │ │ +
462 template<int _Nm, typename _Tp,
│ │ │ +
463 bool __use_ebo = !__is_final(_Tp) && __is_empty(_Tp)>
│ │ │ +
464 struct _Sp_ebo_helper;
│ │ │ +
465
│ │ │ +
466 /// Specialization using EBO.
│ │ │ +
467 template<int _Nm, typename _Tp>
│ │ │ +
│ │ │ +
468 struct _Sp_ebo_helper<_Nm, _Tp, true> : private _Tp
│ │ │ +
469 {
│ │ │ +
470 explicit _Sp_ebo_helper(const _Tp& __tp) : _Tp(__tp) { }
│ │ │ +
471 explicit _Sp_ebo_helper(_Tp&& __tp) : _Tp(std::move(__tp)) { }
│ │ │ +
472
│ │ │ +
473 static _Tp&
│ │ │ +
474 _S_get(_Sp_ebo_helper& __eboh) { return static_cast<_Tp&>(__eboh); }
│ │ │ +
475 };
│ │ │ +
│ │ │ +
476
│ │ │ +
477 /// Specialization not using EBO.
│ │ │ +
478 template<int _Nm, typename _Tp>
│ │ │ +
│ │ │ +
479 struct _Sp_ebo_helper<_Nm, _Tp, false>
│ │ │ +
480 {
│ │ │ +
481 explicit _Sp_ebo_helper(const _Tp& __tp) : _M_tp(__tp) { }
│ │ │ +
482 explicit _Sp_ebo_helper(_Tp&& __tp) : _M_tp(std::move(__tp)) { }
│ │ │ +
483
│ │ │ +
484 static _Tp&
│ │ │ +
485 _S_get(_Sp_ebo_helper& __eboh)
│ │ │ +
486 { return __eboh._M_tp; }
│ │ │ +
487
│ │ │ +
488 private:
│ │ │ +
489 _Tp _M_tp;
│ │ │ +
490 };
│ │ │ +
│ │ │ +
491
│ │ │ +
492 // Support for custom deleter and/or allocator
│ │ │ +
493 template<typename _Ptr, typename _Deleter, typename _Alloc, _Lock_policy _Lp>
│ │ │ +
494 class _Sp_counted_deleter final : public _Sp_counted_base<_Lp>
│ │ │ +
495 {
│ │ │ +
496 class _Impl : _Sp_ebo_helper<0, _Deleter>, _Sp_ebo_helper<1, _Alloc>
│ │ │ +
497 {
│ │ │ +
498 typedef _Sp_ebo_helper<0, _Deleter> _Del_base;
│ │ │ +
499 typedef _Sp_ebo_helper<1, _Alloc> _Alloc_base;
│ │ │ +
500
│ │ │ +
501 public:
│ │ │ +
502 _Impl(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept
│ │ │ +
503 : _Del_base(std::move(__d)), _Alloc_base(__a), _M_ptr(__p)
│ │ │ +
504 { }
│ │ │ +
505
│ │ │ +
506 _Deleter& _M_del() noexcept { return _Del_base::_S_get(*this); }
│ │ │ +
507 _Alloc& _M_alloc() noexcept { return _Alloc_base::_S_get(*this); }
│ │ │ +
508
│ │ │ +
509 _Ptr _M_ptr;
│ │ │ +
510 };
│ │ │ +
511
│ │ │ +
512 public:
│ │ │ +
513 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_deleter>;
│ │ │ +
514
│ │ │ +
515 // __d(__p) must not throw.
│ │ │ +
516 _Sp_counted_deleter(_Ptr __p, _Deleter __d) noexcept
│ │ │ +
517 : _M_impl(__p, std::move(__d), _Alloc()) { }
│ │ │ +
518
│ │ │ +
519 // __d(__p) must not throw.
│ │ │ +
520 _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept
│ │ │ +
521 : _M_impl(__p, std::move(__d), __a) { }
│ │ │
522
│ │ │ -
523 public:
│ │ │ -
524 // [23.2.4.1] construct/copy/destroy
│ │ │ -
525 // (assign() and get_allocator() are also listed in this section)
│ │ │ -
526
│ │ │ -
527 /**
│ │ │ -
528 * @brief Creates a %vector with no elements.
│ │ │ -
529 */
│ │ │ -
530#if __cplusplus >= 201103L
│ │ │ -
531 vector() = default;
│ │ │ -
532#else
│ │ │ -
533 vector() { }
│ │ │ -
534#endif
│ │ │ -
535
│ │ │ -
536 /**
│ │ │ -
537 * @brief Creates a %vector with no elements.
│ │ │ -
538 * @param __a An allocator object.
│ │ │ -
539 */
│ │ │ -
540 explicit
│ │ │ - │ │ │ -
│ │ │ -
542 vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
│ │ │ -
543 : _Base(__a) { }
│ │ │ -
│ │ │ -
544
│ │ │ -
545#if __cplusplus >= 201103L
│ │ │ -
546 /**
│ │ │ -
547 * @brief Creates a %vector with default constructed elements.
│ │ │ -
548 * @param __n The number of elements to initially create.
│ │ │ -
549 * @param __a An allocator.
│ │ │ -
550 *
│ │ │ -
551 * This constructor fills the %vector with @a __n default
│ │ │ -
552 * constructed elements.
│ │ │ -
553 */
│ │ │ -
554 explicit
│ │ │ - │ │ │ -
│ │ │ -
556 vector(size_type __n, const allocator_type& __a = allocator_type())
│ │ │ -
557 : _Base(_S_check_init_len(__n, __a), __a)
│ │ │ -
558 { _M_default_initialize(__n); }
│ │ │ -
│ │ │ -
559
│ │ │ -
560 /**
│ │ │ -
561 * @brief Creates a %vector with copies of an exemplar element.
│ │ │ -
562 * @param __n The number of elements to initially create.
│ │ │ -
563 * @param __value An element to copy.
│ │ │ -
564 * @param __a An allocator.
│ │ │ -
565 *
│ │ │ -
566 * This constructor fills the %vector with @a __n copies of @a __value.
│ │ │ -
567 */
│ │ │ - │ │ │ -
│ │ │ -
569 vector(size_type __n, const value_type& __value,
│ │ │ -
570 const allocator_type& __a = allocator_type())
│ │ │ -
571 : _Base(_S_check_init_len(__n, __a), __a)
│ │ │ -
572 { _M_fill_initialize(__n, __value); }
│ │ │ -
│ │ │ -
573#else
│ │ │ -
574 /**
│ │ │ -
575 * @brief Creates a %vector with copies of an exemplar element.
│ │ │ -
576 * @param __n The number of elements to initially create.
│ │ │ -
577 * @param __value An element to copy.
│ │ │ -
578 * @param __a An allocator.
│ │ │ -
579 *
│ │ │ -
580 * This constructor fills the %vector with @a __n copies of @a __value.
│ │ │ -
581 */
│ │ │ -
582 explicit
│ │ │ -
583 vector(size_type __n, const value_type& __value = value_type(),
│ │ │ -
584 const allocator_type& __a = allocator_type())
│ │ │ -
585 : _Base(_S_check_init_len(__n, __a), __a)
│ │ │ -
586 { _M_fill_initialize(__n, __value); }
│ │ │ -
587#endif
│ │ │ -
588
│ │ │ -
589 /**
│ │ │ -
590 * @brief %Vector copy constructor.
│ │ │ -
591 * @param __x A %vector of identical element and allocator types.
│ │ │ -
592 *
│ │ │ -
593 * All the elements of @a __x are copied, but any unused capacity in
│ │ │ -
594 * @a __x will not be copied
│ │ │ -
595 * (i.e. capacity() == size() in the new %vector).
│ │ │ -
596 *
│ │ │ -
597 * The newly-created %vector uses a copy of the allocator object used
│ │ │ -
598 * by @a __x (unless the allocator traits dictate a different object).
│ │ │ -
599 */
│ │ │ -
600 _GLIBCXX20_CONSTEXPR
│ │ │ -
│ │ │ -
601 vector(const vector& __x)
│ │ │ -
602 : _Base(__x.size(),
│ │ │ -
603 _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator()))
│ │ │ -
604 {
│ │ │ -
605 this->_M_impl._M_finish =
│ │ │ - │ │ │ -
607 this->_M_impl._M_start,
│ │ │ -
608 _M_get_Tp_allocator());
│ │ │ -
609 }
│ │ │ -
│ │ │ -
610
│ │ │ -
611#if __cplusplus >= 201103L
│ │ │ -
612 /**
│ │ │ -
613 * @brief %Vector move constructor.
│ │ │ -
614 *
│ │ │ -
615 * The newly-created %vector contains the exact contents of the
│ │ │ -
616 * moved instance.
│ │ │ -
617 * The contents of the moved instance are a valid, but unspecified
│ │ │ -
618 * %vector.
│ │ │ -
619 */
│ │ │ -
620 vector(vector&&) noexcept = default;
│ │ │ -
621
│ │ │ -
622 /// Copy constructor with alternative allocator
│ │ │ - │ │ │ -
│ │ │ -
624 vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
│ │ │ -
625 : _Base(__x.size(), __a)
│ │ │ -
626 {
│ │ │ -
627 this->_M_impl._M_finish =
│ │ │ -
628 std::__uninitialized_copy_a(__x.begin(), __x.end(),
│ │ │ -
629 this->_M_impl._M_start,
│ │ │ -
630 _M_get_Tp_allocator());
│ │ │ -
631 }
│ │ │ -
│ │ │ -
632
│ │ │ -
633 private:
│ │ │ - │ │ │ -
635 vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
│ │ │ -
636 : _Base(__m, std::move(__rv))
│ │ │ -
637 { }
│ │ │ -
638
│ │ │ -
639 _GLIBCXX20_CONSTEXPR
│ │ │ -
640 vector(vector&& __rv, const allocator_type& __m, false_type)
│ │ │ -
641 : _Base(__m)
│ │ │ -
642 {
│ │ │ -
643 if (__rv.get_allocator() == __m)
│ │ │ -
644 this->_M_impl._M_swap_data(__rv._M_impl);
│ │ │ -
645 else if (!__rv.empty())
│ │ │ -
646 {
│ │ │ -
647 this->_M_create_storage(__rv.size());
│ │ │ -
648 this->_M_impl._M_finish =
│ │ │ -
649 std::__uninitialized_move_a(__rv.begin(), __rv.end(),
│ │ │ -
650 this->_M_impl._M_start,
│ │ │ -
651 _M_get_Tp_allocator());
│ │ │ -
652 __rv.clear();
│ │ │ -
653 }
│ │ │ -
654 }
│ │ │ -
655
│ │ │ -
656 public:
│ │ │ -
657 /// Move constructor with alternative allocator
│ │ │ -
658 _GLIBCXX20_CONSTEXPR
│ │ │ -
│ │ │ - │ │ │ -
660 noexcept( noexcept(
│ │ │ - │ │ │ - │ │ │ - │ │ │ -
664 { }
│ │ │ -
│ │ │ -
665
│ │ │ -
666 /**
│ │ │ -
667 * @brief Builds a %vector from an initializer list.
│ │ │ -
668 * @param __l An initializer_list.
│ │ │ -
669 * @param __a An allocator.
│ │ │ -
670 *
│ │ │ -
671 * Create a %vector consisting of copies of the elements in the
│ │ │ -
672 * initializer_list @a __l.
│ │ │ -
673 *
│ │ │ -
674 * This will call the element type's copy constructor N times
│ │ │ -
675 * (where N is @a __l.size()) and do no memory reallocation.
│ │ │ -
676 */
│ │ │ -
677 _GLIBCXX20_CONSTEXPR
│ │ │ -
│ │ │ - │ │ │ -
679 const allocator_type& __a = allocator_type())
│ │ │ -
680 : _Base(__a)
│ │ │ -
681 {
│ │ │ -
682 _M_range_initialize(__l.begin(), __l.end(),
│ │ │ - │ │ │ -
684 }
│ │ │ -
│ │ │ -
685#endif
│ │ │ -
686
│ │ │ -
687 /**
│ │ │ -
688 * @brief Builds a %vector from a range.
│ │ │ -
689 * @param __first An input iterator.
│ │ │ -
690 * @param __last An input iterator.
│ │ │ -
691 * @param __a An allocator.
│ │ │ -
692 *
│ │ │ -
693 * Create a %vector consisting of copies of the elements from
│ │ │ -
694 * [first,last).
│ │ │ -
695 *
│ │ │ -
696 * If the iterators are forward, bidirectional, or
│ │ │ -
697 * random-access, then this will call the elements' copy
│ │ │ -
698 * constructor N times (where N is distance(first,last)) and do
│ │ │ -
699 * no memory reallocation. But if only input iterators are
│ │ │ -
700 * used, then this will do at most 2N calls to the copy
│ │ │ -
701 * constructor, and logN memory reallocations.
│ │ │ -
702 */
│ │ │ -
703#if __cplusplus >= 201103L
│ │ │ -
704 template<typename _InputIterator,
│ │ │ - │ │ │ - │ │ │ -
│ │ │ - │ │ │ -
708 const allocator_type& __a = allocator_type())
│ │ │ -
709 : _Base(__a)
│ │ │ -
710 {
│ │ │ -
711 _M_range_initialize(__first, __last,
│ │ │ -
712 std::__iterator_category(__first));
│ │ │ -
713 }
│ │ │ -
│ │ │ -
714#else
│ │ │ -
715 template<typename _InputIterator>
│ │ │ -
716 vector(_InputIterator __first, _InputIterator __last,
│ │ │ -
717 const allocator_type& __a = allocator_type())
│ │ │ -
718 : _Base(__a)
│ │ │ -
719 {
│ │ │ -
720 // Check whether it's an integral type. If so, it's not an iterator.
│ │ │ -
721 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
│ │ │ -
722 _M_initialize_dispatch(__first, __last, _Integral());
│ │ │ -
723 }
│ │ │ -
724#endif
│ │ │ -
725
│ │ │ -
726 /**
│ │ │ -
727 * The dtor only erases the elements, and note that if the
│ │ │ -
728 * elements themselves are pointers, the pointed-to memory is
│ │ │ -
729 * not touched in any way. Managing the pointer is the user's
│ │ │ -
730 * responsibility.
│ │ │ -
731 */
│ │ │ -
732 _GLIBCXX20_CONSTEXPR
│ │ │ -
│ │ │ - │ │ │ +
523 ~_Sp_counted_deleter() noexcept { }
│ │ │ +
524
│ │ │ +
525 virtual void
│ │ │ +
526 _M_dispose() noexcept
│ │ │ +
527 { _M_impl._M_del()(_M_impl._M_ptr); }
│ │ │ +
528
│ │ │ +
529 virtual void
│ │ │ +
530 _M_destroy() noexcept
│ │ │ +
531 {
│ │ │ +
532 __allocator_type __a(_M_impl._M_alloc());
│ │ │ +
533 __allocated_ptr<__allocator_type> __guard_ptr{ __a, this };
│ │ │ +
534 this->~_Sp_counted_deleter();
│ │ │ +
535 }
│ │ │ +
536
│ │ │ +
537 virtual void*
│ │ │ +
538 _M_get_deleter(const type_info& __ti [[__gnu__::__unused__]]) noexcept
│ │ │ +
539 {
│ │ │ +
540#if __cpp_rtti
│ │ │ +
541 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
542 // 2400. shared_ptr's get_deleter() should use addressof()
│ │ │ +
543 return __ti == typeid(_Deleter)
│ │ │ +
544 ? std::__addressof(_M_impl._M_del())
│ │ │ +
545 : nullptr;
│ │ │ +
546#else
│ │ │ +
547 return nullptr;
│ │ │ +
548#endif
│ │ │ +
549 }
│ │ │ +
550
│ │ │ +
551 private:
│ │ │ +
552 _Impl _M_impl;
│ │ │ +
553 };
│ │ │ +
554
│ │ │ +
555 // helpers for make_shared / allocate_shared
│ │ │ +
556
│ │ │ +
557 struct _Sp_make_shared_tag
│ │ │ +
558 {
│ │ │ +
559 private:
│ │ │ +
560 template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
│ │ │ +
561 friend class _Sp_counted_ptr_inplace;
│ │ │ +
562
│ │ │ +
563 static const type_info&
│ │ │ +
564 _S_ti() noexcept _GLIBCXX_VISIBILITY(default)
│ │ │ +
565 {
│ │ │ +
566 alignas(type_info) static constexpr char __tag[sizeof(type_info)] = { };
│ │ │ +
567 return reinterpret_cast<const type_info&>(__tag);
│ │ │ +
568 }
│ │ │ +
569
│ │ │ +
570 static bool _S_eq(const type_info&) noexcept;
│ │ │ +
571 };
│ │ │ +
572
│ │ │ +
573 template<typename _Alloc>
│ │ │ +
574 struct _Sp_alloc_shared_tag
│ │ │ +
575 {
│ │ │ +
576 const _Alloc& _M_a;
│ │ │ +
577 };
│ │ │ +
578
│ │ │ +
579 template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
│ │ │ +
580 class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp>
│ │ │ +
581 {
│ │ │ +
582 class _Impl : _Sp_ebo_helper<0, _Alloc>
│ │ │ +
583 {
│ │ │ +
584 typedef _Sp_ebo_helper<0, _Alloc> _A_base;
│ │ │ +
585
│ │ │ +
586 public:
│ │ │ +
587 explicit _Impl(_Alloc __a) noexcept : _A_base(__a) { }
│ │ │ +
588
│ │ │ +
589 _Alloc& _M_alloc() noexcept { return _A_base::_S_get(*this); }
│ │ │ +
590
│ │ │ +
591 __gnu_cxx::__aligned_buffer<_Tp> _M_storage;
│ │ │ +
592 };
│ │ │ +
593
│ │ │ +
594 public:
│ │ │ +
595 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>;
│ │ │ +
596
│ │ │ +
597 // Alloc parameter is not a reference so doesn't alias anything in __args
│ │ │ +
598 template<typename... _Args>
│ │ │ +
599 _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
│ │ │ +
600 : _M_impl(__a)
│ │ │ +
601 {
│ │ │ +
602 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
603 // 2070. allocate_shared should use allocator_traits<A>::construct
│ │ │ +
604 allocator_traits<_Alloc>::construct(__a, _M_ptr(),
│ │ │ +
605 std::forward<_Args>(__args)...); // might throw
│ │ │ +
606 }
│ │ │ +
607
│ │ │ +
608 ~_Sp_counted_ptr_inplace() noexcept { }
│ │ │ +
609
│ │ │ +
610 virtual void
│ │ │ +
611 _M_dispose() noexcept
│ │ │ +
612 {
│ │ │ +
613 allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr());
│ │ │ +
614 }
│ │ │ +
615
│ │ │ +
616 // Override because the allocator needs to know the dynamic type
│ │ │ +
617 virtual void
│ │ │ +
618 _M_destroy() noexcept
│ │ │ +
619 {
│ │ │ +
620 __allocator_type __a(_M_impl._M_alloc());
│ │ │ +
621 __allocated_ptr<__allocator_type> __guard_ptr{ __a, this };
│ │ │ +
622 this->~_Sp_counted_ptr_inplace();
│ │ │ +
623 }
│ │ │ +
624
│ │ │ +
625 private:
│ │ │ +
626 friend class __shared_count<_Lp>; // To be able to call _M_ptr().
│ │ │ +
627
│ │ │ +
628 // No longer used, but code compiled against old libstdc++ headers
│ │ │ +
629 // might still call it from __shared_ptr ctor to get the pointer out.
│ │ │ +
630 virtual void*
│ │ │ +
631 _M_get_deleter(const std::type_info& __ti) noexcept override
│ │ │ +
632 {
│ │ │ +
633 auto __ptr = const_cast<typename remove_cv<_Tp>::type*>(_M_ptr());
│ │ │ +
634 // Check for the fake type_info first, so we don't try to access it
│ │ │ +
635 // as a real type_info object. Otherwise, check if it's the real
│ │ │ +
636 // type_info for this class. With RTTI enabled we can check directly,
│ │ │ +
637 // or call a library function to do it.
│ │ │ +
638 if (&__ti == &_Sp_make_shared_tag::_S_ti()
│ │ │ +
639 ||
│ │ │ +
640#if __cpp_rtti
│ │ │ +
641 __ti == typeid(_Sp_make_shared_tag)
│ │ │ +
642#else
│ │ │ +
643 _Sp_make_shared_tag::_S_eq(__ti)
│ │ │ +
644#endif
│ │ │ +
645 )
│ │ │ +
646 return __ptr;
│ │ │ +
647 return nullptr;
│ │ │ +
648 }
│ │ │ +
649
│ │ │ +
650 _Tp* _M_ptr() noexcept { return _M_impl._M_storage._M_ptr(); }
│ │ │ +
651
│ │ │ +
652 _Impl _M_impl;
│ │ │ +
653 };
│ │ │ +
654
│ │ │ +
655#if __cplusplus >= 202002L
│ │ │ +
656# define __cpp_lib_smart_ptr_for_overwrite 202002L
│ │ │ +
657 struct _Sp_overwrite_tag { };
│ │ │ +
658
│ │ │ +
659 // Partial specialization used for make_shared_for_overwrite<non-array>().
│ │ │ +
660 // This partial specialization is used when the allocator's value type
│ │ │ +
661 // is the special _Sp_overwrite_tag type.
│ │ │ +
662#if __cpp_concepts
│ │ │ +
663 template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
│ │ │ +
664 requires is_same_v<typename _Alloc::value_type, _Sp_overwrite_tag>
│ │ │ +
665 class _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> final
│ │ │ +
666#else
│ │ │ +
667 template<typename _Tp, template<typename> class _Alloc, _Lock_policy _Lp>
│ │ │ +
668 class _Sp_counted_ptr_inplace<_Tp, _Alloc<_Sp_overwrite_tag>, _Lp> final
│ │ │ +
669#endif
│ │ │ +
670 : public _Sp_counted_base<_Lp>
│ │ │ +
671 {
│ │ │ +
672 [[no_unique_address]] _Alloc _M_alloc;
│ │ │ +
673
│ │ │ +
674 union {
│ │ │ +
675 _Tp _M_obj;
│ │ │ +
676 char _M_unused;
│ │ │ +
677 };
│ │ │ +
678
│ │ │ +
679 friend class __shared_count<_Lp>; // To be able to call _M_ptr().
│ │ │ +
680
│ │ │ +
681 _Tp* _M_ptr() noexcept { return std::__addressof(_M_obj); }
│ │ │ +
682
│ │ │ +
683 public:
│ │ │ +
684 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>;
│ │ │ +
685
│ │ │ +
686 _Sp_counted_ptr_inplace(const _Alloc& __a)
│ │ │ +
687 : _M_alloc(__a)
│ │ │ +
688 {
│ │ │ +
689 ::new((void*)_M_ptr()) _Tp; // default-initialized, for overwrite.
│ │ │ +
690 }
│ │ │ +
691
│ │ │ +
692 ~_Sp_counted_ptr_inplace() noexcept { }
│ │ │ +
693
│ │ │ +
694 virtual void
│ │ │ +
695 _M_dispose() noexcept
│ │ │ +
696 {
│ │ │ +
697 _M_obj.~_Tp();
│ │ │ +
698 }
│ │ │ +
699
│ │ │ +
700 // Override because the allocator needs to know the dynamic type
│ │ │ +
701 virtual void
│ │ │ +
702 _M_destroy() noexcept
│ │ │ +
703 {
│ │ │ +
704 using pointer = typename allocator_traits<__allocator_type>::pointer;
│ │ │ +
705 __allocator_type __a(_M_alloc);
│ │ │ +
706 auto __p = pointer_traits<pointer>::pointer_to(*this);
│ │ │ +
707 __allocated_ptr<__allocator_type> __guard_ptr{ __a, __p };
│ │ │ +
708 this->~_Sp_counted_ptr_inplace();
│ │ │ +
709 }
│ │ │ +
710
│ │ │ +
711 void*
│ │ │ +
712 _M_get_deleter(const std::type_info&) noexcept override
│ │ │ +
713 { return nullptr; }
│ │ │ +
714 };
│ │ │ +
715#endif // C++20
│ │ │ +
716
│ │ │ +
717#if __cplusplus <= 201703L
│ │ │ +
718# define __cpp_lib_shared_ptr_arrays 201611L
│ │ │ +
719#else
│ │ │ +
720# define __cpp_lib_shared_ptr_arrays 201707L
│ │ │ +
721
│ │ │ +
722 struct _Sp_overwrite_tag;
│ │ │ +
723
│ │ │ +
724 // For make_shared<T[]>, make_shared<T[N]>, allocate_shared<T[]> etc.
│ │ │ +
725 template<typename _Alloc>
│ │ │ +
726 struct _Sp_counted_array_base
│ │ │ +
727 {
│ │ │ +
728 [[no_unique_address]] _Alloc _M_alloc{};
│ │ │ +
729 size_t _M_n = 0;
│ │ │ +
730 bool _M_overwrite = false;
│ │ │ +
731
│ │ │ +
732 typename allocator_traits<_Alloc>::pointer
│ │ │ +
733 _M_alloc_array(size_t __tail)
│ │ │
734 {
│ │ │ -
735 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ -
736 _M_get_Tp_allocator());
│ │ │ -
737 _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC;
│ │ │ -
738 }
│ │ │ -
│ │ │ -
739
│ │ │ -
740 /**
│ │ │ -
741 * @brief %Vector assignment operator.
│ │ │ -
742 * @param __x A %vector of identical element and allocator types.
│ │ │ -
743 *
│ │ │ -
744 * All the elements of @a __x are copied, but any unused capacity in
│ │ │ -
745 * @a __x will not be copied.
│ │ │ -
746 *
│ │ │ -
747 * Whether the allocator is copied depends on the allocator traits.
│ │ │ -
748 */
│ │ │ - │ │ │ -
750 vector&
│ │ │ -
751 operator=(const vector& __x);
│ │ │ -
752
│ │ │ -
753#if __cplusplus >= 201103L
│ │ │ -
754 /**
│ │ │ -
755 * @brief %Vector move assignment operator.
│ │ │ -
756 * @param __x A %vector of identical element and allocator types.
│ │ │ -
757 *
│ │ │ -
758 * The contents of @a __x are moved into this %vector (without copying,
│ │ │ -
759 * if the allocators permit it).
│ │ │ -
760 * Afterwards @a __x is a valid, but unspecified %vector.
│ │ │ -
761 *
│ │ │ -
762 * Whether the allocator is moved depends on the allocator traits.
│ │ │ -
763 */
│ │ │ - │ │ │ -
765 vector&
│ │ │ -
│ │ │ -
766 operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
│ │ │ -
767 {
│ │ │ -
768 constexpr bool __move_storage =
│ │ │ -
769 _Alloc_traits::_S_propagate_on_move_assign()
│ │ │ -
770 || _Alloc_traits::_S_always_equal();
│ │ │ -
771 _M_move_assign(std::move(__x), __bool_constant<__move_storage>());
│ │ │ -
772 return *this;
│ │ │ -
773 }
│ │ │ -
│ │ │ -
774
│ │ │ -
775 /**
│ │ │ -
776 * @brief %Vector list assignment operator.
│ │ │ -
777 * @param __l An initializer_list.
│ │ │ -
778 *
│ │ │ -
779 * This function fills a %vector with copies of the elements in the
│ │ │ -
780 * initializer list @a __l.
│ │ │ -
781 *
│ │ │ -
782 * Note that the assignment completely changes the %vector and
│ │ │ -
783 * that the resulting %vector's size is the same as the number
│ │ │ -
784 * of elements assigned.
│ │ │ -
785 */
│ │ │ - │ │ │ -
787 vector&
│ │ │ -
│ │ │ - │ │ │ -
789 {
│ │ │ -
790 this->_M_assign_aux(__l.begin(), __l.end(),
│ │ │ - │ │ │ -
792 return *this;
│ │ │ -
793 }
│ │ │ -
│ │ │ -
794#endif
│ │ │ -
795
│ │ │ -
796 /**
│ │ │ -
797 * @brief Assigns a given value to a %vector.
│ │ │ -
798 * @param __n Number of elements to be assigned.
│ │ │ -
799 * @param __val Value to be assigned.
│ │ │ -
800 *
│ │ │ -
801 * This function fills a %vector with @a __n copies of the given
│ │ │ -
802 * value. Note that the assignment completely changes the
│ │ │ -
803 * %vector and that the resulting %vector's size is the same as
│ │ │ -
804 * the number of elements assigned.
│ │ │ -
805 */
│ │ │ - │ │ │ -
807 void
│ │ │ -
│ │ │ -
808 assign(size_type __n, const value_type& __val)
│ │ │ -
809 { _M_fill_assign(__n, __val); }
│ │ │ -
│ │ │ -
810
│ │ │ -
811 /**
│ │ │ -
812 * @brief Assigns a range to a %vector.
│ │ │ -
813 * @param __first An input iterator.
│ │ │ -
814 * @param __last An input iterator.
│ │ │ -
815 *
│ │ │ -
816 * This function fills a %vector with copies of the elements in the
│ │ │ -
817 * range [__first,__last).
│ │ │ -
818 *
│ │ │ -
819 * Note that the assignment completely changes the %vector and
│ │ │ -
820 * that the resulting %vector's size is the same as the number
│ │ │ -
821 * of elements assigned.
│ │ │ -
822 */
│ │ │ -
823#if __cplusplus >= 201103L
│ │ │ -
824 template<typename _InputIterator,
│ │ │ - │ │ │ - │ │ │ -
827 void
│ │ │ -
│ │ │ - │ │ │ -
829 { _M_assign_aux(__first, __last, std::__iterator_category(__first)); }
│ │ │ -
│ │ │ -
830#else
│ │ │ -
831 template<typename _InputIterator>
│ │ │ -
832 void
│ │ │ -
833 assign(_InputIterator __first, _InputIterator __last)
│ │ │ -
834 {
│ │ │ -
835 // Check whether it's an integral type. If so, it's not an iterator.
│ │ │ -
836 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
│ │ │ -
837 _M_assign_dispatch(__first, __last, _Integral());
│ │ │ -
838 }
│ │ │ -
839#endif
│ │ │ -
840
│ │ │ -
841#if __cplusplus >= 201103L
│ │ │ -
842 /**
│ │ │ -
843 * @brief Assigns an initializer list to a %vector.
│ │ │ -
844 * @param __l An initializer_list.
│ │ │ -
845 *
│ │ │ -
846 * This function fills a %vector with copies of the elements in the
│ │ │ -
847 * initializer list @a __l.
│ │ │ -
848 *
│ │ │ -
849 * Note that the assignment completely changes the %vector and
│ │ │ -
850 * that the resulting %vector's size is the same as the number
│ │ │ -
851 * of elements assigned.
│ │ │ -
852 */
│ │ │ -
853 _GLIBCXX20_CONSTEXPR
│ │ │ -
854 void
│ │ │ -
│ │ │ - │ │ │ -
856 {
│ │ │ -
857 this->_M_assign_aux(__l.begin(), __l.end(),
│ │ │ - │ │ │ +
735 return allocator_traits<_Alloc>::allocate(_M_alloc, _M_n + __tail);
│ │ │ +
736 }
│ │ │ +
737
│ │ │ +
738 void
│ │ │ +
739 _M_dealloc_array(typename allocator_traits<_Alloc>::pointer __p,
│ │ │ +
740 size_t __tail)
│ │ │ +
741 {
│ │ │ +
742 allocator_traits<_Alloc>::deallocate(_M_alloc, __p, _M_n + __tail);
│ │ │ +
743 }
│ │ │ +
744
│ │ │ +
745 // Init the array elements
│ │ │ +
746 template<typename _Init>
│ │ │ +
747 void
│ │ │ +
748 _M_init(typename allocator_traits<_Alloc>::value_type* __p,
│ │ │ +
749 _Init __init)
│ │ │ +
750 {
│ │ │ +
751 using _Tp = remove_pointer_t<_Init>;
│ │ │ +
752 using _Up = typename allocator_traits<_Alloc>::value_type;
│ │ │ +
753
│ │ │ +
754 if constexpr (is_same_v<_Init, _Sp_overwrite_tag>)
│ │ │ +
755 {
│ │ │ + │ │ │ +
757 _M_overwrite = true;
│ │ │ +
758 }
│ │ │ +
759 else if (__init == nullptr)
│ │ │ +
760 std::__uninitialized_default_n_a(__p, _M_n, _M_alloc);
│ │ │ +
761 else if constexpr (!is_array_v<_Tp>)
│ │ │ +
762 std::__uninitialized_fill_n_a(__p, _M_n, *__init, _M_alloc);
│ │ │ +
763 else
│ │ │ +
764 {
│ │ │ +
765#pragma GCC diagnostic push
│ │ │ +
766#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
│ │ │ +
767 struct _Iter
│ │ │ +
768 {
│ │ │ +
769 using value_type = _Up;
│ │ │ +
770 using difference_type = ptrdiff_t;
│ │ │ +
771 using pointer = const _Up*;
│ │ │ +
772 using reference = const _Up&;
│ │ │ +
773 using iterator_category = forward_iterator_tag;
│ │ │ +
774
│ │ │ +
775 const _Up* _M_p;
│ │ │ +
776 size_t _M_len;
│ │ │ +
777 size_t _M_pos;
│ │ │ +
778
│ │ │ +
779 _Iter& operator++() { ++_M_pos; return *this; }
│ │ │ +
780 _Iter operator++(int) { auto __i(*this); ++_M_pos; return __i; }
│ │ │ +
781
│ │ │ +
782 reference operator*() const { return _M_p[_M_pos % _M_len]; }
│ │ │ +
783 pointer operator->() const { return _M_p + (_M_pos % _M_len); }
│ │ │ +
784
│ │ │ +
785 bool operator==(const _Iter& __i) const
│ │ │ +
786 { return _M_pos == __i._M_pos; }
│ │ │ +
787 };
│ │ │ +
788#pragma GCC diagnostic pop
│ │ │ +
789
│ │ │ +
790 _Iter __first{_S_first_elem(__init), sizeof(_Tp) / sizeof(_Up)};
│ │ │ +
791 _Iter __last = __first;
│ │ │ +
792 __last._M_pos = _M_n;
│ │ │ +
793 std::__uninitialized_copy_a(__first, __last, __p, _M_alloc);
│ │ │ +
794 }
│ │ │ +
795 }
│ │ │ +
796
│ │ │ +
797 protected:
│ │ │ +
798 // Destroy the array elements
│ │ │ +
799 void
│ │ │ +
800 _M_dispose_array(typename allocator_traits<_Alloc>::value_type* __p)
│ │ │ +
801 {
│ │ │ +
802 if (_M_overwrite)
│ │ │ +
803 std::destroy_n(__p, _M_n);
│ │ │ +
804 else
│ │ │ +
805 {
│ │ │ +
806 size_t __n = _M_n;
│ │ │ +
807 while (__n--)
│ │ │ +
808 allocator_traits<_Alloc>::destroy(_M_alloc, __p + __n);
│ │ │ +
809 }
│ │ │ +
810 }
│ │ │ +
811
│ │ │ +
812 private:
│ │ │ +
813 template<typename _Tp>
│ │ │ +
814 static _Tp*
│ │ │ +
815 _S_first_elem(_Tp* __p) { return __p; }
│ │ │ +
816
│ │ │ +
817 template<typename _Tp, size_t _Nm>
│ │ │ +
818 static auto
│ │ │ +
819 _S_first_elem(_Tp (*__p)[_Nm]) { return _S_first_elem(*__p); }
│ │ │ +
820 };
│ │ │ +
821
│ │ │ +
822 // Control block for make_shared<T[]>, make_shared<T[N]> etc. that will be
│ │ │ +
823 // placed into unused memory at the end of the array.
│ │ │ +
824 template<typename _Alloc, _Lock_policy _Lp>
│ │ │ +
825 class _Sp_counted_array final
│ │ │ +
826 : public _Sp_counted_base<_Lp>, _Sp_counted_array_base<_Alloc>
│ │ │ +
827 {
│ │ │ +
828 using pointer = typename allocator_traits<_Alloc>::pointer;
│ │ │ +
829
│ │ │ +
830 pointer _M_alloc_ptr;
│ │ │ +
831
│ │ │ +
832 auto _M_ptr() const noexcept { return std::to_address(_M_alloc_ptr); }
│ │ │ +
833
│ │ │ +
834 friend class __shared_count<_Lp>; // To be able to call _M_ptr().
│ │ │ +
835
│ │ │ +
836 public:
│ │ │ +
837 _Sp_counted_array(const _Sp_counted_array_base<_Alloc>& __a,
│ │ │ +
838 pointer __p) noexcept
│ │ │ +
839 : _Sp_counted_array_base<_Alloc>(__a), _M_alloc_ptr(__p)
│ │ │ +
840 { }
│ │ │ +
841
│ │ │ +
842 ~_Sp_counted_array() = default;
│ │ │ +
843
│ │ │ +
844 virtual void
│ │ │ +
845 _M_dispose() noexcept
│ │ │ +
846 {
│ │ │ +
847 if (this->_M_n)
│ │ │ +
848 this->_M_dispose_array(_M_ptr());
│ │ │ +
849 }
│ │ │ +
850
│ │ │ +
851 // Override because the allocator needs to know the dynamic type
│ │ │ +
852 virtual void
│ │ │ +
853 _M_destroy() noexcept
│ │ │ +
854 {
│ │ │ +
855 _Sp_counted_array_base<_Alloc> __a = *this;
│ │ │ +
856 pointer __p = _M_alloc_ptr;
│ │ │ +
857 this->~_Sp_counted_array();
│ │ │ +
858 __a._M_dealloc_array(__p, _S_tail());
│ │ │
859 }
│ │ │ -
│ │ │ -
860#endif
│ │ │ -
861
│ │ │ -
862 /// Get a copy of the memory allocation object.
│ │ │ -
│ │ │ -
863 using _Base::get_allocator;
│ │ │ -
864
│ │ │ -
865 // iterators
│ │ │ -
866 /**
│ │ │ -
867 * Returns a read/write iterator that points to the first
│ │ │ -
868 * element in the %vector. Iteration is done in ordinary
│ │ │ -
869 * element order.
│ │ │ -
870 */
│ │ │ -
871 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
872 iterator
│ │ │ -
│ │ │ - │ │ │ -
874 { return iterator(this->_M_impl._M_start); }
│ │ │ -
│ │ │ -
875
│ │ │ -
876 /**
│ │ │ -
877 * Returns a read-only (constant) iterator that points to the
│ │ │ -
878 * first element in the %vector. Iteration is done in ordinary
│ │ │ -
879 * element order.
│ │ │ -
880 */
│ │ │ -
881 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
882 const_iterator
│ │ │ -
│ │ │ - │ │ │ -
884 { return const_iterator(this->_M_impl._M_start); }
│ │ │ -
│ │ │ -
885
│ │ │ -
886 /**
│ │ │ -
887 * Returns a read/write iterator that points one past the last
│ │ │ -
888 * element in the %vector. Iteration is done in ordinary
│ │ │ -
889 * element order.
│ │ │ -
890 */
│ │ │ -
891 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
894 { return iterator(this->_M_impl._M_finish); }
│ │ │ -
│ │ │ -
895
│ │ │ -
896 /**
│ │ │ -
897 * Returns a read-only (constant) iterator that points one past
│ │ │ -
898 * the last element in the %vector. Iteration is done in
│ │ │ -
899 * ordinary element order.
│ │ │ -
900 */
│ │ │ -
901 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
902 const_iterator
│ │ │ -
│ │ │ - │ │ │ -
904 { return const_iterator(this->_M_impl._M_finish); }
│ │ │ -
│ │ │ -
905
│ │ │ -
906 /**
│ │ │ -
907 * Returns a read/write reverse iterator that points to the
│ │ │ -
908 * last element in the %vector. Iteration is done in reverse
│ │ │ -
909 * element order.
│ │ │ -
910 */
│ │ │ -
911 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
914 { return reverse_iterator(end()); }
│ │ │ -
│ │ │ -
915
│ │ │ -
916 /**
│ │ │ -
917 * Returns a read-only (constant) reverse iterator that points
│ │ │ -
918 * to the last element in the %vector. Iteration is done in
│ │ │ -
919 * reverse element order.
│ │ │ -
920 */
│ │ │ -
921 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
922 const_reverse_iterator
│ │ │ -
│ │ │ - │ │ │ -
924 { return const_reverse_iterator(end()); }
│ │ │ -
│ │ │ -
925
│ │ │ -
926 /**
│ │ │ -
927 * Returns a read/write reverse iterator that points to one
│ │ │ -
928 * before the first element in the %vector. Iteration is done
│ │ │ -
929 * in reverse element order.
│ │ │ -
930 */
│ │ │ -
931 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
934 { return reverse_iterator(begin()); }
│ │ │ -
│ │ │ -
935
│ │ │ -
936 /**
│ │ │ -
937 * Returns a read-only (constant) reverse iterator that points
│ │ │ -
938 * to one before the first element in the %vector. Iteration
│ │ │ -
939 * is done in reverse element order.
│ │ │ -
940 */
│ │ │ -
941 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
942 const_reverse_iterator
│ │ │ -
│ │ │ - │ │ │ -
944 { return const_reverse_iterator(begin()); }
│ │ │ -
│ │ │ -
945
│ │ │ -
946#if __cplusplus >= 201103L
│ │ │ -
947 /**
│ │ │ -
948 * Returns a read-only (constant) iterator that points to the
│ │ │ -
949 * first element in the %vector. Iteration is done in ordinary
│ │ │ -
950 * element order.
│ │ │ -
951 */
│ │ │ - │ │ │ -
953 const_iterator
│ │ │ -
│ │ │ -
954 cbegin() const noexcept
│ │ │ -
955 { return const_iterator(this->_M_impl._M_start); }
│ │ │ -
│ │ │ -
956
│ │ │ -
957 /**
│ │ │ -
958 * Returns a read-only (constant) iterator that points one past
│ │ │ -
959 * the last element in the %vector. Iteration is done in
│ │ │ -
960 * ordinary element order.
│ │ │ -
961 */
│ │ │ - │ │ │ -
963 const_iterator
│ │ │ -
│ │ │ -
964 cend() const noexcept
│ │ │ -
965 { return const_iterator(this->_M_impl._M_finish); }
│ │ │ -
│ │ │ -
966
│ │ │ -
967 /**
│ │ │ -
968 * Returns a read-only (constant) reverse iterator that points
│ │ │ -
969 * to the last element in the %vector. Iteration is done in
│ │ │ -
970 * reverse element order.
│ │ │ -
971 */
│ │ │ - │ │ │ -
973 const_reverse_iterator
│ │ │ -
│ │ │ -
974 crbegin() const noexcept
│ │ │ -
975 { return const_reverse_iterator(end()); }
│ │ │ -
│ │ │ -
976
│ │ │ -
977 /**
│ │ │ -
978 * Returns a read-only (constant) reverse iterator that points
│ │ │ -
979 * to one before the first element in the %vector. Iteration
│ │ │ -
980 * is done in reverse element order.
│ │ │ -
981 */
│ │ │ - │ │ │ -
983 const_reverse_iterator
│ │ │ -
│ │ │ -
984 crend() const noexcept
│ │ │ -
985 { return const_reverse_iterator(begin()); }
│ │ │ -
│ │ │ -
986#endif
│ │ │ -
987
│ │ │ -
988 // [23.2.4.2] capacity
│ │ │ -
989 /** Returns the number of elements in the %vector. */
│ │ │ -
990 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
991 size_type
│ │ │ -
│ │ │ - │ │ │ -
993 { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
│ │ │ -
│ │ │ -
994
│ │ │ -
995 /** Returns the size() of the largest possible %vector. */
│ │ │ -
996 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
997 size_type
│ │ │ -
│ │ │ - │ │ │ -
999 { return _S_max_size(_M_get_Tp_allocator()); }
│ │ │ -
│ │ │ -
1000
│ │ │ -
1001#if __cplusplus >= 201103L
│ │ │ -
1002 /**
│ │ │ -
1003 * @brief Resizes the %vector to the specified number of elements.
│ │ │ -
1004 * @param __new_size Number of elements the %vector should contain.
│ │ │ -
1005 *
│ │ │ -
1006 * This function will %resize the %vector to the specified
│ │ │ -
1007 * number of elements. If the number is smaller than the
│ │ │ -
1008 * %vector's current size the %vector is truncated, otherwise
│ │ │ -
1009 * default constructed elements are appended.
│ │ │ -
1010 */
│ │ │ - │ │ │ -
1012 void
│ │ │ -
│ │ │ - │ │ │ -
1014 {
│ │ │ -
1015 if (__new_size > size())
│ │ │ -
1016 _M_default_append(__new_size - size());
│ │ │ -
1017 else if (__new_size < size())
│ │ │ -
1018 _M_erase_at_end(this->_M_impl._M_start + __new_size);
│ │ │ -
1019 }
│ │ │ -
│ │ │ -
1020
│ │ │ -
1021 /**
│ │ │ -
1022 * @brief Resizes the %vector to the specified number of elements.
│ │ │ -
1023 * @param __new_size Number of elements the %vector should contain.
│ │ │ -
1024 * @param __x Data with which new elements should be populated.
│ │ │ -
1025 *
│ │ │ -
1026 * This function will %resize the %vector to the specified
│ │ │ -
1027 * number of elements. If the number is smaller than the
│ │ │ -
1028 * %vector's current size the %vector is truncated, otherwise
│ │ │ -
1029 * the %vector is extended and new elements are populated with
│ │ │ -
1030 * given data.
│ │ │ -
1031 */
│ │ │ - │ │ │ -
1033 void
│ │ │ -
│ │ │ -
1034 resize(size_type __new_size, const value_type& __x)
│ │ │ -
1035 {
│ │ │ -
1036 if (__new_size > size())
│ │ │ -
1037 _M_fill_insert(end(), __new_size - size(), __x);
│ │ │ -
1038 else if (__new_size < size())
│ │ │ -
1039 _M_erase_at_end(this->_M_impl._M_start + __new_size);
│ │ │ -
1040 }
│ │ │ -
│ │ │ -
1041#else
│ │ │ -
1042 /**
│ │ │ -
1043 * @brief Resizes the %vector to the specified number of elements.
│ │ │ -
1044 * @param __new_size Number of elements the %vector should contain.
│ │ │ -
1045 * @param __x Data with which new elements should be populated.
│ │ │ -
1046 *
│ │ │ -
1047 * This function will %resize the %vector to the specified
│ │ │ -
1048 * number of elements. If the number is smaller than the
│ │ │ -
1049 * %vector's current size the %vector is truncated, otherwise
│ │ │ -
1050 * the %vector is extended and new elements are populated with
│ │ │ -
1051 * given data.
│ │ │ -
1052 */
│ │ │ - │ │ │ -
1054 void
│ │ │ -
1055 resize(size_type __new_size, value_type __x = value_type())
│ │ │ -
1056 {
│ │ │ -
1057 if (__new_size > size())
│ │ │ -
1058 _M_fill_insert(end(), __new_size - size(), __x);
│ │ │ -
1059 else if (__new_size < size())
│ │ │ -
1060 _M_erase_at_end(this->_M_impl._M_start + __new_size);
│ │ │ -
1061 }
│ │ │ -
1062#endif
│ │ │ +
860
│ │ │ +
861 // Returns the number of additional array elements that must be
│ │ │ +
862 // allocated in order to store a _Sp_counted_array at the end.
│ │ │ +
863 static constexpr size_t
│ │ │ +
864 _S_tail()
│ │ │ +
865 {
│ │ │ +
866 // The array elemenent type.
│ │ │ +
867 using _Tp = typename allocator_traits<_Alloc>::value_type;
│ │ │ +
868
│ │ │ +
869 // The space needed to store a _Sp_counted_array object.
│ │ │ +
870 size_t __bytes = sizeof(_Sp_counted_array);
│ │ │ +
871
│ │ │ +
872 // Add any padding needed for manual alignment within the buffer.
│ │ │ +
873 if constexpr (alignof(_Tp) < alignof(_Sp_counted_array))
│ │ │ +
874 __bytes += alignof(_Sp_counted_array) - alignof(_Tp);
│ │ │ +
875
│ │ │ +
876 return (__bytes + sizeof(_Tp) - 1) / sizeof(_Tp);
│ │ │ +
877 }
│ │ │ +
878
│ │ │ +
879 void*
│ │ │ +
880 _M_get_deleter(const std::type_info&) noexcept override
│ │ │ +
881 { return nullptr; }
│ │ │ +
882 };
│ │ │ +
883#endif // C++20
│ │ │ +
884
│ │ │ +
885 // The default deleter for shared_ptr<T[]> and shared_ptr<T[N]>.
│ │ │ +
886 struct __sp_array_delete
│ │ │ +
887 {
│ │ │ +
888 template<typename _Yp>
│ │ │ +
889 void operator()(_Yp* __p) const { delete[] __p; }
│ │ │ +
890 };
│ │ │ +
891
│ │ │ +
892 template<_Lock_policy _Lp>
│ │ │ +
893 class __shared_count
│ │ │ +
894 {
│ │ │ +
895 // Prevent _Sp_alloc_shared_tag from matching the shared_ptr(P, D) ctor.
│ │ │ +
896 template<typename _Tp>
│ │ │ +
897 struct __not_alloc_shared_tag { using type = void; };
│ │ │ +
898
│ │ │ +
899 template<typename _Tp>
│ │ │ +
900 struct __not_alloc_shared_tag<_Sp_alloc_shared_tag<_Tp>> { };
│ │ │ +
901
│ │ │ +
902#if __cpp_lib_shared_ptr_arrays >= 201707L
│ │ │ +
903 template<typename _Alloc>
│ │ │ +
904 struct __not_alloc_shared_tag<_Sp_counted_array_base<_Alloc>> { };
│ │ │ +
905#endif
│ │ │ +
906
│ │ │ +
907 public:
│ │ │ +
908 constexpr __shared_count() noexcept : _M_pi(0)
│ │ │ +
909 { }
│ │ │ +
910
│ │ │ +
911 template<typename _Ptr>
│ │ │ +
912 explicit
│ │ │ +
913 __shared_count(_Ptr __p) : _M_pi(0)
│ │ │ +
914 {
│ │ │ +
915 __try
│ │ │ +
916 {
│ │ │ +
917 _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p);
│ │ │ +
918 }
│ │ │ +
919 __catch(...)
│ │ │ +
920 {
│ │ │ +
921 delete __p;
│ │ │ +
922 __throw_exception_again;
│ │ │ +
923 }
│ │ │ +
924 }
│ │ │ +
925
│ │ │ +
926 template<typename _Ptr>
│ │ │ +
927 __shared_count(_Ptr __p, /* is_array = */ false_type)
│ │ │ +
928 : __shared_count(__p)
│ │ │ +
929 { }
│ │ │ +
930
│ │ │ +
931 template<typename _Ptr>
│ │ │ +
932 __shared_count(_Ptr __p, /* is_array = */ true_type)
│ │ │ +
933 : __shared_count(__p, __sp_array_delete{}, allocator<void>())
│ │ │ +
934 { }
│ │ │ +
935
│ │ │ +
936 template<typename _Ptr, typename _Deleter,
│ │ │ +
937 typename = typename __not_alloc_shared_tag<_Deleter>::type>
│ │ │ +
938 __shared_count(_Ptr __p, _Deleter __d)
│ │ │ +
939 : __shared_count(__p, std::move(__d), allocator<void>())
│ │ │ +
940 { }
│ │ │ +
941
│ │ │ +
942 template<typename _Ptr, typename _Deleter, typename _Alloc,
│ │ │ +
943 typename = typename __not_alloc_shared_tag<_Deleter>::type>
│ │ │ +
944 __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0)
│ │ │ +
945 {
│ │ │ +
946 typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
│ │ │ +
947 __try
│ │ │ +
948 {
│ │ │ +
949 typename _Sp_cd_type::__allocator_type __a2(__a);
│ │ │ +
950 auto __guard = std::__allocate_guarded(__a2);
│ │ │ +
951 _Sp_cd_type* __mem = __guard.get();
│ │ │ +
952 ::new (__mem) _Sp_cd_type(__p, std::move(__d), std::move(__a));
│ │ │ +
953 _M_pi = __mem;
│ │ │ +
954 __guard = nullptr;
│ │ │ +
955 }
│ │ │ +
956 __catch(...)
│ │ │ +
957 {
│ │ │ +
958 __d(__p); // Call _Deleter on __p.
│ │ │ +
959 __throw_exception_again;
│ │ │ +
960 }
│ │ │ +
961 }
│ │ │ +
962
│ │ │ +
963 template<typename _Tp, typename _Alloc, typename... _Args>
│ │ │ +
964 __shared_count(_Tp*& __p, _Sp_alloc_shared_tag<_Alloc> __a,
│ │ │ +
965 _Args&&... __args)
│ │ │ +
966 {
│ │ │ +
967 typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type;
│ │ │ +
968 typename _Sp_cp_type::__allocator_type __a2(__a._M_a);
│ │ │ +
969 auto __guard = std::__allocate_guarded(__a2);
│ │ │ +
970 _Sp_cp_type* __mem = __guard.get();
│ │ │ +
971 auto __pi = ::new (__mem)
│ │ │ +
972 _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...);
│ │ │ +
973 __guard = nullptr;
│ │ │ +
974 _M_pi = __pi;
│ │ │ +
975 __p = __pi->_M_ptr();
│ │ │ +
976 }
│ │ │ +
977
│ │ │ +
978#if __cpp_lib_shared_ptr_arrays >= 201707L
│ │ │ +
979 template<typename _Tp, typename _Alloc, typename _Init>
│ │ │ +
980 __shared_count(_Tp*& __p, const _Sp_counted_array_base<_Alloc>& __a,
│ │ │ +
981 _Init __init)
│ │ │ +
982 {
│ │ │ +
983 using _Up = remove_all_extents_t<_Tp>;
│ │ │ +
984 static_assert(is_same_v<_Up, typename _Alloc::value_type>);
│ │ │ +
985
│ │ │ +
986 using _Sp_ca_type = _Sp_counted_array<_Alloc, _Lp>;
│ │ │ +
987 const size_t __tail = _Sp_ca_type::_S_tail();
│ │ │ +
988
│ │ │ +
989 struct _Guarded_ptr : _Sp_counted_array_base<_Alloc>
│ │ │ +
990 {
│ │ │ +
991 typename allocator_traits<_Alloc>::pointer _M_ptr;
│ │ │ +
992
│ │ │ +
993 _Guarded_ptr(_Sp_counted_array_base<_Alloc> __a)
│ │ │ +
994 : _Sp_counted_array_base<_Alloc>(__a),
│ │ │ +
995 _M_ptr(this->_M_alloc_array(_Sp_ca_type::_S_tail()))
│ │ │ +
996 { }
│ │ │ +
997
│ │ │ +
998 ~_Guarded_ptr()
│ │ │ +
999 {
│ │ │ +
1000 if (_M_ptr)
│ │ │ +
1001 this->_M_dealloc_array(_M_ptr, _Sp_ca_type::_S_tail());
│ │ │ +
1002 }
│ │ │ +
1003 };
│ │ │ +
1004
│ │ │ +
1005 _Guarded_ptr __guard{__a};
│ │ │ +
1006 _Up* const __raw = std::to_address(__guard._M_ptr);
│ │ │ +
1007 __guard._M_init(__raw, __init); // might throw
│ │ │ +
1008
│ │ │ +
1009 void* __c = __raw + __a._M_n;
│ │ │ +
1010 if constexpr (alignof(_Up) < alignof(_Sp_ca_type))
│ │ │ +
1011 {
│ │ │ +
1012 size_t __space = sizeof(_Up) * __tail;
│ │ │ +
1013 __c = std::align(alignof(_Sp_ca_type), sizeof(_Sp_ca_type),
│ │ │ +
1014 __c, __space);
│ │ │ +
1015 }
│ │ │ +
1016 auto __pi = ::new(__c) _Sp_ca_type(__guard, __guard._M_ptr);
│ │ │ +
1017 __guard._M_ptr = nullptr;
│ │ │ +
1018 _M_pi = __pi;
│ │ │ +
1019 __p = reinterpret_cast<_Tp*>(__raw);
│ │ │ +
1020 }
│ │ │ +
1021#endif
│ │ │ +
1022
│ │ │ +
1023#if _GLIBCXX_USE_DEPRECATED
│ │ │ +
1024#pragma GCC diagnostic push
│ │ │ +
1025#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
1026 // Special case for auto_ptr<_Tp> to provide the strong guarantee.
│ │ │ +
1027 template<typename _Tp>
│ │ │ +
1028 explicit
│ │ │ +
1029 __shared_count(std::auto_ptr<_Tp>&& __r);
│ │ │ +
1030#pragma GCC diagnostic pop
│ │ │ +
1031#endif
│ │ │ +
1032
│ │ │ +
1033 // Special case for unique_ptr<_Tp,_Del> to provide the strong guarantee.
│ │ │ +
1034 template<typename _Tp, typename _Del>
│ │ │ +
1035 explicit
│ │ │ +
1036 __shared_count(std::unique_ptr<_Tp, _Del>&& __r) : _M_pi(0)
│ │ │ +
1037 {
│ │ │ +
1038 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
1039 // 2415. Inconsistency between unique_ptr and shared_ptr
│ │ │ +
1040 if (__r.get() == nullptr)
│ │ │ +
1041 return;
│ │ │ +
1042
│ │ │ +
1043 using _Ptr = typename unique_ptr<_Tp, _Del>::pointer;
│ │ │ +
1044 using _Del2 = __conditional_t<is_reference<_Del>::value,
│ │ │ +
1045 reference_wrapper<typename remove_reference<_Del>::type>,
│ │ │ +
1046 _Del>;
│ │ │ +
1047 using _Sp_cd_type
│ │ │ +
1048 = _Sp_counted_deleter<_Ptr, _Del2, allocator<void>, _Lp>;
│ │ │ +
1049 using _Alloc = allocator<_Sp_cd_type>;
│ │ │ +
1050 using _Alloc_traits = allocator_traits<_Alloc>;
│ │ │ +
1051 _Alloc __a;
│ │ │ +
1052 _Sp_cd_type* __mem = _Alloc_traits::allocate(__a, 1);
│ │ │ +
1053 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
1054 // 3548. shared_ptr construction from unique_ptr should move
│ │ │ +
1055 // (not copy) the deleter
│ │ │ +
1056 _Alloc_traits::construct(__a, __mem, __r.release(),
│ │ │ +
1057 std::forward<_Del>(__r.get_deleter()));
│ │ │ +
1058 _M_pi = __mem;
│ │ │ +
1059 }
│ │ │ +
1060
│ │ │ +
1061 // Throw bad_weak_ptr when __r._M_get_use_count() == 0.
│ │ │ +
1062 explicit __shared_count(const __weak_count<_Lp>& __r);
│ │ │
1063
│ │ │ -
1064#if __cplusplus >= 201103L
│ │ │ -
1065 /** A non-binding request to reduce capacity() to size(). */
│ │ │ -
1066 _GLIBCXX20_CONSTEXPR
│ │ │ -
1067 void
│ │ │ -
│ │ │ - │ │ │ -
1069 { _M_shrink_to_fit(); }
│ │ │ -
│ │ │ -
1070#endif
│ │ │ -
1071
│ │ │ -
1072 /**
│ │ │ -
1073 * Returns the total number of elements that the %vector can
│ │ │ -
1074 * hold before needing to allocate more memory.
│ │ │ -
1075 */
│ │ │ -
1076 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
1077 size_type
│ │ │ -
│ │ │ - │ │ │ -
1079 { return size_type(this->_M_impl._M_end_of_storage
│ │ │ -
1080 - this->_M_impl._M_start); }
│ │ │ -
│ │ │ -
1081
│ │ │ -
1082 /**
│ │ │ -
1083 * Returns true if the %vector is empty. (Thus begin() would
│ │ │ -
1084 * equal end().)
│ │ │ -
1085 */
│ │ │ -
1086 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
1087 bool
│ │ │ -
│ │ │ - │ │ │ -
1089 { return begin() == end(); }
│ │ │ -
│ │ │ -
1090
│ │ │ -
1091 /**
│ │ │ -
1092 * @brief Attempt to preallocate enough memory for specified number of
│ │ │ -
1093 * elements.
│ │ │ -
1094 * @param __n Number of elements required.
│ │ │ -
1095 * @throw std::length_error If @a n exceeds @c max_size().
│ │ │ -
1096 *
│ │ │ -
1097 * This function attempts to reserve enough memory for the
│ │ │ -
1098 * %vector to hold the specified number of elements. If the
│ │ │ -
1099 * number requested is more than max_size(), length_error is
│ │ │ -
1100 * thrown.
│ │ │ -
1101 *
│ │ │ -
1102 * The advantage of this function is that if optimal code is a
│ │ │ -
1103 * necessity and the user can determine the number of elements
│ │ │ -
1104 * that will be required, the user can reserve the memory in
│ │ │ -
1105 * %advance, and thus prevent a possible reallocation of memory
│ │ │ -
1106 * and copying of %vector data.
│ │ │ -
1107 */
│ │ │ - │ │ │ -
1109 void
│ │ │ -
1110 reserve(size_type __n);
│ │ │ +
1064 // Does not throw if __r._M_get_use_count() == 0, caller must check.
│ │ │ +
1065 explicit
│ │ │ +
1066 __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) noexcept;
│ │ │ +
1067
│ │ │ +
1068 ~__shared_count() noexcept
│ │ │ +
1069 {
│ │ │ +
1070 if (_M_pi != nullptr)
│ │ │ +
1071 _M_pi->_M_release();
│ │ │ +
1072 }
│ │ │ +
1073
│ │ │ +
1074 __shared_count(const __shared_count& __r) noexcept
│ │ │ +
1075 : _M_pi(__r._M_pi)
│ │ │ +
1076 {
│ │ │ +
1077 if (_M_pi != nullptr)
│ │ │ +
1078 _M_pi->_M_add_ref_copy();
│ │ │ +
1079 }
│ │ │ +
1080
│ │ │ +
1081 __shared_count&
│ │ │ +
1082 operator=(const __shared_count& __r) noexcept
│ │ │ +
1083 {
│ │ │ +
1084 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
1085 if (__tmp != _M_pi)
│ │ │ +
1086 {
│ │ │ +
1087 if (__tmp != nullptr)
│ │ │ +
1088 __tmp->_M_add_ref_copy();
│ │ │ +
1089 if (_M_pi != nullptr)
│ │ │ +
1090 _M_pi->_M_release();
│ │ │ +
1091 _M_pi = __tmp;
│ │ │ +
1092 }
│ │ │ +
1093 return *this;
│ │ │ +
1094 }
│ │ │ +
1095
│ │ │ +
1096 void
│ │ │ +
1097 _M_swap(__shared_count& __r) noexcept
│ │ │ +
1098 {
│ │ │ +
1099 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
1100 __r._M_pi = _M_pi;
│ │ │ +
1101 _M_pi = __tmp;
│ │ │ +
1102 }
│ │ │ +
1103
│ │ │ +
1104 long
│ │ │ +
1105 _M_get_use_count() const noexcept
│ │ │ +
1106 { return _M_pi ? _M_pi->_M_get_use_count() : 0; }
│ │ │ +
1107
│ │ │ +
1108 bool
│ │ │ +
1109 _M_unique() const noexcept
│ │ │ +
1110 { return this->_M_get_use_count() == 1; }
│ │ │
1111
│ │ │ -
1112 // element access
│ │ │ -
1113 /**
│ │ │ -
1114 * @brief Subscript access to the data contained in the %vector.
│ │ │ -
1115 * @param __n The index of the element for which data should be
│ │ │ -
1116 * accessed.
│ │ │ -
1117 * @return Read/write reference to data.
│ │ │ -
1118 *
│ │ │ -
1119 * This operator allows for easy, array-style, data access.
│ │ │ -
1120 * Note that data access with this operator is unchecked and
│ │ │ -
1121 * out_of_range lookups are not defined. (For checked lookups
│ │ │ -
1122 * see at().)
│ │ │ -
1123 */
│ │ │ -
1124 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
1125 reference
│ │ │ -
│ │ │ - │ │ │ -
1127 {
│ │ │ -
1128 __glibcxx_requires_subscript(__n);
│ │ │ -
1129 return *(this->_M_impl._M_start + __n);
│ │ │ -
1130 }
│ │ │ -
│ │ │ -
1131
│ │ │ -
1132 /**
│ │ │ -
1133 * @brief Subscript access to the data contained in the %vector.
│ │ │ -
1134 * @param __n The index of the element for which data should be
│ │ │ -
1135 * accessed.
│ │ │ -
1136 * @return Read-only (constant) reference to data.
│ │ │ -
1137 *
│ │ │ -
1138 * This operator allows for easy, array-style, data access.
│ │ │ -
1139 * Note that data access with this operator is unchecked and
│ │ │ -
1140 * out_of_range lookups are not defined. (For checked lookups
│ │ │ -
1141 * see at().)
│ │ │ -
1142 */
│ │ │ -
1143 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
1144 const_reference
│ │ │ -
│ │ │ -
1145 operator[](size_type __n) const _GLIBCXX_NOEXCEPT
│ │ │ -
1146 {
│ │ │ -
1147 __glibcxx_requires_subscript(__n);
│ │ │ -
1148 return *(this->_M_impl._M_start + __n);
│ │ │ -
1149 }
│ │ │ -
│ │ │ -
1150
│ │ │ -
1151 protected:
│ │ │ -
1152 /// Safety check used only from at().
│ │ │ - │ │ │ -
1154 void
│ │ │ -
│ │ │ -
1155 _M_range_check(size_type __n) const
│ │ │ -
1156 {
│ │ │ -
1157 if (__n >= this->size())
│ │ │ -
1158 __throw_out_of_range_fmt(__N("vector::_M_range_check: __n "
│ │ │ -
1159 "(which is %zu) >= this->size() "
│ │ │ -
1160 "(which is %zu)"),
│ │ │ -
1161 __n, this->size());
│ │ │ -
1162 }
│ │ │ -
│ │ │ +
1112 void*
│ │ │ +
1113 _M_get_deleter(const std::type_info& __ti) const noexcept
│ │ │ +
1114 { return _M_pi ? _M_pi->_M_get_deleter(__ti) : nullptr; }
│ │ │ +
1115
│ │ │ +
1116 bool
│ │ │ +
1117 _M_less(const __shared_count& __rhs) const noexcept
│ │ │ +
1118 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
│ │ │ +
1119
│ │ │ +
1120 bool
│ │ │ +
1121 _M_less(const __weak_count<_Lp>& __rhs) const noexcept
│ │ │ +
1122 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
│ │ │ +
1123
│ │ │ +
1124 // Friend function injected into enclosing namespace and found by ADL
│ │ │ +
1125 friend inline bool
│ │ │ +
1126 operator==(const __shared_count& __a, const __shared_count& __b) noexcept
│ │ │ +
1127 { return __a._M_pi == __b._M_pi; }
│ │ │ +
1128
│ │ │ +
1129 private:
│ │ │ +
1130 friend class __weak_count<_Lp>;
│ │ │ +
1131#if __cplusplus >= 202002L
│ │ │ +
1132 template<typename> friend class _Sp_atomic;
│ │ │ +
1133#endif
│ │ │ +
1134
│ │ │ +
1135 _Sp_counted_base<_Lp>* _M_pi;
│ │ │ +
1136 };
│ │ │ +
1137
│ │ │ +
1138
│ │ │ +
1139 template<_Lock_policy _Lp>
│ │ │ +
1140 class __weak_count
│ │ │ +
1141 {
│ │ │ +
1142 public:
│ │ │ +
1143 constexpr __weak_count() noexcept : _M_pi(nullptr)
│ │ │ +
1144 { }
│ │ │ +
1145
│ │ │ +
1146 __weak_count(const __shared_count<_Lp>& __r) noexcept
│ │ │ +
1147 : _M_pi(__r._M_pi)
│ │ │ +
1148 {
│ │ │ +
1149 if (_M_pi != nullptr)
│ │ │ +
1150 _M_pi->_M_weak_add_ref();
│ │ │ +
1151 }
│ │ │ +
1152
│ │ │ +
1153 __weak_count(const __weak_count& __r) noexcept
│ │ │ +
1154 : _M_pi(__r._M_pi)
│ │ │ +
1155 {
│ │ │ +
1156 if (_M_pi != nullptr)
│ │ │ +
1157 _M_pi->_M_weak_add_ref();
│ │ │ +
1158 }
│ │ │ +
1159
│ │ │ +
1160 __weak_count(__weak_count&& __r) noexcept
│ │ │ +
1161 : _M_pi(__r._M_pi)
│ │ │ +
1162 { __r._M_pi = nullptr; }
│ │ │
1163
│ │ │ -
1164 public:
│ │ │ -
1165 /**
│ │ │ -
1166 * @brief Provides access to the data contained in the %vector.
│ │ │ -
1167 * @param __n The index of the element for which data should be
│ │ │ -
1168 * accessed.
│ │ │ -
1169 * @return Read/write reference to data.
│ │ │ -
1170 * @throw std::out_of_range If @a __n is an invalid index.
│ │ │ -
1171 *
│ │ │ -
1172 * This function provides for safer data access. The parameter
│ │ │ -
1173 * is first checked that it is in the range of the vector. The
│ │ │ -
1174 * function throws out_of_range if the check fails.
│ │ │ -
1175 */
│ │ │ - │ │ │ -
1177 reference
│ │ │ -
│ │ │ -
1178 at(size_type __n)
│ │ │ -
1179 {
│ │ │ -
1180 _M_range_check(__n);
│ │ │ -
1181 return (*this)[__n];
│ │ │ -
1182 }
│ │ │ -
│ │ │ -
1183
│ │ │ -
1184 /**
│ │ │ -
1185 * @brief Provides access to the data contained in the %vector.
│ │ │ -
1186 * @param __n The index of the element for which data should be
│ │ │ -
1187 * accessed.
│ │ │ -
1188 * @return Read-only (constant) reference to data.
│ │ │ -
1189 * @throw std::out_of_range If @a __n is an invalid index.
│ │ │ -
1190 *
│ │ │ -
1191 * This function provides for safer data access. The parameter
│ │ │ -
1192 * is first checked that it is in the range of the vector. The
│ │ │ -
1193 * function throws out_of_range if the check fails.
│ │ │ -
1194 */
│ │ │ - │ │ │ -
1196 const_reference
│ │ │ -
│ │ │ -
1197 at(size_type __n) const
│ │ │ -
1198 {
│ │ │ -
1199 _M_range_check(__n);
│ │ │ -
1200 return (*this)[__n];
│ │ │ -
1201 }
│ │ │ -
│ │ │ -
1202
│ │ │ -
1203 /**
│ │ │ -
1204 * Returns a read/write reference to the data at the first
│ │ │ -
1205 * element of the %vector.
│ │ │ -
1206 */
│ │ │ -
1207 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
1208 reference
│ │ │ -
│ │ │ - │ │ │ -
1210 {
│ │ │ -
1211 __glibcxx_requires_nonempty();
│ │ │ -
1212 return *begin();
│ │ │ -
1213 }
│ │ │ -
│ │ │ -
1214
│ │ │ -
1215 /**
│ │ │ -
1216 * Returns a read-only (constant) reference to the data at the first
│ │ │ -
1217 * element of the %vector.
│ │ │ -
1218 */
│ │ │ -
1219 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
1220 const_reference
│ │ │ -
│ │ │ - │ │ │ -
1222 {
│ │ │ -
1223 __glibcxx_requires_nonempty();
│ │ │ -
1224 return *begin();
│ │ │ -
1225 }
│ │ │ -
│ │ │ -
1226
│ │ │ -
1227 /**
│ │ │ -
1228 * Returns a read/write reference to the data at the last
│ │ │ -
1229 * element of the %vector.
│ │ │ -
1230 */
│ │ │ -
1231 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
1232 reference
│ │ │ -
│ │ │ - │ │ │ -
1234 {
│ │ │ -
1235 __glibcxx_requires_nonempty();
│ │ │ -
1236 return *(end() - 1);
│ │ │ -
1237 }
│ │ │ -
│ │ │ -
1238
│ │ │ -
1239 /**
│ │ │ -
1240 * Returns a read-only (constant) reference to the data at the
│ │ │ -
1241 * last element of the %vector.
│ │ │ -
1242 */
│ │ │ -
1243 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
1244 const_reference
│ │ │ -
│ │ │ - │ │ │ -
1246 {
│ │ │ -
1247 __glibcxx_requires_nonempty();
│ │ │ -
1248 return *(end() - 1);
│ │ │ -
1249 }
│ │ │ -
│ │ │ -
1250
│ │ │ -
1251 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
1252 // DR 464. Suggestion for new member functions in standard containers.
│ │ │ -
1253 // data access
│ │ │ -
1254 /**
│ │ │ -
1255 * Returns a pointer such that [data(), data() + size()) is a valid
│ │ │ -
1256 * range. For a non-empty %vector, data() == &front().
│ │ │ -
1257 */
│ │ │ -
1258 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
1259 _Tp*
│ │ │ -
│ │ │ - │ │ │ -
1261 { return _M_data_ptr(this->_M_impl._M_start); }
│ │ │ -
│ │ │ -
1262
│ │ │ -
1263 _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
│ │ │ -
1264 const _Tp*
│ │ │ -
1265 data() const _GLIBCXX_NOEXCEPT
│ │ │ -
1266 { return _M_data_ptr(this->_M_impl._M_start); }
│ │ │ +
1164 ~__weak_count() noexcept
│ │ │ +
1165 {
│ │ │ +
1166 if (_M_pi != nullptr)
│ │ │ +
1167 _M_pi->_M_weak_release();
│ │ │ +
1168 }
│ │ │ +
1169
│ │ │ +
1170 __weak_count&
│ │ │ +
1171 operator=(const __shared_count<_Lp>& __r) noexcept
│ │ │ +
1172 {
│ │ │ +
1173 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
1174 if (__tmp != nullptr)
│ │ │ +
1175 __tmp->_M_weak_add_ref();
│ │ │ +
1176 if (_M_pi != nullptr)
│ │ │ +
1177 _M_pi->_M_weak_release();
│ │ │ +
1178 _M_pi = __tmp;
│ │ │ +
1179 return *this;
│ │ │ +
1180 }
│ │ │ +
1181
│ │ │ +
1182 __weak_count&
│ │ │ +
1183 operator=(const __weak_count& __r) noexcept
│ │ │ +
1184 {
│ │ │ +
1185 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
1186 if (__tmp != nullptr)
│ │ │ +
1187 __tmp->_M_weak_add_ref();
│ │ │ +
1188 if (_M_pi != nullptr)
│ │ │ +
1189 _M_pi->_M_weak_release();
│ │ │ +
1190 _M_pi = __tmp;
│ │ │ +
1191 return *this;
│ │ │ +
1192 }
│ │ │ +
1193
│ │ │ +
1194 __weak_count&
│ │ │ +
1195 operator=(__weak_count&& __r) noexcept
│ │ │ +
1196 {
│ │ │ +
1197 if (_M_pi != nullptr)
│ │ │ +
1198 _M_pi->_M_weak_release();
│ │ │ +
1199 _M_pi = __r._M_pi;
│ │ │ +
1200 __r._M_pi = nullptr;
│ │ │ +
1201 return *this;
│ │ │ +
1202 }
│ │ │ +
1203
│ │ │ +
1204 void
│ │ │ +
1205 _M_swap(__weak_count& __r) noexcept
│ │ │ +
1206 {
│ │ │ +
1207 _Sp_counted_base<_Lp>* __tmp = __r._M_pi;
│ │ │ +
1208 __r._M_pi = _M_pi;
│ │ │ +
1209 _M_pi = __tmp;
│ │ │ +
1210 }
│ │ │ +
1211
│ │ │ +
1212 long
│ │ │ +
1213 _M_get_use_count() const noexcept
│ │ │ +
1214 { return _M_pi != nullptr ? _M_pi->_M_get_use_count() : 0; }
│ │ │ +
1215
│ │ │ +
1216 bool
│ │ │ +
1217 _M_less(const __weak_count& __rhs) const noexcept
│ │ │ +
1218 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
│ │ │ +
1219
│ │ │ +
1220 bool
│ │ │ +
1221 _M_less(const __shared_count<_Lp>& __rhs) const noexcept
│ │ │ +
1222 { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); }
│ │ │ +
1223
│ │ │ +
1224 // Friend function injected into enclosing namespace and found by ADL
│ │ │ +
1225 friend inline bool
│ │ │ +
1226 operator==(const __weak_count& __a, const __weak_count& __b) noexcept
│ │ │ +
1227 { return __a._M_pi == __b._M_pi; }
│ │ │ +
1228
│ │ │ +
1229 private:
│ │ │ +
1230 friend class __shared_count<_Lp>;
│ │ │ +
1231#if __cplusplus >= 202002L
│ │ │ +
1232 template<typename> friend class _Sp_atomic;
│ │ │ +
1233#endif
│ │ │ +
1234
│ │ │ +
1235 _Sp_counted_base<_Lp>* _M_pi;
│ │ │ +
1236 };
│ │ │ +
1237
│ │ │ +
1238 // Now that __weak_count is defined we can define this constructor:
│ │ │ +
1239 template<_Lock_policy _Lp>
│ │ │ +
1240 inline
│ │ │ +
1241 __shared_count<_Lp>::__shared_count(const __weak_count<_Lp>& __r)
│ │ │ +
1242 : _M_pi(__r._M_pi)
│ │ │ +
1243 {
│ │ │ +
1244 if (_M_pi == nullptr || !_M_pi->_M_add_ref_lock_nothrow())
│ │ │ +
1245 __throw_bad_weak_ptr();
│ │ │ +
1246 }
│ │ │ +
1247
│ │ │ +
1248 // Now that __weak_count is defined we can define this constructor:
│ │ │ +
1249 template<_Lock_policy _Lp>
│ │ │ +
1250 inline
│ │ │ +
1251 __shared_count<_Lp>::
│ │ │ +
1252 __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) noexcept
│ │ │ +
1253 : _M_pi(__r._M_pi)
│ │ │ +
1254 {
│ │ │ +
1255 if (_M_pi && !_M_pi->_M_add_ref_lock_nothrow())
│ │ │ +
1256 _M_pi = nullptr;
│ │ │ +
1257 }
│ │ │ +
1258
│ │ │ +
1259 // Helper traits for shared_ptr of array:
│ │ │ +
1260
│ │ │ +
1261 // A pointer type Y* is said to be compatible with a pointer type T* when
│ │ │ +
1262 // either Y* is convertible to T* or Y is U[N] and T is U cv [].
│ │ │ +
1263 template<typename _Yp_ptr, typename _Tp_ptr>
│ │ │ +
1264 struct __sp_compatible_with
│ │ │ +
1265 : false_type
│ │ │ +
1266 { };
│ │ │
1267
│ │ │ -
1268 // [23.2.4.3] modifiers
│ │ │ -
1269 /**
│ │ │ -
1270 * @brief Add data to the end of the %vector.
│ │ │ -
1271 * @param __x Data to be added.
│ │ │ -
1272 *
│ │ │ -
1273 * This is a typical stack operation. The function creates an
│ │ │ -
1274 * element at the end of the %vector and assigns the given data
│ │ │ -
1275 * to it. Due to the nature of a %vector this operation can be
│ │ │ -
1276 * done in constant time if the %vector has preallocated space
│ │ │ -
1277 * available.
│ │ │ -
1278 */
│ │ │ -
1279 _GLIBCXX20_CONSTEXPR
│ │ │ -
1280 void
│ │ │ -
│ │ │ -
1281 push_back(const value_type& __x)
│ │ │ -
1282 {
│ │ │ -
1283 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
│ │ │ -
1284 {
│ │ │ -
1285 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ -
1286 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ -
1287 __x);
│ │ │ -
1288 ++this->_M_impl._M_finish;
│ │ │ -
1289 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ -
1290 }
│ │ │ -
1291 else
│ │ │ -
1292 _M_realloc_insert(end(), __x);
│ │ │ -
1293 }
│ │ │ -
│ │ │ -
1294
│ │ │ -
1295#if __cplusplus >= 201103L
│ │ │ - │ │ │ -
1297 void
│ │ │ -
1298 push_back(value_type&& __x)
│ │ │ -
1299 { emplace_back(std::move(__x)); }
│ │ │ -
1300
│ │ │ -
1301 template<typename... _Args>
│ │ │ -
1302#if __cplusplus > 201402L
│ │ │ -
1303 _GLIBCXX20_CONSTEXPR
│ │ │ -
1304 reference
│ │ │ -
1305#else
│ │ │ -
1306 void
│ │ │ -
1307#endif
│ │ │ -
1308 emplace_back(_Args&&... __args);
│ │ │ -
1309#endif
│ │ │ -
1310
│ │ │ -
1311 /**
│ │ │ -
1312 * @brief Removes last element.
│ │ │ -
1313 *
│ │ │ -
1314 * This is a typical stack operation. It shrinks the %vector by one.
│ │ │ -
1315 *
│ │ │ -
1316 * Note that no data is returned, and if the last element's
│ │ │ -
1317 * data is needed, it should be retrieved before pop_back() is
│ │ │ -
1318 * called.
│ │ │ -
1319 */
│ │ │ -
1320 _GLIBCXX20_CONSTEXPR
│ │ │ -
1321 void
│ │ │ -
│ │ │ - │ │ │ -
1323 {
│ │ │ -
1324 __glibcxx_requires_nonempty();
│ │ │ -
1325 --this->_M_impl._M_finish;
│ │ │ -
1326 _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish);
│ │ │ -
1327 _GLIBCXX_ASAN_ANNOTATE_SHRINK(1);
│ │ │ -
1328 }
│ │ │ -
│ │ │ -
1329
│ │ │ -
1330#if __cplusplus >= 201103L
│ │ │ -
1331 /**
│ │ │ -
1332 * @brief Inserts an object in %vector before specified iterator.
│ │ │ -
1333 * @param __position A const_iterator into the %vector.
│ │ │ -
1334 * @param __args Arguments.
│ │ │ -
1335 * @return An iterator that points to the inserted data.
│ │ │ -
1336 *
│ │ │ -
1337 * This function will insert an object of type T constructed
│ │ │ -
1338 * with T(std::forward<Args>(args)...) before the specified location.
│ │ │ -
1339 * Note that this kind of operation could be expensive for a %vector
│ │ │ -
1340 * and if it is frequently used the user should consider using
│ │ │ -
1341 * std::list.
│ │ │ -
1342 */
│ │ │ -
1343 template<typename... _Args>
│ │ │ - │ │ │ -
1345 iterator
│ │ │ -
│ │ │ -
1346 emplace(const_iterator __position, _Args&&... __args)
│ │ │ -
1347 { return _M_emplace_aux(__position, std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
1348
│ │ │ -
1349 /**
│ │ │ -
1350 * @brief Inserts given value into %vector before specified iterator.
│ │ │ -
1351 * @param __position A const_iterator into the %vector.
│ │ │ -
1352 * @param __x Data to be inserted.
│ │ │ -
1353 * @return An iterator that points to the inserted data.
│ │ │ -
1354 *
│ │ │ -
1355 * This function will insert a copy of the given value before
│ │ │ -
1356 * the specified location. Note that this kind of operation
│ │ │ -
1357 * could be expensive for a %vector and if it is frequently
│ │ │ -
1358 * used the user should consider using std::list.
│ │ │ -
1359 */
│ │ │ - │ │ │ -
1361 iterator
│ │ │ -
1362 insert(const_iterator __position, const value_type& __x);
│ │ │ -
1363#else
│ │ │ -
1364 /**
│ │ │ -
1365 * @brief Inserts given value into %vector before specified iterator.
│ │ │ -
1366 * @param __position An iterator into the %vector.
│ │ │ -
1367 * @param __x Data to be inserted.
│ │ │ -
1368 * @return An iterator that points to the inserted data.
│ │ │ -
1369 *
│ │ │ -
1370 * This function will insert a copy of the given value before
│ │ │ -
1371 * the specified location. Note that this kind of operation
│ │ │ -
1372 * could be expensive for a %vector and if it is frequently
│ │ │ -
1373 * used the user should consider using std::list.
│ │ │ -
1374 */
│ │ │ -
1375 iterator
│ │ │ -
1376 insert(iterator __position, const value_type& __x);
│ │ │ -
1377#endif
│ │ │ -
1378
│ │ │ -
1379#if __cplusplus >= 201103L
│ │ │ -
1380 /**
│ │ │ -
1381 * @brief Inserts given rvalue into %vector before specified iterator.
│ │ │ -
1382 * @param __position A const_iterator into the %vector.
│ │ │ -
1383 * @param __x Data to be inserted.
│ │ │ -
1384 * @return An iterator that points to the inserted data.
│ │ │ -
1385 *
│ │ │ -
1386 * This function will insert a copy of the given rvalue before
│ │ │ -
1387 * the specified location. Note that this kind of operation
│ │ │ -
1388 * could be expensive for a %vector and if it is frequently
│ │ │ -
1389 * used the user should consider using std::list.
│ │ │ -
1390 */
│ │ │ - │ │ │ -
1392 iterator
│ │ │ -
│ │ │ -
1393 insert(const_iterator __position, value_type&& __x)
│ │ │ -
1394 { return _M_insert_rval(__position, std::move(__x)); }
│ │ │ -
│ │ │ -
1395
│ │ │ -
1396 /**
│ │ │ -
1397 * @brief Inserts an initializer_list into the %vector.
│ │ │ -
1398 * @param __position An iterator into the %vector.
│ │ │ -
1399 * @param __l An initializer_list.
│ │ │ -
1400 *
│ │ │ -
1401 * This function will insert copies of the data in the
│ │ │ -
1402 * initializer_list @a l into the %vector before the location
│ │ │ -
1403 * specified by @a position.
│ │ │ -
1404 *
│ │ │ -
1405 * Note that this kind of operation could be expensive for a
│ │ │ -
1406 * %vector and if it is frequently used the user should
│ │ │ -
1407 * consider using std::list.
│ │ │ -
1408 */
│ │ │ - │ │ │ -
1410 iterator
│ │ │ -
│ │ │ - │ │ │ -
1412 {
│ │ │ -
1413 auto __offset = __position - cbegin();
│ │ │ -
1414 _M_range_insert(begin() + __offset, __l.begin(), __l.end(),
│ │ │ - │ │ │ -
1416 return begin() + __offset;
│ │ │ -
1417 }
│ │ │ -
│ │ │ -
1418#endif
│ │ │ -
1419
│ │ │ -
1420#if __cplusplus >= 201103L
│ │ │ -
1421 /**
│ │ │ -
1422 * @brief Inserts a number of copies of given data into the %vector.
│ │ │ -
1423 * @param __position A const_iterator into the %vector.
│ │ │ -
1424 * @param __n Number of elements to be inserted.
│ │ │ -
1425 * @param __x Data to be inserted.
│ │ │ -
1426 * @return An iterator that points to the inserted data.
│ │ │ -
1427 *
│ │ │ -
1428 * This function will insert a specified number of copies of
│ │ │ -
1429 * the given data before the location specified by @a position.
│ │ │ -
1430 *
│ │ │ -
1431 * Note that this kind of operation could be expensive for a
│ │ │ -
1432 * %vector and if it is frequently used the user should
│ │ │ -
1433 * consider using std::list.
│ │ │ -
1434 */
│ │ │ - │ │ │ -
1436 iterator
│ │ │ -
│ │ │ -
1437 insert(const_iterator __position, size_type __n, const value_type& __x)
│ │ │ -
1438 {
│ │ │ -
1439 difference_type __offset = __position - cbegin();
│ │ │ -
1440 _M_fill_insert(begin() + __offset, __n, __x);
│ │ │ -
1441 return begin() + __offset;
│ │ │ -
1442 }
│ │ │ -
│ │ │ -
1443#else
│ │ │ -
1444 /**
│ │ │ -
1445 * @brief Inserts a number of copies of given data into the %vector.
│ │ │ -
1446 * @param __position An iterator into the %vector.
│ │ │ -
1447 * @param __n Number of elements to be inserted.
│ │ │ -
1448 * @param __x Data to be inserted.
│ │ │ -
1449 *
│ │ │ -
1450 * This function will insert a specified number of copies of
│ │ │ -
1451 * the given data before the location specified by @a position.
│ │ │ -
1452 *
│ │ │ -
1453 * Note that this kind of operation could be expensive for a
│ │ │ -
1454 * %vector and if it is frequently used the user should
│ │ │ -
1455 * consider using std::list.
│ │ │ -
1456 */
│ │ │ -
1457 void
│ │ │ -
1458 insert(iterator __position, size_type __n, const value_type& __x)
│ │ │ -
1459 { _M_fill_insert(__position, __n, __x); }
│ │ │ +
1268 template<typename _Yp, typename _Tp>
│ │ │ +
1269 struct __sp_compatible_with<_Yp*, _Tp*>
│ │ │ +
1270 : is_convertible<_Yp*, _Tp*>::type
│ │ │ +
1271 { };
│ │ │ +
1272
│ │ │ +
1273 template<typename _Up, size_t _Nm>
│ │ │ +
1274 struct __sp_compatible_with<_Up(*)[_Nm], _Up(*)[]>
│ │ │ +
1275 : true_type
│ │ │ +
1276 { };
│ │ │ +
1277
│ │ │ +
1278 template<typename _Up, size_t _Nm>
│ │ │ +
1279 struct __sp_compatible_with<_Up(*)[_Nm], const _Up(*)[]>
│ │ │ +
1280 : true_type
│ │ │ +
1281 { };
│ │ │ +
1282
│ │ │ +
1283 template<typename _Up, size_t _Nm>
│ │ │ +
1284 struct __sp_compatible_with<_Up(*)[_Nm], volatile _Up(*)[]>
│ │ │ +
1285 : true_type
│ │ │ +
1286 { };
│ │ │ +
1287
│ │ │ +
1288 template<typename _Up, size_t _Nm>
│ │ │ +
1289 struct __sp_compatible_with<_Up(*)[_Nm], const volatile _Up(*)[]>
│ │ │ +
1290 : true_type
│ │ │ +
1291 { };
│ │ │ +
1292
│ │ │ +
1293 // Test conversion from Y(*)[N] to U(*)[N] without forming invalid type Y[N].
│ │ │ +
1294 template<typename _Up, size_t _Nm, typename _Yp, typename = void>
│ │ │ +
1295 struct __sp_is_constructible_arrN
│ │ │ +
1296 : false_type
│ │ │ +
1297 { };
│ │ │ +
1298
│ │ │ +
1299 template<typename _Up, size_t _Nm, typename _Yp>
│ │ │ +
1300 struct __sp_is_constructible_arrN<_Up, _Nm, _Yp, __void_t<_Yp[_Nm]>>
│ │ │ +
1301 : is_convertible<_Yp(*)[_Nm], _Up(*)[_Nm]>::type
│ │ │ +
1302 { };
│ │ │ +
1303
│ │ │ +
1304 // Test conversion from Y(*)[] to U(*)[] without forming invalid type Y[].
│ │ │ +
1305 template<typename _Up, typename _Yp, typename = void>
│ │ │ +
1306 struct __sp_is_constructible_arr
│ │ │ +
1307 : false_type
│ │ │ +
1308 { };
│ │ │ +
1309
│ │ │ +
1310 template<typename _Up, typename _Yp>
│ │ │ +
1311 struct __sp_is_constructible_arr<_Up, _Yp, __void_t<_Yp[]>>
│ │ │ +
1312 : is_convertible<_Yp(*)[], _Up(*)[]>::type
│ │ │ +
1313 { };
│ │ │ +
1314
│ │ │ +
1315 // Trait to check if shared_ptr<T> can be constructed from Y*.
│ │ │ +
1316 template<typename _Tp, typename _Yp>
│ │ │ +
1317 struct __sp_is_constructible;
│ │ │ +
1318
│ │ │ +
1319 // When T is U[N], Y(*)[N] shall be convertible to T*;
│ │ │ +
1320 template<typename _Up, size_t _Nm, typename _Yp>
│ │ │ +
1321 struct __sp_is_constructible<_Up[_Nm], _Yp>
│ │ │ +
1322 : __sp_is_constructible_arrN<_Up, _Nm, _Yp>::type
│ │ │ +
1323 { };
│ │ │ +
1324
│ │ │ +
1325 // when T is U[], Y(*)[] shall be convertible to T*;
│ │ │ +
1326 template<typename _Up, typename _Yp>
│ │ │ +
1327 struct __sp_is_constructible<_Up[], _Yp>
│ │ │ +
1328 : __sp_is_constructible_arr<_Up, _Yp>::type
│ │ │ +
1329 { };
│ │ │ +
1330
│ │ │ +
1331 // otherwise, Y* shall be convertible to T*.
│ │ │ +
1332 template<typename _Tp, typename _Yp>
│ │ │ +
1333 struct __sp_is_constructible
│ │ │ +
1334 : is_convertible<_Yp*, _Tp*>::type
│ │ │ +
1335 { };
│ │ │ +
1336
│ │ │ +
1337
│ │ │ +
1338 // Define operator* and operator-> for shared_ptr<T>.
│ │ │ +
1339 template<typename _Tp, _Lock_policy _Lp,
│ │ │ +
1340 bool = is_array<_Tp>::value, bool = is_void<_Tp>::value>
│ │ │ +
1341 class __shared_ptr_access
│ │ │ +
1342 {
│ │ │ +
1343 public:
│ │ │ +
1344 using element_type = _Tp;
│ │ │ +
1345
│ │ │ +
1346 element_type&
│ │ │ +
1347 operator*() const noexcept
│ │ │ +
1348 {
│ │ │ +
1349 __glibcxx_assert(_M_get() != nullptr);
│ │ │ +
1350 return *_M_get();
│ │ │ +
1351 }
│ │ │ +
1352
│ │ │ +
1353 element_type*
│ │ │ +
1354 operator->() const noexcept
│ │ │ +
1355 {
│ │ │ +
1356 _GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr);
│ │ │ +
1357 return _M_get();
│ │ │ +
1358 }
│ │ │ +
1359
│ │ │ +
1360 private:
│ │ │ +
1361 element_type*
│ │ │ +
1362 _M_get() const noexcept
│ │ │ +
1363 { return static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get(); }
│ │ │ +
1364 };
│ │ │ +
1365
│ │ │ +
1366 // Define operator-> for shared_ptr<cv void>.
│ │ │ +
1367 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1368 class __shared_ptr_access<_Tp, _Lp, false, true>
│ │ │ +
1369 {
│ │ │ +
1370 public:
│ │ │ +
1371 using element_type = _Tp;
│ │ │ +
1372
│ │ │ +
1373 element_type*
│ │ │ +
1374 operator->() const noexcept
│ │ │ +
1375 {
│ │ │ +
1376 auto __ptr = static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get();
│ │ │ +
1377 _GLIBCXX_DEBUG_PEDASSERT(__ptr != nullptr);
│ │ │ +
1378 return __ptr;
│ │ │ +
1379 }
│ │ │ +
1380 };
│ │ │ +
1381
│ │ │ +
1382 // Define operator[] for shared_ptr<T[]> and shared_ptr<T[N]>.
│ │ │ +
1383 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1384 class __shared_ptr_access<_Tp, _Lp, true, false>
│ │ │ +
1385 {
│ │ │ +
1386 public:
│ │ │ +
1387 using element_type = typename remove_extent<_Tp>::type;
│ │ │ +
1388
│ │ │ +
1389#if __cplusplus <= 201402L
│ │ │ +
1390 [[__deprecated__("shared_ptr<T[]>::operator* is absent from C++17")]]
│ │ │ +
1391 element_type&
│ │ │ +
1392 operator*() const noexcept
│ │ │ +
1393 {
│ │ │ +
1394 __glibcxx_assert(_M_get() != nullptr);
│ │ │ +
1395 return *_M_get();
│ │ │ +
1396 }
│ │ │ +
1397
│ │ │ +
1398 [[__deprecated__("shared_ptr<T[]>::operator-> is absent from C++17")]]
│ │ │ +
1399 element_type*
│ │ │ +
1400 operator->() const noexcept
│ │ │ +
1401 {
│ │ │ +
1402 _GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr);
│ │ │ +
1403 return _M_get();
│ │ │ +
1404 }
│ │ │ +
1405#endif
│ │ │ +
1406
│ │ │ +
1407 element_type&
│ │ │ +
1408 operator[](ptrdiff_t __i) const noexcept
│ │ │ +
1409 {
│ │ │ +
1410 __glibcxx_assert(_M_get() != nullptr);
│ │ │ +
1411 __glibcxx_assert(!extent<_Tp>::value || __i < extent<_Tp>::value);
│ │ │ +
1412 return _M_get()[__i];
│ │ │ +
1413 }
│ │ │ +
1414
│ │ │ +
1415 private:
│ │ │ +
1416 element_type*
│ │ │ +
1417 _M_get() const noexcept
│ │ │ +
1418 { return static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get(); }
│ │ │ +
1419 };
│ │ │ +
1420
│ │ │ +
1421 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1422 class __shared_ptr
│ │ │ +
1423 : public __shared_ptr_access<_Tp, _Lp>
│ │ │ +
1424 {
│ │ │ +
1425 public:
│ │ │ +
1426 using element_type = typename remove_extent<_Tp>::type;
│ │ │ +
1427
│ │ │ +
1428 private:
│ │ │ +
1429 // Constraint for taking ownership of a pointer of type _Yp*:
│ │ │ +
1430 template<typename _Yp>
│ │ │ +
1431 using _SafeConv
│ │ │ +
1432 = typename enable_if<__sp_is_constructible<_Tp, _Yp>::value>::type;
│ │ │ +
1433
│ │ │ +
1434 // Constraint for construction from shared_ptr and weak_ptr:
│ │ │ +
1435 template<typename _Yp, typename _Res = void>
│ │ │ +
1436 using _Compatible = typename
│ │ │ +
1437 enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type;
│ │ │ +
1438
│ │ │ +
1439 // Constraint for assignment from shared_ptr and weak_ptr:
│ │ │ +
1440 template<typename _Yp>
│ │ │ +
1441 using _Assignable = _Compatible<_Yp, __shared_ptr&>;
│ │ │ +
1442
│ │ │ +
1443 // Constraint for construction from unique_ptr:
│ │ │ +
1444 template<typename _Yp, typename _Del, typename _Res = void,
│ │ │ +
1445 typename _Ptr = typename unique_ptr<_Yp, _Del>::pointer>
│ │ │ +
1446 using _UniqCompatible = __enable_if_t<__and_<
│ │ │ +
1447 __sp_compatible_with<_Yp*, _Tp*>,
│ │ │ +
1448 is_convertible<_Ptr, element_type*>,
│ │ │ +
1449 is_move_constructible<_Del>
│ │ │ +
1450 >::value, _Res>;
│ │ │ +
1451
│ │ │ +
1452 // Constraint for assignment from unique_ptr:
│ │ │ +
1453 template<typename _Yp, typename _Del>
│ │ │ +
1454 using _UniqAssignable = _UniqCompatible<_Yp, _Del, __shared_ptr&>;
│ │ │ +
1455
│ │ │ +
1456 public:
│ │ │ +
1457
│ │ │ +
1458#if __cplusplus > 201402L
│ │ │ +
1459 using weak_type = __weak_ptr<_Tp, _Lp>;
│ │ │
1460#endif
│ │ │
1461
│ │ │ -
1462#if __cplusplus >= 201103L
│ │ │ -
1463 /**
│ │ │ -
1464 * @brief Inserts a range into the %vector.
│ │ │ -
1465 * @param __position A const_iterator into the %vector.
│ │ │ -
1466 * @param __first An input iterator.
│ │ │ -
1467 * @param __last An input iterator.
│ │ │ -
1468 * @return An iterator that points to the inserted data.
│ │ │ -
1469 *
│ │ │ -
1470 * This function will insert copies of the data in the range
│ │ │ -
1471 * [__first,__last) into the %vector before the location specified
│ │ │ -
1472 * by @a pos.
│ │ │ -
1473 *
│ │ │ -
1474 * Note that this kind of operation could be expensive for a
│ │ │ -
1475 * %vector and if it is frequently used the user should
│ │ │ -
1476 * consider using std::list.
│ │ │ -
1477 */
│ │ │ -
1478 template<typename _InputIterator,
│ │ │ - │ │ │ -
1480 _GLIBCXX20_CONSTEXPR
│ │ │ -
1481 iterator
│ │ │ -
│ │ │ -
1482 insert(const_iterator __position, _InputIterator __first,
│ │ │ -
1483 _InputIterator __last)
│ │ │ -
1484 {
│ │ │ -
1485 difference_type __offset = __position - cbegin();
│ │ │ -
1486 _M_range_insert(begin() + __offset, __first, __last,
│ │ │ -
1487 std::__iterator_category(__first));
│ │ │ -
1488 return begin() + __offset;
│ │ │ -
1489 }
│ │ │ -
│ │ │ -
1490#else
│ │ │ -
1491 /**
│ │ │ -
1492 * @brief Inserts a range into the %vector.
│ │ │ -
1493 * @param __position An iterator into the %vector.
│ │ │ -
1494 * @param __first An input iterator.
│ │ │ -
1495 * @param __last An input iterator.
│ │ │ -
1496 *
│ │ │ -
1497 * This function will insert copies of the data in the range
│ │ │ -
1498 * [__first,__last) into the %vector before the location specified
│ │ │ -
1499 * by @a pos.
│ │ │ -
1500 *
│ │ │ -
1501 * Note that this kind of operation could be expensive for a
│ │ │ -
1502 * %vector and if it is frequently used the user should
│ │ │ -
1503 * consider using std::list.
│ │ │ -
1504 */
│ │ │ -
1505 template<typename _InputIterator>
│ │ │ -
1506 void
│ │ │ - │ │ │ -
1508 _InputIterator __last)
│ │ │ -
1509 {
│ │ │ -
1510 // Check whether it's an integral type. If so, it's not an iterator.
│ │ │ -
1511 typedef typename std::__is_integer<_InputIterator>::__type _Integral;
│ │ │ -
1512 _M_insert_dispatch(__position, __first, __last, _Integral());
│ │ │ -
1513 }
│ │ │ -
1514#endif
│ │ │ -
1515
│ │ │ -
1516 /**
│ │ │ -
1517 * @brief Remove element at given position.
│ │ │ -
1518 * @param __position Iterator pointing to element to be erased.
│ │ │ -
1519 * @return An iterator pointing to the next element (or end()).
│ │ │ -
1520 *
│ │ │ -
1521 * This function will erase the element at the given position and thus
│ │ │ -
1522 * shorten the %vector by one.
│ │ │ -
1523 *
│ │ │ -
1524 * Note This operation could be expensive and if it is
│ │ │ -
1525 * frequently used the user should consider using std::list.
│ │ │ -
1526 * The user is also cautioned that this function only erases
│ │ │ -
1527 * the element, and that if the element is itself a pointer,
│ │ │ -
1528 * the pointed-to memory is not touched in any way. Managing
│ │ │ -
1529 * the pointer is the user's responsibility.
│ │ │ -
1530 */
│ │ │ -
1531 _GLIBCXX20_CONSTEXPR
│ │ │ -
1532 iterator
│ │ │ -
1533#if __cplusplus >= 201103L
│ │ │ -
│ │ │ -
1534 erase(const_iterator __position)
│ │ │ -
1535 { return _M_erase(begin() + (__position - cbegin())); }
│ │ │ -
│ │ │ -
1536#else
│ │ │ - │ │ │ -
1538 { return _M_erase(__position); }
│ │ │ -
1539#endif
│ │ │ -
1540
│ │ │ -
1541 /**
│ │ │ -
1542 * @brief Remove a range of elements.
│ │ │ -
1543 * @param __first Iterator pointing to the first element to be erased.
│ │ │ -
1544 * @param __last Iterator pointing to one past the last element to be
│ │ │ -
1545 * erased.
│ │ │ -
1546 * @return An iterator pointing to the element pointed to by @a __last
│ │ │ -
1547 * prior to erasing (or end()).
│ │ │ -
1548 *
│ │ │ -
1549 * This function will erase the elements in the range
│ │ │ -
1550 * [__first,__last) and shorten the %vector accordingly.
│ │ │ -
1551 *
│ │ │ -
1552 * Note This operation could be expensive and if it is
│ │ │ -
1553 * frequently used the user should consider using std::list.
│ │ │ -
1554 * The user is also cautioned that this function only erases
│ │ │ -
1555 * the elements, and that if the elements themselves are
│ │ │ -
1556 * pointers, the pointed-to memory is not touched in any way.
│ │ │ -
1557 * Managing the pointer is the user's responsibility.
│ │ │ -
1558 */
│ │ │ -
1559 _GLIBCXX20_CONSTEXPR
│ │ │ -
1560 iterator
│ │ │ -
1561#if __cplusplus >= 201103L
│ │ │ -
│ │ │ -
1562 erase(const_iterator __first, const_iterator __last)
│ │ │ -
1563 {
│ │ │ -
1564 const auto __beg = begin();
│ │ │ -
1565 const auto __cbeg = cbegin();
│ │ │ -
1566 return _M_erase(__beg + (__first - __cbeg), __beg + (__last - __cbeg));
│ │ │ -
1567 }
│ │ │ -
│ │ │ -
1568#else
│ │ │ -
1569 erase(iterator __first, iterator __last)
│ │ │ -
1570 { return _M_erase(__first, __last); }
│ │ │ -
1571#endif
│ │ │ -
1572
│ │ │ -
1573 /**
│ │ │ -
1574 * @brief Swaps data with another %vector.
│ │ │ -
1575 * @param __x A %vector of the same element and allocator types.
│ │ │ -
1576 *
│ │ │ -
1577 * This exchanges the elements between two vectors in constant time.
│ │ │ -
1578 * (Three pointers, so it should be quite fast.)
│ │ │ -
1579 * Note that the global std::swap() function is specialized such that
│ │ │ -
1580 * std::swap(v1,v2) will feed to this function.
│ │ │ -
1581 *
│ │ │ -
1582 * Whether the allocators are swapped depends on the allocator traits.
│ │ │ -
1583 */
│ │ │ -
1584 _GLIBCXX20_CONSTEXPR
│ │ │ -
1585 void
│ │ │ -
│ │ │ - │ │ │ -
1587 {
│ │ │ -
1588#if __cplusplus >= 201103L
│ │ │ -
1589 __glibcxx_assert(_Alloc_traits::propagate_on_container_swap::value
│ │ │ -
1590 || _M_get_Tp_allocator() == __x._M_get_Tp_allocator());
│ │ │ +
1462 constexpr __shared_ptr() noexcept
│ │ │ +
1463 : _M_ptr(0), _M_refcount()
│ │ │ +
1464 { }
│ │ │ +
1465
│ │ │ +
1466 template<typename _Yp, typename = _SafeConv<_Yp>>
│ │ │ +
1467 explicit
│ │ │ +
1468 __shared_ptr(_Yp* __p)
│ │ │ +
1469 : _M_ptr(__p), _M_refcount(__p, typename is_array<_Tp>::type())
│ │ │ +
1470 {
│ │ │ +
1471 static_assert( !is_void<_Yp>::value, "incomplete type" );
│ │ │ +
1472 static_assert( sizeof(_Yp) > 0, "incomplete type" );
│ │ │ +
1473 _M_enable_shared_from_this_with(__p);
│ │ │ +
1474 }
│ │ │ +
1475
│ │ │ +
1476 template<typename _Yp, typename _Deleter, typename = _SafeConv<_Yp>>
│ │ │ +
1477 __shared_ptr(_Yp* __p, _Deleter __d)
│ │ │ +
1478 : _M_ptr(__p), _M_refcount(__p, std::move(__d))
│ │ │ +
1479 {
│ │ │ +
1480 static_assert(__is_invocable<_Deleter&, _Yp*&>::value,
│ │ │ +
1481 "deleter expression d(p) is well-formed");
│ │ │ +
1482 _M_enable_shared_from_this_with(__p);
│ │ │ +
1483 }
│ │ │ +
1484
│ │ │ +
1485 template<typename _Yp, typename _Deleter, typename _Alloc,
│ │ │ +
1486 typename = _SafeConv<_Yp>>
│ │ │ +
1487 __shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a)
│ │ │ +
1488 : _M_ptr(__p), _M_refcount(__p, std::move(__d), std::move(__a))
│ │ │ +
1489 {
│ │ │ +
1490 static_assert(__is_invocable<_Deleter&, _Yp*&>::value,
│ │ │ +
1491 "deleter expression d(p) is well-formed");
│ │ │ +
1492 _M_enable_shared_from_this_with(__p);
│ │ │ +
1493 }
│ │ │ +
1494
│ │ │ +
1495 template<typename _Deleter>
│ │ │ +
1496 __shared_ptr(nullptr_t __p, _Deleter __d)
│ │ │ +
1497 : _M_ptr(0), _M_refcount(__p, std::move(__d))
│ │ │ +
1498 { }
│ │ │ +
1499
│ │ │ +
1500 template<typename _Deleter, typename _Alloc>
│ │ │ +
1501 __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a)
│ │ │ +
1502 : _M_ptr(0), _M_refcount(__p, std::move(__d), std::move(__a))
│ │ │ +
1503 { }
│ │ │ +
1504
│ │ │ +
1505 // Aliasing constructor
│ │ │ +
1506 template<typename _Yp>
│ │ │ +
1507 __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r,
│ │ │ +
1508 element_type* __p) noexcept
│ │ │ +
1509 : _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws
│ │ │ +
1510 { }
│ │ │ +
1511
│ │ │ +
1512 // Aliasing constructor
│ │ │ +
1513 template<typename _Yp>
│ │ │ +
1514 __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r,
│ │ │ +
1515 element_type* __p) noexcept
│ │ │ +
1516 : _M_ptr(__p), _M_refcount()
│ │ │ +
1517 {
│ │ │ +
1518 _M_refcount._M_swap(__r._M_refcount);
│ │ │ +
1519 __r._M_ptr = nullptr;
│ │ │ +
1520 }
│ │ │ +
1521
│ │ │ +
1522 __shared_ptr(const __shared_ptr&) noexcept = default;
│ │ │ +
1523 __shared_ptr& operator=(const __shared_ptr&) noexcept = default;
│ │ │ +
1524 ~__shared_ptr() = default;
│ │ │ +
1525
│ │ │ +
1526 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1527 __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
1528 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount)
│ │ │ +
1529 { }
│ │ │ +
1530
│ │ │ +
1531 __shared_ptr(__shared_ptr&& __r) noexcept
│ │ │ +
1532 : _M_ptr(__r._M_ptr), _M_refcount()
│ │ │ +
1533 {
│ │ │ +
1534 _M_refcount._M_swap(__r._M_refcount);
│ │ │ +
1535 __r._M_ptr = nullptr;
│ │ │ +
1536 }
│ │ │ +
1537
│ │ │ +
1538 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1539 __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r) noexcept
│ │ │ +
1540 : _M_ptr(__r._M_ptr), _M_refcount()
│ │ │ +
1541 {
│ │ │ +
1542 _M_refcount._M_swap(__r._M_refcount);
│ │ │ +
1543 __r._M_ptr = nullptr;
│ │ │ +
1544 }
│ │ │ +
1545
│ │ │ +
1546 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1547 explicit __shared_ptr(const __weak_ptr<_Yp, _Lp>& __r)
│ │ │ +
1548 : _M_refcount(__r._M_refcount) // may throw
│ │ │ +
1549 {
│ │ │ +
1550 // It is now safe to copy __r._M_ptr, as
│ │ │ +
1551 // _M_refcount(__r._M_refcount) did not throw.
│ │ │ +
1552 _M_ptr = __r._M_ptr;
│ │ │ +
1553 }
│ │ │ +
1554
│ │ │ +
1555 // If an exception is thrown this constructor has no effect.
│ │ │ +
1556 template<typename _Yp, typename _Del,
│ │ │ +
1557 typename = _UniqCompatible<_Yp, _Del>>
│ │ │ +
1558 __shared_ptr(unique_ptr<_Yp, _Del>&& __r)
│ │ │ +
1559 : _M_ptr(__r.get()), _M_refcount()
│ │ │ +
1560 {
│ │ │ +
1561 auto __raw = __to_address(__r.get());
│ │ │ +
1562 _M_refcount = __shared_count<_Lp>(std::move(__r));
│ │ │ +
1563 _M_enable_shared_from_this_with(__raw);
│ │ │ +
1564 }
│ │ │ +
1565
│ │ │ +
1566#if __cplusplus <= 201402L && _GLIBCXX_USE_DEPRECATED
│ │ │ +
1567 protected:
│ │ │ +
1568 // If an exception is thrown this constructor has no effect.
│ │ │ +
1569 template<typename _Tp1, typename _Del,
│ │ │ +
1570 typename enable_if<__and_<
│ │ │ +
1571 __not_<is_array<_Tp>>, is_array<_Tp1>,
│ │ │ +
1572 is_convertible<typename unique_ptr<_Tp1, _Del>::pointer, _Tp*>
│ │ │ +
1573 >::value, bool>::type = true>
│ │ │ +
1574 __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete)
│ │ │ +
1575 : _M_ptr(__r.get()), _M_refcount()
│ │ │ +
1576 {
│ │ │ +
1577 auto __raw = __to_address(__r.get());
│ │ │ +
1578 _M_refcount = __shared_count<_Lp>(std::move(__r));
│ │ │ +
1579 _M_enable_shared_from_this_with(__raw);
│ │ │ +
1580 }
│ │ │ +
1581 public:
│ │ │ +
1582#endif
│ │ │ +
1583
│ │ │ +
1584#if _GLIBCXX_USE_DEPRECATED
│ │ │ +
1585#pragma GCC diagnostic push
│ │ │ +
1586#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
1587 // Postcondition: use_count() == 1 and __r.get() == 0
│ │ │ +
1588 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
1589 __shared_ptr(auto_ptr<_Yp>&& __r);
│ │ │ +
1590#pragma GCC diagnostic pop
│ │ │
1591#endif
│ │ │ -
1592 this->_M_impl._M_swap_data(__x._M_impl);
│ │ │ -
1593 _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(),
│ │ │ -
1594 __x._M_get_Tp_allocator());
│ │ │ -
1595 }
│ │ │ -
│ │ │ -
1596
│ │ │ -
1597 /**
│ │ │ -
1598 * Erases all the elements. Note that this function only erases the
│ │ │ -
1599 * elements, and that if the elements themselves are pointers, the
│ │ │ -
1600 * pointed-to memory is not touched in any way. Managing the pointer is
│ │ │ -
1601 * the user's responsibility.
│ │ │ -
1602 */
│ │ │ - │ │ │ -
1604 void
│ │ │ -
│ │ │ - │ │ │ -
1606 { _M_erase_at_end(this->_M_impl._M_start); }
│ │ │ -
│ │ │ -
1607
│ │ │ -
1608 protected:
│ │ │ -
1609 /**
│ │ │ -
1610 * Memory expansion handler. Uses the member allocation function to
│ │ │ -
1611 * obtain @a n bytes of memory, and then copies [first,last) into it.
│ │ │ -
1612 */
│ │ │ -
1613 template<typename _ForwardIterator>
│ │ │ - │ │ │ -
1615 pointer
│ │ │ -
│ │ │ - │ │ │ -
1617 _ForwardIterator __first, _ForwardIterator __last)
│ │ │ -
1618 {
│ │ │ -
1619 pointer __result = this->_M_allocate(__n);
│ │ │ -
1620 __try
│ │ │ -
1621 {
│ │ │ -
1622 std::__uninitialized_copy_a(__first, __last, __result,
│ │ │ -
1623 _M_get_Tp_allocator());
│ │ │ -
1624 return __result;
│ │ │ -
1625 }
│ │ │ -
1626 __catch(...)
│ │ │ -
1627 {
│ │ │ -
1628 _M_deallocate(__result, __n);
│ │ │ -
1629 __throw_exception_again;
│ │ │ -
1630 }
│ │ │ -
1631 }
│ │ │ -
│ │ │ -
1632
│ │ │ -
1633
│ │ │ -
1634 // Internal constructor functions follow.
│ │ │ -
1635
│ │ │ -
1636 // Called by the range constructor to implement [23.1.1]/9
│ │ │ -
1637
│ │ │ -
1638#if __cplusplus < 201103L
│ │ │ -
1639 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
1640 // 438. Ambiguity in the "do the right thing" clause
│ │ │ -
1641 template<typename _Integer>
│ │ │ -
1642 void
│ │ │ -
1643 _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type)
│ │ │ -
1644 {
│ │ │ -
1645 this->_M_impl._M_start = _M_allocate(_S_check_init_len(
│ │ │ -
1646 static_cast<size_type>(__n), _M_get_Tp_allocator()));
│ │ │ -
1647 this->_M_impl._M_end_of_storage =
│ │ │ -
1648 this->_M_impl._M_start + static_cast<size_type>(__n);
│ │ │ -
1649 _M_fill_initialize(static_cast<size_type>(__n), __value);
│ │ │ -
1650 }
│ │ │ -
1651
│ │ │ -
1652 // Called by the range constructor to implement [23.1.1]/9
│ │ │ -
1653 template<typename _InputIterator>
│ │ │ -
1654 void
│ │ │ -
1655 _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
│ │ │ -
1656 __false_type)
│ │ │ -
1657 {
│ │ │ -
1658 _M_range_initialize(__first, __last,
│ │ │ -
1659 std::__iterator_category(__first));
│ │ │ -
1660 }
│ │ │ -
1661#endif
│ │ │ -
1662
│ │ │ -
1663 // Called by the second initialize_dispatch above
│ │ │ -
1664 template<typename _InputIterator>
│ │ │ -
1665 _GLIBCXX20_CONSTEXPR
│ │ │ -
1666 void
│ │ │ -
1667 _M_range_initialize(_InputIterator __first, _InputIterator __last,
│ │ │ - │ │ │ -
1669 {
│ │ │ -
1670 __try {
│ │ │ -
1671 for (; __first != __last; ++__first)
│ │ │ -
1672#if __cplusplus >= 201103L
│ │ │ -
1673 emplace_back(*__first);
│ │ │ -
1674#else
│ │ │ -
1675 push_back(*__first);
│ │ │ -
1676#endif
│ │ │ -
1677 } __catch(...) {
│ │ │ -
1678 clear();
│ │ │ -
1679 __throw_exception_again;
│ │ │ -
1680 }
│ │ │ -
1681 }
│ │ │ -
1682
│ │ │ -
1683 // Called by the second initialize_dispatch above
│ │ │ -
1684 template<typename _ForwardIterator>
│ │ │ -
1685 _GLIBCXX20_CONSTEXPR
│ │ │ -
1686 void
│ │ │ -
1687 _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
│ │ │ - │ │ │ -
1689 {
│ │ │ -
1690 const size_type __n = std::distance(__first, __last);
│ │ │ -
1691 this->_M_impl._M_start
│ │ │ -
1692 = this->_M_allocate(_S_check_init_len(__n, _M_get_Tp_allocator()));
│ │ │ -
1693 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
│ │ │ -
1694 this->_M_impl._M_finish =
│ │ │ -
1695 std::__uninitialized_copy_a(__first, __last,
│ │ │ -
1696 this->_M_impl._M_start,
│ │ │ -
1697 _M_get_Tp_allocator());
│ │ │ -
1698 }
│ │ │ -
1699
│ │ │ -
1700 // Called by the first initialize_dispatch above and by the
│ │ │ -
1701 // vector(n,value,a) constructor.
│ │ │ -
1702 _GLIBCXX20_CONSTEXPR
│ │ │ -
1703 void
│ │ │ -
1704 _M_fill_initialize(size_type __n, const value_type& __value)
│ │ │ -
1705 {
│ │ │ -
1706 this->_M_impl._M_finish =
│ │ │ -
1707 std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value,
│ │ │ -
1708 _M_get_Tp_allocator());
│ │ │ -
1709 }
│ │ │ -
1710
│ │ │ -
1711#if __cplusplus >= 201103L
│ │ │ -
1712 // Called by the vector(n) constructor.
│ │ │ -
1713 _GLIBCXX20_CONSTEXPR
│ │ │ -
1714 void
│ │ │ -
1715 _M_default_initialize(size_type __n)
│ │ │ -
1716 {
│ │ │ -
1717 this->_M_impl._M_finish =
│ │ │ -
1718 std::__uninitialized_default_n_a(this->_M_impl._M_start, __n,
│ │ │ -
1719 _M_get_Tp_allocator());
│ │ │ -
1720 }
│ │ │ -
1721#endif
│ │ │ -
1722
│ │ │ -
1723 // Internal assign functions follow. The *_aux functions do the actual
│ │ │ -
1724 // assignment work for the range versions.
│ │ │ -
1725
│ │ │ -
1726 // Called by the range assign to implement [23.1.1]/9
│ │ │ -
1727
│ │ │ -
1728 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
1729 // 438. Ambiguity in the "do the right thing" clause
│ │ │ -
1730 template<typename _Integer>
│ │ │ -
1731 _GLIBCXX20_CONSTEXPR
│ │ │ -
1732 void
│ │ │ -
1733 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
│ │ │ -
1734 { _M_fill_assign(__n, __val); }
│ │ │ -
1735
│ │ │ -
1736 // Called by the range assign to implement [23.1.1]/9
│ │ │ -
1737 template<typename _InputIterator>
│ │ │ -
1738 _GLIBCXX20_CONSTEXPR
│ │ │ -
1739 void
│ │ │ -
1740 _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
│ │ │ -
1741 __false_type)
│ │ │ -
1742 { _M_assign_aux(__first, __last, std::__iterator_category(__first)); }
│ │ │ -
1743
│ │ │ -
1744 // Called by the second assign_dispatch above
│ │ │ -
1745 template<typename _InputIterator>
│ │ │ -
1746 _GLIBCXX20_CONSTEXPR
│ │ │ -
1747 void
│ │ │ -
1748 _M_assign_aux(_InputIterator __first, _InputIterator __last,
│ │ │ - │ │ │ +
1592
│ │ │ +
1593 constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { }
│ │ │ +
1594
│ │ │ +
1595 template<typename _Yp>
│ │ │ +
1596 _Assignable<_Yp>
│ │ │ +
1597 operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
1598 {
│ │ │ +
1599 _M_ptr = __r._M_ptr;
│ │ │ +
1600 _M_refcount = __r._M_refcount; // __shared_count::op= doesn't throw
│ │ │ +
1601 return *this;
│ │ │ +
1602 }
│ │ │ +
1603
│ │ │ +
1604#if _GLIBCXX_USE_DEPRECATED
│ │ │ +
1605#pragma GCC diagnostic push
│ │ │ +
1606#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
1607 template<typename _Yp>
│ │ │ +
1608 _Assignable<_Yp>
│ │ │ +
1609 operator=(auto_ptr<_Yp>&& __r)
│ │ │ +
1610 {
│ │ │ +
1611 __shared_ptr(std::move(__r)).swap(*this);
│ │ │ +
1612 return *this;
│ │ │ +
1613 }
│ │ │ +
1614#pragma GCC diagnostic pop
│ │ │ +
1615#endif
│ │ │ +
1616
│ │ │ +
1617 __shared_ptr&
│ │ │ +
1618 operator=(__shared_ptr&& __r) noexcept
│ │ │ +
1619 {
│ │ │ +
1620 __shared_ptr(std::move(__r)).swap(*this);
│ │ │ +
1621 return *this;
│ │ │ +
1622 }
│ │ │ +
1623
│ │ │ +
1624 template<class _Yp>
│ │ │ +
1625 _Assignable<_Yp>
│ │ │ +
1626 operator=(__shared_ptr<_Yp, _Lp>&& __r) noexcept
│ │ │ +
1627 {
│ │ │ +
1628 __shared_ptr(std::move(__r)).swap(*this);
│ │ │ +
1629 return *this;
│ │ │ +
1630 }
│ │ │ +
1631
│ │ │ +
1632 template<typename _Yp, typename _Del>
│ │ │ +
1633 _UniqAssignable<_Yp, _Del>
│ │ │ +
1634 operator=(unique_ptr<_Yp, _Del>&& __r)
│ │ │ +
1635 {
│ │ │ +
1636 __shared_ptr(std::move(__r)).swap(*this);
│ │ │ +
1637 return *this;
│ │ │ +
1638 }
│ │ │ +
1639
│ │ │ +
1640 void
│ │ │ +
1641 reset() noexcept
│ │ │ +
1642 { __shared_ptr().swap(*this); }
│ │ │ +
1643
│ │ │ +
1644 template<typename _Yp>
│ │ │ +
1645 _SafeConv<_Yp>
│ │ │ +
1646 reset(_Yp* __p) // _Yp must be complete.
│ │ │ +
1647 {
│ │ │ +
1648 // Catch self-reset errors.
│ │ │ +
1649 __glibcxx_assert(__p == nullptr || __p != _M_ptr);
│ │ │ +
1650 __shared_ptr(__p).swap(*this);
│ │ │ +
1651 }
│ │ │ +
1652
│ │ │ +
1653 template<typename _Yp, typename _Deleter>
│ │ │ +
1654 _SafeConv<_Yp>
│ │ │ +
1655 reset(_Yp* __p, _Deleter __d)
│ │ │ +
1656 { __shared_ptr(__p, std::move(__d)).swap(*this); }
│ │ │ +
1657
│ │ │ +
1658 template<typename _Yp, typename _Deleter, typename _Alloc>
│ │ │ +
1659 _SafeConv<_Yp>
│ │ │ +
1660 reset(_Yp* __p, _Deleter __d, _Alloc __a)
│ │ │ +
1661 { __shared_ptr(__p, std::move(__d), std::move(__a)).swap(*this); }
│ │ │ +
1662
│ │ │ +
1663 /// Return the stored pointer.
│ │ │ +
1664 element_type*
│ │ │ +
1665 get() const noexcept
│ │ │ +
1666 { return _M_ptr; }
│ │ │ +
1667
│ │ │ +
1668 /// Return true if the stored pointer is not null.
│ │ │ +
1669 explicit operator bool() const noexcept
│ │ │ +
1670 { return _M_ptr != nullptr; }
│ │ │ +
1671
│ │ │ +
1672 /// Return true if use_count() == 1.
│ │ │ +
1673 bool
│ │ │ +
1674 unique() const noexcept
│ │ │ +
1675 { return _M_refcount._M_unique(); }
│ │ │ +
1676
│ │ │ +
1677 /// If *this owns a pointer, return the number of owners, otherwise zero.
│ │ │ +
1678 long
│ │ │ +
1679 use_count() const noexcept
│ │ │ +
1680 { return _M_refcount._M_get_use_count(); }
│ │ │ +
1681
│ │ │ +
1682 /// Exchange both the owned pointer and the stored pointer.
│ │ │ +
1683 void
│ │ │ +
1684 swap(__shared_ptr<_Tp, _Lp>& __other) noexcept
│ │ │ +
1685 {
│ │ │ +
1686 std::swap(_M_ptr, __other._M_ptr);
│ │ │ +
1687 _M_refcount._M_swap(__other._M_refcount);
│ │ │ +
1688 }
│ │ │ +
1689
│ │ │ +
1690 /** @brief Define an ordering based on ownership.
│ │ │ +
1691 *
│ │ │ +
1692 * This function defines a strict weak ordering between two shared_ptr
│ │ │ +
1693 * or weak_ptr objects, such that one object is less than the other
│ │ │ +
1694 * unless they share ownership of the same pointer, or are both empty.
│ │ │ +
1695 * @{
│ │ │ +
1696 */
│ │ │ +
1697 template<typename _Tp1>
│ │ │ +
1698 bool
│ │ │ +
1699 owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const noexcept
│ │ │ +
1700 { return _M_refcount._M_less(__rhs._M_refcount); }
│ │ │ +
1701
│ │ │ +
1702 template<typename _Tp1>
│ │ │ +
1703 bool
│ │ │ +
1704 owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const noexcept
│ │ │ +
1705 { return _M_refcount._M_less(__rhs._M_refcount); }
│ │ │ +
1706 /// @}
│ │ │ +
1707
│ │ │ +
1708 protected:
│ │ │ +
1709 // This constructor is non-standard, it is used by allocate_shared.
│ │ │ +
1710 template<typename _Alloc, typename... _Args>
│ │ │ +
1711 __shared_ptr(_Sp_alloc_shared_tag<_Alloc> __tag, _Args&&... __args)
│ │ │ +
1712 : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...)
│ │ │ +
1713 { _M_enable_shared_from_this_with(_M_ptr); }
│ │ │ +
1714
│ │ │ +
1715 template<typename _Tp1, _Lock_policy _Lp1, typename _Alloc,
│ │ │ +
1716 typename... _Args>
│ │ │ +
1717 friend __shared_ptr<_Tp1, _Lp1>
│ │ │ +
1718 __allocate_shared(const _Alloc& __a, _Args&&... __args);
│ │ │ +
1719
│ │ │ +
1720#if __cpp_lib_shared_ptr_arrays >= 201707L
│ │ │ +
1721 // This constructor is non-standard, it is used by allocate_shared<T[]>.
│ │ │ +
1722 template<typename _Alloc, typename _Init = const remove_extent_t<_Tp>*>
│ │ │ +
1723 __shared_ptr(const _Sp_counted_array_base<_Alloc>& __a,
│ │ │ +
1724 _Init __init = nullptr)
│ │ │ +
1725 : _M_ptr(), _M_refcount(_M_ptr, __a, __init)
│ │ │ +
1726 { }
│ │ │ +
1727#endif
│ │ │ +
1728
│ │ │ +
1729 // This constructor is used by __weak_ptr::lock() and
│ │ │ +
1730 // shared_ptr::shared_ptr(const weak_ptr&, std::nothrow_t).
│ │ │ +
1731 __shared_ptr(const __weak_ptr<_Tp, _Lp>& __r, std::nothrow_t) noexcept
│ │ │ +
1732 : _M_refcount(__r._M_refcount, std::nothrow)
│ │ │ +
1733 {
│ │ │ +
1734 _M_ptr = _M_refcount._M_get_use_count() ? __r._M_ptr : nullptr;
│ │ │ +
1735 }
│ │ │ +
1736
│ │ │ +
1737 friend class __weak_ptr<_Tp, _Lp>;
│ │ │ +
1738
│ │ │ +
1739 private:
│ │ │ +
1740
│ │ │ +
1741 template<typename _Yp>
│ │ │ +
1742 using __esft_base_t = decltype(__enable_shared_from_this_base(
│ │ │ +
1743 std::declval<const __shared_count<_Lp>&>(),
│ │ │ + │ │ │ +
1745
│ │ │ +
1746 // Detect an accessible and unambiguous enable_shared_from_this base.
│ │ │ +
1747 template<typename _Yp, typename = void>
│ │ │ +
1748 struct __has_esft_base
│ │ │ +
1749 : false_type { };
│ │ │
1750
│ │ │ -
1751 // Called by the second assign_dispatch above
│ │ │ -
1752 template<typename _ForwardIterator>
│ │ │ -
1753 _GLIBCXX20_CONSTEXPR
│ │ │ -
1754 void
│ │ │ -
1755 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
│ │ │ - │ │ │ -
1757
│ │ │ -
1758 // Called by assign(n,t), and the range assign when it turns out
│ │ │ -
1759 // to be the same thing.
│ │ │ -
1760 _GLIBCXX20_CONSTEXPR
│ │ │ -
1761 void
│ │ │ -
1762 _M_fill_assign(size_type __n, const value_type& __val);
│ │ │ -
1763
│ │ │ -
1764 // Internal insert functions follow.
│ │ │ -
1765
│ │ │ -
1766 // Called by the range insert to implement [23.1.1]/9
│ │ │ +
1751 template<typename _Yp>
│ │ │ +
1752 struct __has_esft_base<_Yp, __void_t<__esft_base_t<_Yp>>>
│ │ │ +
1753 : __not_<is_array<_Tp>> { }; // No enable shared_from_this for arrays
│ │ │ +
1754
│ │ │ +
1755 template<typename _Yp, typename _Yp2 = typename remove_cv<_Yp>::type>
│ │ │ +
1756 typename enable_if<__has_esft_base<_Yp2>::value>::type
│ │ │ +
1757 _M_enable_shared_from_this_with(_Yp* __p) noexcept
│ │ │ +
1758 {
│ │ │ +
1759 if (auto __base = __enable_shared_from_this_base(_M_refcount, __p))
│ │ │ +
1760 __base->_M_weak_assign(const_cast<_Yp2*>(__p), _M_refcount);
│ │ │ +
1761 }
│ │ │ +
1762
│ │ │ +
1763 template<typename _Yp, typename _Yp2 = typename remove_cv<_Yp>::type>
│ │ │ +
1764 typename enable_if<!__has_esft_base<_Yp2>::value>::type
│ │ │ +
1765 _M_enable_shared_from_this_with(_Yp*) noexcept
│ │ │ +
1766 { }
│ │ │
1767
│ │ │ -
1768 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
1769 // 438. Ambiguity in the "do the right thing" clause
│ │ │ -
1770 template<typename _Integer>
│ │ │ -
1771 _GLIBCXX20_CONSTEXPR
│ │ │ -
1772 void
│ │ │ -
1773 _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
│ │ │ -
1774 __true_type)
│ │ │ -
1775 { _M_fill_insert(__pos, __n, __val); }
│ │ │ -
1776
│ │ │ -
1777 // Called by the range insert to implement [23.1.1]/9
│ │ │ -
1778 template<typename _InputIterator>
│ │ │ -
1779 _GLIBCXX20_CONSTEXPR
│ │ │ -
1780 void
│ │ │ -
1781 _M_insert_dispatch(iterator __pos, _InputIterator __first,
│ │ │ -
1782 _InputIterator __last, __false_type)
│ │ │ -
1783 {
│ │ │ -
1784 _M_range_insert(__pos, __first, __last,
│ │ │ -
1785 std::__iterator_category(__first));
│ │ │ -
1786 }
│ │ │ -
1787
│ │ │ -
1788 // Called by the second insert_dispatch above
│ │ │ -
1789 template<typename _InputIterator>
│ │ │ -
1790 _GLIBCXX20_CONSTEXPR
│ │ │ -
1791 void
│ │ │ -
1792 _M_range_insert(iterator __pos, _InputIterator __first,
│ │ │ -
1793 _InputIterator __last, std::input_iterator_tag);
│ │ │ -
1794
│ │ │ -
1795 // Called by the second insert_dispatch above
│ │ │ -
1796 template<typename _ForwardIterator>
│ │ │ -
1797 _GLIBCXX20_CONSTEXPR
│ │ │ -
1798 void
│ │ │ -
1799 _M_range_insert(iterator __pos, _ForwardIterator __first,
│ │ │ -
1800 _ForwardIterator __last, std::forward_iterator_tag);
│ │ │ +
1768 void*
│ │ │ +
1769 _M_get_deleter(const std::type_info& __ti) const noexcept
│ │ │ +
1770 { return _M_refcount._M_get_deleter(__ti); }
│ │ │ +
1771
│ │ │ +
1772 template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
│ │ │ +
1773 template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
│ │ │ +
1774
│ │ │ +
1775 template<typename _Del, typename _Tp1, _Lock_policy _Lp1>
│ │ │ +
1776 friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept;
│ │ │ +
1777
│ │ │ +
1778 template<typename _Del, typename _Tp1>
│ │ │ +
1779 friend _Del* get_deleter(const shared_ptr<_Tp1>&) noexcept;
│ │ │ +
1780
│ │ │ +
1781#if __cplusplus >= 202002L
│ │ │ +
1782 friend _Sp_atomic<shared_ptr<_Tp>>;
│ │ │ +
1783#endif
│ │ │ +
1784
│ │ │ +
1785 element_type* _M_ptr; // Contained pointer.
│ │ │ +
1786 __shared_count<_Lp> _M_refcount; // Reference counter.
│ │ │ +
1787 };
│ │ │ +
1788
│ │ │ +
1789
│ │ │ +
1790 // 20.7.2.2.7 shared_ptr comparisons
│ │ │ +
1791 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1792 inline bool
│ │ │ +
1793 operator==(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1794 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1795 { return __a.get() == __b.get(); }
│ │ │ +
1796
│ │ │ +
1797 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1798 inline bool
│ │ │ +
1799 operator==(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1800 { return !__a; }
│ │ │
1801
│ │ │ -
1802 // Called by insert(p,n,x), and the range insert when it turns out to be
│ │ │ -
1803 // the same thing.
│ │ │ -
1804 _GLIBCXX20_CONSTEXPR
│ │ │ -
1805 void
│ │ │ -
1806 _M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
│ │ │ -
1807
│ │ │ -
1808#if __cplusplus >= 201103L
│ │ │ -
1809 // Called by resize(n).
│ │ │ -
1810 _GLIBCXX20_CONSTEXPR
│ │ │ -
1811 void
│ │ │ -
1812 _M_default_append(size_type __n);
│ │ │ -
1813
│ │ │ -
1814 _GLIBCXX20_CONSTEXPR
│ │ │ -
1815 bool
│ │ │ -
1816 _M_shrink_to_fit();
│ │ │ -
1817#endif
│ │ │ -
1818
│ │ │ -
1819#if __cplusplus < 201103L
│ │ │ -
1820 // Called by insert(p,x)
│ │ │ -
1821 void
│ │ │ -
1822 _M_insert_aux(iterator __position, const value_type& __x);
│ │ │ -
1823
│ │ │ -
1824 void
│ │ │ -
1825 _M_realloc_insert(iterator __position, const value_type& __x);
│ │ │ -
1826#else
│ │ │ -
1827 // A value_type object constructed with _Alloc_traits::construct()
│ │ │ -
1828 // and destroyed with _Alloc_traits::destroy().
│ │ │ -
1829 struct _Temporary_value
│ │ │ -
1830 {
│ │ │ -
1831 template<typename... _Args>
│ │ │ -
1832 _GLIBCXX20_CONSTEXPR explicit
│ │ │ -
1833 _Temporary_value(vector* __vec, _Args&&... __args) : _M_this(__vec)
│ │ │ -
1834 {
│ │ │ -
1835 _Alloc_traits::construct(_M_this->_M_impl, _M_ptr(),
│ │ │ -
1836 std::forward<_Args>(__args)...);
│ │ │ -
1837 }
│ │ │ -
1838
│ │ │ -
1839 _GLIBCXX20_CONSTEXPR
│ │ │ -
1840 ~_Temporary_value()
│ │ │ -
1841 { _Alloc_traits::destroy(_M_this->_M_impl, _M_ptr()); }
│ │ │ -
1842
│ │ │ -
1843 _GLIBCXX20_CONSTEXPR value_type&
│ │ │ -
1844 _M_val() noexcept { return _M_storage._M_val; }
│ │ │ -
1845
│ │ │ -
1846 private:
│ │ │ -
1847 _GLIBCXX20_CONSTEXPR _Tp*
│ │ │ -
1848 _M_ptr() noexcept { return std::__addressof(_M_storage._M_val); }
│ │ │ -
1849
│ │ │ -
1850 union _Storage
│ │ │ -
1851 {
│ │ │ -
1852 constexpr _Storage() : _M_byte() { }
│ │ │ -
1853 _GLIBCXX20_CONSTEXPR ~_Storage() { }
│ │ │ -
1854 _Storage& operator=(const _Storage&) = delete;
│ │ │ -
1855 unsigned char _M_byte;
│ │ │ -
1856 _Tp _M_val;
│ │ │ -
1857 };
│ │ │ -
1858
│ │ │ -
1859 vector* _M_this;
│ │ │ -
1860 _Storage _M_storage;
│ │ │ -
1861 };
│ │ │ -
1862
│ │ │ -
1863 // Called by insert(p,x) and other functions when insertion needs to
│ │ │ -
1864 // reallocate or move existing elements. _Arg is either _Tp& or _Tp.
│ │ │ -
1865 template<typename _Arg>
│ │ │ -
1866 _GLIBCXX20_CONSTEXPR
│ │ │ -
1867 void
│ │ │ -
1868 _M_insert_aux(iterator __position, _Arg&& __arg);
│ │ │ -
1869
│ │ │ -
1870 template<typename... _Args>
│ │ │ -
1871 _GLIBCXX20_CONSTEXPR
│ │ │ -
1872 void
│ │ │ -
1873 _M_realloc_insert(iterator __position, _Args&&... __args);
│ │ │ -
1874
│ │ │ -
1875 // Either move-construct at the end, or forward to _M_insert_aux.
│ │ │ -
1876 _GLIBCXX20_CONSTEXPR
│ │ │ -
1877 iterator
│ │ │ -
1878 _M_insert_rval(const_iterator __position, value_type&& __v);
│ │ │ -
1879
│ │ │ -
1880 // Try to emplace at the end, otherwise forward to _M_insert_aux.
│ │ │ -
1881 template<typename... _Args>
│ │ │ -
1882 _GLIBCXX20_CONSTEXPR
│ │ │ -
1883 iterator
│ │ │ -
1884 _M_emplace_aux(const_iterator __position, _Args&&... __args);
│ │ │ -
1885
│ │ │ -
1886 // Emplacing an rvalue of the correct type can use _M_insert_rval.
│ │ │ -
1887 _GLIBCXX20_CONSTEXPR
│ │ │ -
1888 iterator
│ │ │ -
1889 _M_emplace_aux(const_iterator __position, value_type&& __v)
│ │ │ -
1890 { return _M_insert_rval(__position, std::move(__v)); }
│ │ │ -
1891#endif
│ │ │ -
1892
│ │ │ -
1893 // Called by _M_fill_insert, _M_insert_aux etc.
│ │ │ -
1894 _GLIBCXX20_CONSTEXPR
│ │ │ -
1895 size_type
│ │ │ -
1896 _M_check_len(size_type __n, const char* __s) const
│ │ │ -
1897 {
│ │ │ -
1898 if (max_size() - size() < __n)
│ │ │ -
1899 __throw_length_error(__N(__s));
│ │ │ -
1900
│ │ │ -
1901 const size_type __len = size() + (std::max)(size(), __n);
│ │ │ -
1902 return (__len < size() || __len > max_size()) ? max_size() : __len;
│ │ │ -
1903 }
│ │ │ -
1904
│ │ │ -
1905 // Called by constructors to check initial size.
│ │ │ -
1906 static _GLIBCXX20_CONSTEXPR size_type
│ │ │ -
1907 _S_check_init_len(size_type __n, const allocator_type& __a)
│ │ │ -
1908 {
│ │ │ -
1909 if (__n > _S_max_size(_Tp_alloc_type(__a)))
│ │ │ -
1910 __throw_length_error(
│ │ │ -
1911 __N("cannot create std::vector larger than max_size()"));
│ │ │ -
1912 return __n;
│ │ │ -
1913 }
│ │ │ -
1914
│ │ │ -
1915 static _GLIBCXX20_CONSTEXPR size_type
│ │ │ -
1916 _S_max_size(const _Tp_alloc_type& __a) _GLIBCXX_NOEXCEPT
│ │ │ -
1917 {
│ │ │ -
1918 // std::distance(begin(), end()) cannot be greater than PTRDIFF_MAX,
│ │ │ -
1919 // and realistically we can't store more than PTRDIFF_MAX/sizeof(T)
│ │ │ -
1920 // (even if std::allocator_traits::max_size says we can).
│ │ │ -
1921 const size_t __diffmax
│ │ │ -
1922 = __gnu_cxx::__numeric_traits<ptrdiff_t>::__max / sizeof(_Tp);
│ │ │ -
1923 const size_t __allocmax = _Alloc_traits::max_size(__a);
│ │ │ -
1924 return (std::min)(__diffmax, __allocmax);
│ │ │ -
1925 }
│ │ │ -
1926
│ │ │ -
1927 // Internal erase functions follow.
│ │ │ -
1928
│ │ │ -
1929 // Called by erase(q1,q2), clear(), resize(), _M_fill_assign,
│ │ │ -
1930 // _M_assign_aux.
│ │ │ -
1931 _GLIBCXX20_CONSTEXPR
│ │ │ -
1932 void
│ │ │ -
1933 _M_erase_at_end(pointer __pos) _GLIBCXX_NOEXCEPT
│ │ │ -
1934 {
│ │ │ -
1935 if (size_type __n = this->_M_impl._M_finish - __pos)
│ │ │ -
1936 {
│ │ │ -
1937 std::_Destroy(__pos, this->_M_impl._M_finish,
│ │ │ -
1938 _M_get_Tp_allocator());
│ │ │ -
1939 this->_M_impl._M_finish = __pos;
│ │ │ -
1940 _GLIBCXX_ASAN_ANNOTATE_SHRINK(__n);
│ │ │ -
1941 }
│ │ │ -
1942 }
│ │ │ -
1943
│ │ │ -
1944 _GLIBCXX20_CONSTEXPR
│ │ │ -
1945 iterator
│ │ │ -
1946 _M_erase(iterator __position);
│ │ │ +
1802#ifdef __cpp_lib_three_way_comparison
│ │ │ +
1803 template<typename _Tp, typename _Up, _Lock_policy _Lp>
│ │ │ +
1804 inline strong_ordering
│ │ │ +
1805 operator<=>(const __shared_ptr<_Tp, _Lp>& __a,
│ │ │ +
1806 const __shared_ptr<_Up, _Lp>& __b) noexcept
│ │ │ +
1807 { return compare_three_way()(__a.get(), __b.get()); }
│ │ │ +
1808
│ │ │ +
1809 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1810 inline strong_ordering
│ │ │ +
1811 operator<=>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1812 {
│ │ │ +
1813 using pointer = typename __shared_ptr<_Tp, _Lp>::element_type*;
│ │ │ +
1814 return compare_three_way()(__a.get(), static_cast<pointer>(nullptr));
│ │ │ +
1815 }
│ │ │ +
1816#else
│ │ │ +
1817 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1818 inline bool
│ │ │ +
1819 operator==(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1820 { return !__a; }
│ │ │ +
1821
│ │ │ +
1822 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1823 inline bool
│ │ │ +
1824 operator!=(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1825 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1826 { return __a.get() != __b.get(); }
│ │ │ +
1827
│ │ │ +
1828 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1829 inline bool
│ │ │ +
1830 operator!=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1831 { return (bool)__a; }
│ │ │ +
1832
│ │ │ +
1833 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1834 inline bool
│ │ │ +
1835 operator!=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1836 { return (bool)__a; }
│ │ │ +
1837
│ │ │ +
1838 template<typename _Tp, typename _Up, _Lock_policy _Lp>
│ │ │ +
1839 inline bool
│ │ │ +
1840 operator<(const __shared_ptr<_Tp, _Lp>& __a,
│ │ │ +
1841 const __shared_ptr<_Up, _Lp>& __b) noexcept
│ │ │ +
1842 {
│ │ │ +
1843 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type;
│ │ │ +
1844 using _Up_elt = typename __shared_ptr<_Up, _Lp>::element_type;
│ │ │ +
1845 using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type;
│ │ │ +
1846 return less<_Vp>()(__a.get(), __b.get());
│ │ │ +
1847 }
│ │ │ +
1848
│ │ │ +
1849 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1850 inline bool
│ │ │ +
1851 operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1852 {
│ │ │ +
1853 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type;
│ │ │ +
1854 return less<_Tp_elt*>()(__a.get(), nullptr);
│ │ │ +
1855 }
│ │ │ +
1856
│ │ │ +
1857 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1858 inline bool
│ │ │ +
1859 operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1860 {
│ │ │ +
1861 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type;
│ │ │ +
1862 return less<_Tp_elt*>()(nullptr, __a.get());
│ │ │ +
1863 }
│ │ │ +
1864
│ │ │ +
1865 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1866 inline bool
│ │ │ +
1867 operator<=(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1868 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1869 { return !(__b < __a); }
│ │ │ +
1870
│ │ │ +
1871 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1872 inline bool
│ │ │ +
1873 operator<=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1874 { return !(nullptr < __a); }
│ │ │ +
1875
│ │ │ +
1876 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1877 inline bool
│ │ │ +
1878 operator<=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1879 { return !(__a < nullptr); }
│ │ │ +
1880
│ │ │ +
1881 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1882 inline bool
│ │ │ +
1883 operator>(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1884 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1885 { return (__b < __a); }
│ │ │ +
1886
│ │ │ +
1887 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1888 inline bool
│ │ │ +
1889 operator>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1890 { return nullptr < __a; }
│ │ │ +
1891
│ │ │ +
1892 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1893 inline bool
│ │ │ +
1894 operator>(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1895 { return __a < nullptr; }
│ │ │ +
1896
│ │ │ +
1897 template<typename _Tp1, typename _Tp2, _Lock_policy _Lp>
│ │ │ +
1898 inline bool
│ │ │ +
1899 operator>=(const __shared_ptr<_Tp1, _Lp>& __a,
│ │ │ +
1900 const __shared_ptr<_Tp2, _Lp>& __b) noexcept
│ │ │ +
1901 { return !(__a < __b); }
│ │ │ +
1902
│ │ │ +
1903 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1904 inline bool
│ │ │ +
1905 operator>=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept
│ │ │ +
1906 { return !(__a < nullptr); }
│ │ │ +
1907
│ │ │ +
1908 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1909 inline bool
│ │ │ +
1910 operator>=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept
│ │ │ +
1911 { return !(nullptr < __a); }
│ │ │ +
1912#endif // three-way comparison
│ │ │ +
1913
│ │ │ +
1914 // 20.7.2.2.8 shared_ptr specialized algorithms.
│ │ │ +
1915 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1916 inline void
│ │ │ +
1917 swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept
│ │ │ +
1918 { __a.swap(__b); }
│ │ │ +
1919
│ │ │ +
1920 // 20.7.2.2.9 shared_ptr casts
│ │ │ +
1921
│ │ │ +
1922 // The seemingly equivalent code:
│ │ │ +
1923 // shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get()))
│ │ │ +
1924 // will eventually result in undefined behaviour, attempting to
│ │ │ +
1925 // delete the same object twice.
│ │ │ +
1926 /// static_pointer_cast
│ │ │ +
1927 template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
│ │ │ +
1928 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ + │ │ │ +
1930 {
│ │ │ + │ │ │ +
1932 return _Sp(__r, static_cast<typename _Sp::element_type*>(__r.get()));
│ │ │ +
1933 }
│ │ │ +
│ │ │ +
1934
│ │ │ +
1935 // The seemingly equivalent code:
│ │ │ +
1936 // shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get()))
│ │ │ +
1937 // will eventually result in undefined behaviour, attempting to
│ │ │ +
1938 // delete the same object twice.
│ │ │ +
1939 /// const_pointer_cast
│ │ │ +
1940 template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
│ │ │ +
1941 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ + │ │ │ +
1943 {
│ │ │ + │ │ │ +
1945 return _Sp(__r, const_cast<typename _Sp::element_type*>(__r.get()));
│ │ │ +
1946 }
│ │ │ +
│ │ │
1947
│ │ │ -
1948 _GLIBCXX20_CONSTEXPR
│ │ │ -
1949 iterator
│ │ │ -
1950 _M_erase(iterator __first, iterator __last);
│ │ │ -
1951
│ │ │ -
1952#if __cplusplus >= 201103L
│ │ │ -
1953 private:
│ │ │ -
1954 // Constant-time move assignment when source object's memory can be
│ │ │ -
1955 // moved, either because the source's allocator will move too
│ │ │ -
1956 // or because the allocators are equal.
│ │ │ -
1957 _GLIBCXX20_CONSTEXPR
│ │ │ -
1958 void
│ │ │ -
1959 _M_move_assign(vector&& __x, true_type) noexcept
│ │ │ -
1960 {
│ │ │ -
1961 vector __tmp(get_allocator());
│ │ │ -
1962 this->_M_impl._M_swap_data(__x._M_impl);
│ │ │ -
1963 __tmp._M_impl._M_swap_data(__x._M_impl);
│ │ │ -
1964 std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator());
│ │ │ -
1965 }
│ │ │ -
1966
│ │ │ -
1967 // Do move assignment when it might not be possible to move source
│ │ │ -
1968 // object's memory, resulting in a linear-time operation.
│ │ │ -
1969 _GLIBCXX20_CONSTEXPR
│ │ │ -
1970 void
│ │ │ -
1971 _M_move_assign(vector&& __x, false_type)
│ │ │ -
1972 {
│ │ │ -
1973 if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator())
│ │ │ -
1974 _M_move_assign(std::move(__x), true_type());
│ │ │ -
1975 else
│ │ │ -
1976 {
│ │ │ -
1977 // The rvalue's allocator cannot be moved and is not equal,
│ │ │ -
1978 // so we need to individually move each element.
│ │ │ -
1979 this->_M_assign_aux(std::make_move_iterator(__x.begin()),
│ │ │ -
1980 std::make_move_iterator(__x.end()),
│ │ │ - │ │ │ -
1982 __x.clear();
│ │ │ -
1983 }
│ │ │ -
1984 }
│ │ │ -
1985#endif
│ │ │ +
1948 // The seemingly equivalent code:
│ │ │ +
1949 // shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get()))
│ │ │ +
1950 // will eventually result in undefined behaviour, attempting to
│ │ │ +
1951 // delete the same object twice.
│ │ │ +
1952 /// dynamic_pointer_cast
│ │ │ +
1953 template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
│ │ │ +
1954 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
│ │ │ + │ │ │ +
1956 {
│ │ │ + │ │ │ +
1958 if (auto* __p = dynamic_cast<typename _Sp::element_type*>(__r.get()))
│ │ │ +
1959 return _Sp(__r, __p);
│ │ │ +
1960 return _Sp();
│ │ │ +
1961 }
│ │ │ +
│ │ │ +
1962
│ │ │ +
1963#if __cplusplus > 201402L
│ │ │ +
1964 template<typename _Tp, typename _Tp1, _Lock_policy _Lp>
│ │ │ +
1965 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
1966 reinterpret_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
│ │ │ +
1967 {
│ │ │ +
1968 using _Sp = __shared_ptr<_Tp, _Lp>;
│ │ │ +
1969 return _Sp(__r, reinterpret_cast<typename _Sp::element_type*>(__r.get()));
│ │ │ +
1970 }
│ │ │ +
1971#endif
│ │ │ +
1972
│ │ │ +
1973 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
1974 class __weak_ptr
│ │ │ +
1975 {
│ │ │ +
1976 template<typename _Yp, typename _Res = void>
│ │ │ +
1977 using _Compatible = typename
│ │ │ +
1978 enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type;
│ │ │ +
1979
│ │ │ +
1980 // Constraint for assignment from shared_ptr and weak_ptr:
│ │ │ +
1981 template<typename _Yp>
│ │ │ +
1982 using _Assignable = _Compatible<_Yp, __weak_ptr&>;
│ │ │ +
1983
│ │ │ +
1984 public:
│ │ │ +
1985 using element_type = typename remove_extent<_Tp>::type;
│ │ │
1986
│ │ │ -
1987 template<typename _Up>
│ │ │ -
1988 _GLIBCXX20_CONSTEXPR
│ │ │ -
1989 _Up*
│ │ │ -
1990 _M_data_ptr(_Up* __ptr) const _GLIBCXX_NOEXCEPT
│ │ │ -
1991 { return __ptr; }
│ │ │ +
1987 constexpr __weak_ptr() noexcept
│ │ │ +
1988 : _M_ptr(nullptr), _M_refcount()
│ │ │ +
1989 { }
│ │ │ +
1990
│ │ │ +
1991 __weak_ptr(const __weak_ptr&) noexcept = default;
│ │ │
1992
│ │ │ -
1993#if __cplusplus >= 201103L
│ │ │ -
1994 template<typename _Ptr>
│ │ │ -
1995 _GLIBCXX20_CONSTEXPR
│ │ │ - │ │ │ -
1997 _M_data_ptr(_Ptr __ptr) const
│ │ │ -
1998 { return empty() ? nullptr : std::__to_address(__ptr); }
│ │ │ -
1999#else
│ │ │ -
2000 template<typename _Up>
│ │ │ -
2001 _Up*
│ │ │ -
2002 _M_data_ptr(_Up* __ptr) _GLIBCXX_NOEXCEPT
│ │ │ -
2003 { return __ptr; }
│ │ │ -
2004
│ │ │ -
2005 template<typename _Ptr>
│ │ │ -
2006 value_type*
│ │ │ -
2007 _M_data_ptr(_Ptr __ptr)
│ │ │ -
2008 { return empty() ? (value_type*)0 : __ptr.operator->(); }
│ │ │ -
2009
│ │ │ -
2010 template<typename _Ptr>
│ │ │ -
2011 const value_type*
│ │ │ -
2012 _M_data_ptr(_Ptr __ptr) const
│ │ │ -
2013 { return empty() ? (const value_type*)0 : __ptr.operator->(); }
│ │ │ -
2014#endif
│ │ │ -
2015 };
│ │ │ -
2016
│ │ │ -
2017#if __cpp_deduction_guides >= 201606
│ │ │ -
2018 template<typename _InputIterator, typename _ValT
│ │ │ -
2019 = typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
2020 typename _Allocator = allocator<_ValT>,
│ │ │ -
2021 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
2022 typename = _RequireAllocator<_Allocator>>
│ │ │ -
2023 vector(_InputIterator, _InputIterator, _Allocator = _Allocator())
│ │ │ -
2024 -> vector<_ValT, _Allocator>;
│ │ │ -
2025#endif
│ │ │ -
2026
│ │ │ -
2027 /**
│ │ │ -
2028 * @brief Vector equality comparison.
│ │ │ -
2029 * @param __x A %vector.
│ │ │ -
2030 * @param __y A %vector of the same type as @a __x.
│ │ │ -
2031 * @return True iff the size and elements of the vectors are equal.
│ │ │ -
2032 *
│ │ │ -
2033 * This is an equivalence relation. It is linear in the size of the
│ │ │ -
2034 * vectors. Vectors are considered equivalent if their sizes are equal,
│ │ │ -
2035 * and if corresponding elements compare equal.
│ │ │ -
2036 */
│ │ │ -
2037 template<typename _Tp, typename _Alloc>
│ │ │ -
2038 _GLIBCXX20_CONSTEXPR
│ │ │ -
2039 inline bool
│ │ │ -
│ │ │ -
2040 operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
│ │ │ -
2041 { return (__x.size() == __y.size()
│ │ │ -
2042 && std::equal(__x.begin(), __x.end(), __y.begin())); }
│ │ │ -
│ │ │ -
2043
│ │ │ -
2044#if __cpp_lib_three_way_comparison // >= C++20
│ │ │ -
2045 /**
│ │ │ -
2046 * @brief Vector ordering relation.
│ │ │ -
2047 * @param __x A `vector`.
│ │ │ -
2048 * @param __y A `vector` of the same type as `__x`.
│ │ │ -
2049 * @return A value indicating whether `__x` is less than, equal to,
│ │ │ -
2050 * greater than, or incomparable with `__y`.
│ │ │ -
2051 *
│ │ │ -
2052 * See `std::lexicographical_compare_three_way()` for how the determination
│ │ │ -
2053 * is made. This operator is used to synthesize relational operators like
│ │ │ -
2054 * `<` and `>=` etc.
│ │ │ -
2055 */
│ │ │ -
2056 template<typename _Tp, typename _Alloc>
│ │ │ -
2057 constexpr __detail::__synth3way_t<_Tp>
│ │ │ -
2058 operator<=>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
│ │ │ -
2059 {
│ │ │ -
2060 return std::lexicographical_compare_three_way(__x.begin(), __x.end(),
│ │ │ -
2061 __y.begin(), __y.end(),
│ │ │ -
2062 __detail::__synth3way);
│ │ │ -
2063 }
│ │ │ -
2064#else
│ │ │ -
2065 /**
│ │ │ -
2066 * @brief Vector ordering relation.
│ │ │ -
2067 * @param __x A %vector.
│ │ │ -
2068 * @param __y A %vector of the same type as @a __x.
│ │ │ -
2069 * @return True iff @a __x is lexicographically less than @a __y.
│ │ │ -
2070 *
│ │ │ -
2071 * This is a total ordering relation. It is linear in the size of the
│ │ │ -
2072 * vectors. The elements must be comparable with @c <.
│ │ │ -
2073 *
│ │ │ -
2074 * See std::lexicographical_compare() for how the determination is made.
│ │ │ -
2075 */
│ │ │ -
2076 template<typename _Tp, typename _Alloc>
│ │ │ -
│ │ │ -
2077 inline bool
│ │ │ -
2078 operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
│ │ │ -
2079 { return std::lexicographical_compare(__x.begin(), __x.end(),
│ │ │ -
2080 __y.begin(), __y.end()); }
│ │ │ -
│ │ │ -
2081
│ │ │ -
2082 /// Based on operator==
│ │ │ -
2083 template<typename _Tp, typename _Alloc>
│ │ │ -
2084 inline bool
│ │ │ -
│ │ │ -
2085 operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
│ │ │ -
2086 { return !(__x == __y); }
│ │ │ -
│ │ │ -
2087
│ │ │ -
2088 /// Based on operator<
│ │ │ -
2089 template<typename _Tp, typename _Alloc>
│ │ │ -
2090 inline bool
│ │ │ -
│ │ │ -
2091 operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
│ │ │ -
2092 { return __y < __x; }
│ │ │ -
│ │ │ -
2093
│ │ │ -
2094 /// Based on operator<
│ │ │ -
2095 template<typename _Tp, typename _Alloc>
│ │ │ -
│ │ │ -
2096 inline bool
│ │ │ -
2097 operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
│ │ │ -
2098 { return !(__y < __x); }
│ │ │ -
│ │ │ -
2099
│ │ │ -
2100 /// Based on operator<
│ │ │ -
2101 template<typename _Tp, typename _Alloc>
│ │ │ -
2102 inline bool
│ │ │ -
│ │ │ -
2103 operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
│ │ │ -
2104 { return !(__x < __y); }
│ │ │ -
│ │ │ -
2105#endif // three-way comparison
│ │ │ -
2106
│ │ │ -
2107 /// See std::vector::swap().
│ │ │ -
2108 template<typename _Tp, typename _Alloc>
│ │ │ -
2109 _GLIBCXX20_CONSTEXPR
│ │ │ -
2110 inline void
│ │ │ -
│ │ │ - │ │ │ -
2112 _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y)))
│ │ │ -
2113 { __x.swap(__y); }
│ │ │ -
│ │ │ -
2114
│ │ │ -
2115_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ -
2116
│ │ │ -
2117#if __cplusplus >= 201703L
│ │ │ -
2118 namespace __detail::__variant
│ │ │ -
2119 {
│ │ │ -
2120 template<typename> struct _Never_valueless_alt; // see <variant>
│ │ │ -
2121
│ │ │ -
2122 // Provide the strong exception-safety guarantee when emplacing a
│ │ │ -
2123 // vector into a variant, but only if move assignment cannot throw.
│ │ │ -
2124 template<typename _Tp, typename _Alloc>
│ │ │ -
2125 struct _Never_valueless_alt<_GLIBCXX_STD_C::vector<_Tp, _Alloc>>
│ │ │ -
2126 : std::is_nothrow_move_assignable<_GLIBCXX_STD_C::vector<_Tp, _Alloc>>
│ │ │ -
2127 { };
│ │ │ -
2128 } // namespace __detail::__variant
│ │ │ -
2129#endif // C++17
│ │ │ -
2130
│ │ │ -
2131_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
2132} // namespace std
│ │ │ -
2133
│ │ │ -
2134#endif /* _STL_VECTOR_H */
│ │ │ -
│ │ │ -
│ │ │ +
1993 ~__weak_ptr() = default;
│ │ │ +
1994
│ │ │ +
1995 // The "obvious" converting constructor implementation:
│ │ │ +
1996 //
│ │ │ +
1997 // template<typename _Tp1>
│ │ │ +
1998 // __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r)
│ │ │ +
1999 // : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws
│ │ │ +
2000 // { }
│ │ │ +
2001 //
│ │ │ +
2002 // has a serious problem.
│ │ │ +
2003 //
│ │ │ +
2004 // __r._M_ptr may already have been invalidated. The _M_ptr(__r._M_ptr)
│ │ │ +
2005 // conversion may require access to *__r._M_ptr (virtual inheritance).
│ │ │ +
2006 //
│ │ │ +
2007 // It is not possible to avoid spurious access violations since
│ │ │ +
2008 // in multithreaded programs __r._M_ptr may be invalidated at any point.
│ │ │ +
2009 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
2010 __weak_ptr(const __weak_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
2011 : _M_refcount(__r._M_refcount)
│ │ │ +
2012 { _M_ptr = __r.lock().get(); }
│ │ │ +
2013
│ │ │ +
2014 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
2015 __weak_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
2016 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount)
│ │ │ +
2017 { }
│ │ │ +
2018
│ │ │ +
2019 __weak_ptr(__weak_ptr&& __r) noexcept
│ │ │ +
2020 : _M_ptr(__r._M_ptr), _M_refcount(std::move(__r._M_refcount))
│ │ │ +
2021 { __r._M_ptr = nullptr; }
│ │ │ +
2022
│ │ │ +
2023 template<typename _Yp, typename = _Compatible<_Yp>>
│ │ │ +
2024 __weak_ptr(__weak_ptr<_Yp, _Lp>&& __r) noexcept
│ │ │ +
2025 : _M_ptr(__r.lock().get()), _M_refcount(std::move(__r._M_refcount))
│ │ │ +
2026 { __r._M_ptr = nullptr; }
│ │ │ +
2027
│ │ │ +
2028 __weak_ptr&
│ │ │ +
2029 operator=(const __weak_ptr& __r) noexcept = default;
│ │ │ +
2030
│ │ │ +
2031 template<typename _Yp>
│ │ │ +
2032 _Assignable<_Yp>
│ │ │ +
2033 operator=(const __weak_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
2034 {
│ │ │ +
2035 _M_ptr = __r.lock().get();
│ │ │ +
2036 _M_refcount = __r._M_refcount;
│ │ │ +
2037 return *this;
│ │ │ +
2038 }
│ │ │ +
2039
│ │ │ +
2040 template<typename _Yp>
│ │ │ +
2041 _Assignable<_Yp>
│ │ │ +
2042 operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept
│ │ │ +
2043 {
│ │ │ +
2044 _M_ptr = __r._M_ptr;
│ │ │ +
2045 _M_refcount = __r._M_refcount;
│ │ │ +
2046 return *this;
│ │ │ +
2047 }
│ │ │ +
2048
│ │ │ +
2049 __weak_ptr&
│ │ │ +
2050 operator=(__weak_ptr&& __r) noexcept
│ │ │ +
2051 {
│ │ │ +
2052 __weak_ptr(std::move(__r)).swap(*this);
│ │ │ +
2053 return *this;
│ │ │ +
2054 }
│ │ │ +
2055
│ │ │ +
2056 template<typename _Yp>
│ │ │ +
2057 _Assignable<_Yp>
│ │ │ +
2058 operator=(__weak_ptr<_Yp, _Lp>&& __r) noexcept
│ │ │ +
2059 {
│ │ │ +
2060 _M_ptr = __r.lock().get();
│ │ │ +
2061 _M_refcount = std::move(__r._M_refcount);
│ │ │ +
2062 __r._M_ptr = nullptr;
│ │ │ +
2063 return *this;
│ │ │ +
2064 }
│ │ │ +
2065
│ │ │ +
2066 __shared_ptr<_Tp, _Lp>
│ │ │ +
2067 lock() const noexcept
│ │ │ +
2068 { return __shared_ptr<_Tp, _Lp>(*this, std::nothrow); }
│ │ │ +
2069
│ │ │ +
2070 long
│ │ │ +
2071 use_count() const noexcept
│ │ │ +
2072 { return _M_refcount._M_get_use_count(); }
│ │ │ +
2073
│ │ │ +
2074 bool
│ │ │ +
2075 expired() const noexcept
│ │ │ +
2076 { return _M_refcount._M_get_use_count() == 0; }
│ │ │ +
2077
│ │ │ +
2078 template<typename _Tp1>
│ │ │ +
2079 bool
│ │ │ +
2080 owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const noexcept
│ │ │ +
2081 { return _M_refcount._M_less(__rhs._M_refcount); }
│ │ │ +
2082
│ │ │ +
2083 template<typename _Tp1>
│ │ │ +
2084 bool
│ │ │ +
2085 owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const noexcept
│ │ │ +
2086 { return _M_refcount._M_less(__rhs._M_refcount); }
│ │ │ +
2087
│ │ │ +
2088 void
│ │ │ +
2089 reset() noexcept
│ │ │ +
2090 { __weak_ptr().swap(*this); }
│ │ │ +
2091
│ │ │ +
2092 void
│ │ │ +
2093 swap(__weak_ptr& __s) noexcept
│ │ │ +
2094 {
│ │ │ +
2095 std::swap(_M_ptr, __s._M_ptr);
│ │ │ +
2096 _M_refcount._M_swap(__s._M_refcount);
│ │ │ +
2097 }
│ │ │ +
2098
│ │ │ +
2099 private:
│ │ │ +
2100 // Used by __enable_shared_from_this.
│ │ │ +
2101 void
│ │ │ +
2102 _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount) noexcept
│ │ │ +
2103 {
│ │ │ +
2104 if (use_count() == 0)
│ │ │ +
2105 {
│ │ │ +
2106 _M_ptr = __ptr;
│ │ │ +
2107 _M_refcount = __refcount;
│ │ │ +
2108 }
│ │ │ +
2109 }
│ │ │ +
2110
│ │ │ +
2111 template<typename _Tp1, _Lock_policy _Lp1> friend class __shared_ptr;
│ │ │ +
2112 template<typename _Tp1, _Lock_policy _Lp1> friend class __weak_ptr;
│ │ │ +
2113 friend class __enable_shared_from_this<_Tp, _Lp>;
│ │ │ +
2114 friend class enable_shared_from_this<_Tp>;
│ │ │ +
2115#if __cplusplus >= 202002L
│ │ │ +
2116 friend _Sp_atomic<weak_ptr<_Tp>>;
│ │ │ +
2117#endif
│ │ │ +
2118
│ │ │ +
2119 element_type* _M_ptr; // Contained pointer.
│ │ │ +
2120 __weak_count<_Lp> _M_refcount; // Reference counter.
│ │ │ +
2121 };
│ │ │ +
2122
│ │ │ +
2123 // 20.7.2.3.6 weak_ptr specialized algorithms.
│ │ │ +
2124 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
2125 inline void
│ │ │ +
2126 swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept
│ │ │ +
2127 { __a.swap(__b); }
│ │ │ +
2128
│ │ │ +
2129#pragma GCC diagnostic push
│ │ │ +
2130#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ +
2131 template<typename _Tp, typename _Tp1>
│ │ │ +
2132 struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool>
│ │ │ +
2133 {
│ │ │ +
2134 bool
│ │ │ +
2135 operator()(const _Tp& __lhs, const _Tp& __rhs) const noexcept
│ │ │ +
2136 { return __lhs.owner_before(__rhs); }
│ │ │ +
2137
│ │ │ +
2138 bool
│ │ │ +
2139 operator()(const _Tp& __lhs, const _Tp1& __rhs) const noexcept
│ │ │ +
2140 { return __lhs.owner_before(__rhs); }
│ │ │ +
2141
│ │ │ +
2142 bool
│ │ │ +
2143 operator()(const _Tp1& __lhs, const _Tp& __rhs) const noexcept
│ │ │ +
2144 { return __lhs.owner_before(__rhs); }
│ │ │ +
2145 };
│ │ │ +
2146#pragma GCC diagnostic pop
│ │ │ +
2147
│ │ │ +
2148 template<>
│ │ │ +
2149 struct _Sp_owner_less<void, void>
│ │ │ +
2150 {
│ │ │ +
2151 template<typename _Tp, typename _Up>
│ │ │ +
2152 auto
│ │ │ +
2153 operator()(const _Tp& __lhs, const _Up& __rhs) const noexcept
│ │ │ +
2154 -> decltype(__lhs.owner_before(__rhs))
│ │ │ +
2155 { return __lhs.owner_before(__rhs); }
│ │ │ +
2156
│ │ │ +
2157 using is_transparent = void;
│ │ │ +
2158 };
│ │ │ +
2159
│ │ │ +
2160 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
2161 struct owner_less<__shared_ptr<_Tp, _Lp>>
│ │ │ +
2162 : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>>
│ │ │ +
2163 { };
│ │ │ +
2164
│ │ │ +
2165 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
2166 struct owner_less<__weak_ptr<_Tp, _Lp>>
│ │ │ +
2167 : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>>
│ │ │ +
2168 { };
│ │ │ +
2169
│ │ │ +
2170
│ │ │ +
2171 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
2172 class __enable_shared_from_this
│ │ │ +
2173 {
│ │ │ +
2174 protected:
│ │ │ +
2175 constexpr __enable_shared_from_this() noexcept { }
│ │ │ +
2176
│ │ │ +
2177 __enable_shared_from_this(const __enable_shared_from_this&) noexcept { }
│ │ │ +
2178
│ │ │ +
2179 __enable_shared_from_this&
│ │ │ +
2180 operator=(const __enable_shared_from_this&) noexcept
│ │ │ +
2181 { return *this; }
│ │ │ +
2182
│ │ │ +
2183 ~__enable_shared_from_this() { }
│ │ │ +
2184
│ │ │ +
2185 public:
│ │ │ +
2186 __shared_ptr<_Tp, _Lp>
│ │ │ +
2187 shared_from_this()
│ │ │ +
2188 { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); }
│ │ │ +
2189
│ │ │ +
2190 __shared_ptr<const _Tp, _Lp>
│ │ │ +
2191 shared_from_this() const
│ │ │ +
2192 { return __shared_ptr<const _Tp, _Lp>(this->_M_weak_this); }
│ │ │ +
2193
│ │ │ +
2194#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ +
2195 __weak_ptr<_Tp, _Lp>
│ │ │ +
2196 weak_from_this() noexcept
│ │ │ +
2197 { return this->_M_weak_this; }
│ │ │ +
2198
│ │ │ +
2199 __weak_ptr<const _Tp, _Lp>
│ │ │ +
2200 weak_from_this() const noexcept
│ │ │ +
2201 { return this->_M_weak_this; }
│ │ │ +
2202#endif
│ │ │ +
2203
│ │ │ +
2204 private:
│ │ │ +
2205 template<typename _Tp1>
│ │ │ +
2206 void
│ │ │ +
2207 _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept
│ │ │ +
2208 { _M_weak_this._M_assign(__p, __n); }
│ │ │ +
2209
│ │ │ +
2210 friend const __enable_shared_from_this*
│ │ │ +
2211 __enable_shared_from_this_base(const __shared_count<_Lp>&,
│ │ │ +
2212 const __enable_shared_from_this* __p)
│ │ │ +
2213 { return __p; }
│ │ │ +
2214
│ │ │ +
2215 template<typename, _Lock_policy>
│ │ │ +
2216 friend class __shared_ptr;
│ │ │ +
2217
│ │ │ +
2218 mutable __weak_ptr<_Tp, _Lp> _M_weak_this;
│ │ │ +
2219 };
│ │ │ +
2220
│ │ │ +
2221 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy,
│ │ │ +
2222 typename _Alloc, typename... _Args>
│ │ │ +
2223 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
2224 __allocate_shared(const _Alloc& __a, _Args&&... __args)
│ │ │ +
2225 {
│ │ │ +
2226 static_assert(!is_array<_Tp>::value, "make_shared<T[]> not supported");
│ │ │ +
2227
│ │ │ +
2228 return __shared_ptr<_Tp, _Lp>(_Sp_alloc_shared_tag<_Alloc>{__a},
│ │ │ +
2229 std::forward<_Args>(__args)...);
│ │ │ +
2230 }
│ │ │ +
2231
│ │ │ +
2232 template<typename _Tp, _Lock_policy _Lp = __default_lock_policy,
│ │ │ +
2233 typename... _Args>
│ │ │ +
2234 inline __shared_ptr<_Tp, _Lp>
│ │ │ +
2235 __make_shared(_Args&&... __args)
│ │ │ +
2236 {
│ │ │ +
2237 typedef typename std::remove_const<_Tp>::type _Tp_nc;
│ │ │ + │ │ │ +
2239 std::forward<_Args>(__args)...);
│ │ │ +
2240 }
│ │ │ +
2241
│ │ │ +
2242 /// std::hash specialization for __shared_ptr.
│ │ │ +
2243 template<typename _Tp, _Lock_policy _Lp>
│ │ │ +
│ │ │ +
2244 struct hash<__shared_ptr<_Tp, _Lp>>
│ │ │ +
2245 : public __hash_base<size_t, __shared_ptr<_Tp, _Lp>>
│ │ │ +
2246 {
│ │ │ +
2247 size_t
│ │ │ +
2248 operator()(const __shared_ptr<_Tp, _Lp>& __s) const noexcept
│ │ │ +
2249 {
│ │ │ + │ │ │ +
2251 __s.get());
│ │ │ +
2252 }
│ │ │ +
2253 };
│ │ │ +
│ │ │ +
2254
│ │ │ +
2255_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
2256} // namespace
│ │ │ +
2257
│ │ │ +
2258#endif // _SHARED_PTR_BASE_H
│ │ │ │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
constexpr complex< _Tp > operator*(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x times y.
Definition complex:395
│ │ │ +
_ForwardIterator uninitialized_default_construct_n(_ForwardIterator __first, _Size __count)
Default-initializes objects in the range [first,first+count).
│ │ │ +
void * align(size_t __align, size_t __size, void *&__ptr, size_t &__space) noexcept
Fit aligned storage in buffer.
Definition align.h:62
│ │ │ +
constexpr _Tp * to_address(_Tp *__ptr) noexcept
Obtain address referenced by a pointer to an object.
Definition ptr_traits.h:250
│ │ │
integral_constant< bool, true > true_type
The type used as a compile-time boolean with true value.
Definition type_traits:82
│ │ │
integral_constant< bool, false > false_type
The type used as a compile-time boolean with false value.
Definition type_traits:85
│ │ │ -
constexpr bool is_constant_evaluated() noexcept
Returns true only when called during constant evaluation.
Definition type_traits:3653
│ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:97
│ │ │ -
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:51
│ │ │ -
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 &)
│ │ │ +
auto declval() noexcept -> decltype(__declval< _Tp >(0))
Definition type_traits:2386
│ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:97
│ │ │ +
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ +
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:51
│ │ │ +
constexpr _Tp && forward(typename std::remove_reference< _Tp >::type &__t) noexcept
Forward an lvalue.
Definition move.h:70
│ │ │ +
void lock(_L1 &__l1, _L2 &__l2, _L3 &... __l3)
Generic lock.
Definition mutex:693
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
constexpr iterator_traits< _InputIterator >::difference_type distance(_InputIterator __first, _InputIterator __last)
A generalization of pointer arithmetic.
│ │ │ -
constexpr void _Destroy(_ForwardIterator __first, _ForwardIterator __last)
│ │ │ -
integral_constant
Definition type_traits:63
│ │ │ - │ │ │ -
is_nothrow_default_constructible
Definition type_traits:1124
│ │ │ -
is_nothrow_move_assignable
Definition type_traits:1210
│ │ │ -
typename __detected_or_t< is_empty< _Alloc >, __equal, _Alloc >::type is_always_equal
Whether all instances of the allocator type compare equal.
│ │ │ -
The standard allocator, as per C++03 [20.4.1].
Definition allocator.h:131
│ │ │ - │ │ │ -
Marking input iterators.
│ │ │ -
Forward iterators support a superset of input iterator operations.
│ │ │ -
Random-access iterators support a superset of bidirectional iterator operations.
│ │ │ -
Common iterator class.
│ │ │ -
See bits/stl_deque.h's _Deque_base for an explanation.
Definition stl_vector.h:86
│ │ │ -
A standard container which offers fixed time access to individual elements in any order.
Definition stl_vector.h:429
│ │ │ -
constexpr iterator insert(const_iterator __position, const value_type &__x)
Inserts given value into vector before specified iterator.
Definition vector.tcc:135
│ │ │ -
constexpr void push_back(const value_type &__x)
Add data to the end of the vector.
│ │ │ -
constexpr void resize(size_type __new_size, const value_type &__x)
Resizes the vector to the specified number of elements.
│ │ │ -
constexpr vector & operator=(initializer_list< value_type > __l)
Vector list assignment operator.
Definition stl_vector.h:788
│ │ │ -
constexpr reverse_iterator rbegin() noexcept
Definition stl_vector.h:913
│ │ │ -
constexpr iterator end() noexcept
Definition stl_vector.h:893
│ │ │ -
constexpr vector(const vector &__x)
Vector copy constructor.
Definition stl_vector.h:601
│ │ │ -
vector()=default
Creates a vector with no elements.
│ │ │ -
constexpr iterator emplace(const_iterator __position, _Args &&... __args)
Inserts an object in vector before specified iterator.
│ │ │ -
constexpr iterator insert(const_iterator __position, value_type &&__x)
Inserts given rvalue into vector before specified iterator.
│ │ │ -
constexpr const_reverse_iterator rend() const noexcept
Definition stl_vector.h:943
│ │ │ -
constexpr iterator begin() noexcept
Definition stl_vector.h:873
│ │ │ -
constexpr size_type capacity() const noexcept
│ │ │ -
constexpr iterator insert(const_iterator __position, initializer_list< value_type > __l)
Inserts an initializer_list into the vector.
│ │ │ -
constexpr ~vector() noexcept
Definition stl_vector.h:733
│ │ │ -
constexpr const_iterator begin() const noexcept
Definition stl_vector.h:883
│ │ │ -
constexpr void assign(_InputIterator __first, _InputIterator __last)
Assigns a range to a vector.
Definition stl_vector.h:828
│ │ │ -
constexpr void assign(size_type __n, const value_type &__val)
Assigns a given value to a vector.
Definition stl_vector.h:808
│ │ │ -
constexpr iterator erase(const_iterator __first, const_iterator __last)
Remove a range of elements.
│ │ │ -
constexpr void swap(vector &__x) noexcept
Swaps data with another vector.
│ │ │ -
constexpr vector(vector &&__rv, const __type_identity_t< 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:659
│ │ │ -
constexpr _Tp * data() noexcept
│ │ │ -
constexpr vector(size_type __n, const allocator_type &__a=allocator_type())
Creates a vector with default constructed elements.
Definition stl_vector.h:556
│ │ │ -
constexpr const_reference front() const noexcept
│ │ │ -
constexpr vector & operator=(const vector &__x)
Vector assignment operator.
│ │ │ -
constexpr void pop_back() noexcept
Removes last element.
│ │ │ -
constexpr vector & operator=(vector &&__x) noexcept(_Alloc_traits::_S_nothrow_move())
Vector move assignment operator.
Definition stl_vector.h:766
│ │ │ -
constexpr const_reference back() const noexcept
│ │ │ -
constexpr void reserve(size_type __n)
Attempt to preallocate enough memory for specified number of elements.
Definition vector.tcc:68
│ │ │ -
constexpr reference at(size_type __n)
Provides access to the data contained in the vector.
│ │ │ -
constexpr void resize(size_type __new_size)
Resizes the vector to the specified number of elements.
│ │ │ -
constexpr void _M_range_check(size_type __n) const
Safety check used only from at().
│ │ │ -
constexpr reference front() noexcept
│ │ │ -
constexpr iterator insert(const_iterator __position, size_type __n, const value_type &__x)
Inserts a number of copies of given data into the vector.
│ │ │ -
constexpr const_reference operator[](size_type __n) const noexcept
Subscript access to the data contained in the vector.
│ │ │ -
constexpr vector(const allocator_type &__a) noexcept
Creates a vector with no elements.
Definition stl_vector.h:542
│ │ │ -
constexpr iterator erase(const_iterator __position)
Remove element at given position.
│ │ │ -
constexpr pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, _ForwardIterator __last)
│ │ │ -
constexpr bool empty() const noexcept
│ │ │ -
constexpr reverse_iterator rend() noexcept
Definition stl_vector.h:933
│ │ │ -
constexpr const_reverse_iterator rbegin() const noexcept
Definition stl_vector.h:923
│ │ │ -
constexpr const_reverse_iterator crbegin() const noexcept
Definition stl_vector.h:974
│ │ │ -
constexpr const_reference at(size_type __n) const
Provides access to the data contained in the vector.
│ │ │ -
constexpr const_iterator cbegin() const noexcept
Definition stl_vector.h:954
│ │ │ -
constexpr vector(_InputIterator __first, _InputIterator __last, const allocator_type &__a=allocator_type())
Builds a vector from a range.
Definition stl_vector.h:707
│ │ │ -
constexpr vector(initializer_list< value_type > __l, const allocator_type &__a=allocator_type())
Builds a vector from an initializer list.
Definition stl_vector.h:678
│ │ │ -
constexpr const_iterator end() const noexcept
Definition stl_vector.h:903
│ │ │ -
vector(vector &&) noexcept=default
Vector move constructor.
│ │ │ -
constexpr iterator insert(const_iterator __position, _InputIterator __first, _InputIterator __last)
Inserts a range into the vector.
│ │ │ -
constexpr void clear() noexcept
│ │ │ -
constexpr void assign(initializer_list< value_type > __l)
Assigns an initializer list to a vector.
Definition stl_vector.h:855
│ │ │ -
constexpr allocator_type get_allocator() const noexcept
Get a copy of the memory allocation object.
Definition stl_vector.h:311
│ │ │ -
constexpr size_type size() const noexcept
Definition stl_vector.h:992
│ │ │ -
constexpr vector(size_type __n, const value_type &__value, const allocator_type &__a=allocator_type())
Creates a vector with copies of an exemplar element.
Definition stl_vector.h:569
│ │ │ -
constexpr reference back() noexcept
│ │ │ -
constexpr const_reverse_iterator crend() const noexcept
Definition stl_vector.h:984
│ │ │ -
constexpr const_iterator cend() const noexcept
Definition stl_vector.h:964
│ │ │ -
constexpr reference operator[](size_type __n) noexcept
Subscript access to the data contained in the vector.
│ │ │ -
constexpr void shrink_to_fit()
│ │ │ -
constexpr size_type max_size() const noexcept
Definition stl_vector.h:998
│ │ │ - │ │ │ -
Uniform interface to C++98 and C++11 allocators.
│ │ │ -
static constexpr size_type max_size(const _Tp_alloc_type &__a) noexcept
The maximum supported allocation size.
│ │ │ +
__shared_ptr< _Tp, _Lp > dynamic_pointer_cast(const __shared_ptr< _Tp1, _Lp > &__r) noexcept
dynamic_pointer_cast
│ │ │ +
__shared_ptr< _Tp, _Lp > static_pointer_cast(const __shared_ptr< _Tp1, _Lp > &__r) noexcept
static_pointer_cast
│ │ │ +
__shared_ptr< _Tp, _Lp > const_pointer_cast(const __shared_ptr< _Tp1, _Lp > &__r) noexcept
const_pointer_cast
│ │ │ +
constexpr _Iterator __base(_Iterator __it)
│ │ │ +
Part of RTTI.
Definition typeinfo:93
│ │ │ +
Primary class template hash.
│ │ │ +
Base class for all library exceptions.
Definition exception.h:60
│ │ │ +
Exception possibly thrown by shared_ptr.
│ │ │ +
virtual char const * what() const noexcept
│ │ │ + │ │ │ +
Scoped lock idiom.
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -stl_vector.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// Vector implementation -*- C++ -*- │ │ │ │ +1// shared_ptr and weak_ptr implementation details -*- C++ -*- │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2001-2023 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2007-2023 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,2443 +21,2351 @@ │ │ │ │ 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/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 >= 202002L │ │ │ │ -66# include <_c_o_m_p_a_r_e> │ │ │ │ -67#define __cpp_lib_constexpr_vector 201907L │ │ │ │ +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// weak_ptr.hpp │ │ │ │ +35// Copyright (C) 2001, 2002, 2003 Peter Dimov │ │ │ │ +36 │ │ │ │ +37// enable_shared_from_this.hpp │ │ │ │ +38// Copyright (C) 2002 Peter Dimov │ │ │ │ +39 │ │ │ │ +40// Distributed under the Boost Software License, Version 1.0. (See │ │ │ │ +41// accompanying file LICENSE_1_0.txt or copy at │ │ │ │ +42// http://www.boost.org/LICENSE_1_0.txt) │ │ │ │ +43 │ │ │ │ +44/** @file bits/shared_ptr_base.h │ │ │ │ +45 * This is an internal header file, included by other library headers. │ │ │ │ +46 * Do not attempt to use it directly. @headername{memory} │ │ │ │ +47 */ │ │ │ │ +48 │ │ │ │ +49#ifndef _SHARED_PTR_BASE_H │ │ │ │ +50#define _SHARED_PTR_BASE_H 1 │ │ │ │ +51 │ │ │ │ +52#include <_t_y_p_e_i_n_f_o> │ │ │ │ +53#include <_b_i_t_s_/_a_l_l_o_c_a_t_e_d___p_t_r_._h> │ │ │ │ +54#include <_b_i_t_s_/_a_l_l_o_c_a_t_o_r_._h> │ │ │ │ +55#include <_b_i_t_s_/_e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h> │ │ │ │ +56#include <_b_i_t_s_/_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h> │ │ │ │ +57#include <_b_i_t_s_/_r_e_f_w_r_a_p_._h> │ │ │ │ +58#include <_b_i_t_s_/_s_t_l___f_u_n_c_t_i_o_n_._h> // std::less │ │ │ │ +59#include <_b_i_t_s_/_u_n_i_q_u_e___p_t_r_._h> │ │ │ │ +60#include <_e_x_t_/_a_l_i_g_n_e_d___b_u_f_f_e_r_._h> │ │ │ │ +61#include <_e_x_t_/_a_t_o_m_i_c_i_t_y_._h> │ │ │ │ +62#include <_e_x_t_/_c_o_n_c_u_r_r_e_n_c_e_._h> │ │ │ │ +63#if __cplusplus >= 202002L │ │ │ │ +64# include <_b_i_t> // __bit_floor │ │ │ │ +65# include <_c_o_m_p_a_r_e> │ │ │ │ +66# include <_b_i_t_s_/_a_l_i_g_n_._h> // std::align │ │ │ │ +67# include <_b_i_t_s_/_s_t_l___u_n_i_n_i_t_i_a_l_i_z_e_d_._h> │ │ │ │ 68#endif │ │ │ │ 69 │ │ │ │ -70#include <_d_e_b_u_g_/_a_s_s_e_r_t_i_o_n_s_._h> │ │ │ │ -71 │ │ │ │ -72#if _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR │ │ │ │ -73extern "C" void │ │ │ │ -74__sanitizer_annotate_contiguous_container(const void*, const void*, │ │ │ │ -75 const void*, const void*); │ │ │ │ -76#endif │ │ │ │ -77 │ │ │ │ -78namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -79{ │ │ │ │ -80_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -81_GLIBCXX_BEGIN_NAMESPACE_CONTAINER │ │ │ │ -82 │ │ │ │ -83 /// See bits/stl_deque.h's _Deque_base for an explanation. │ │ │ │ -84 template │ │ │ │ -_8_5 struct ___V_e_c_t_o_r___b_a_s_e │ │ │ │ +70namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +71{ │ │ │ │ +72_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +73 │ │ │ │ +74#if _GLIBCXX_USE_DEPRECATED │ │ │ │ +75#pragma GCC diagnostic push │ │ │ │ +76#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +77 template class auto_ptr; │ │ │ │ +78#pragma GCC diagnostic pop │ │ │ │ +79#endif │ │ │ │ +80 │ │ │ │ +81 /** │ │ │ │ +82 * @brief Exception possibly thrown by @c shared_ptr. │ │ │ │ +83 * @ingroup exceptions │ │ │ │ +84 */ │ │ │ │ +_8_5 class _b_a_d___w_e_a_k___p_t_r : public _s_t_d_:_:_e_x_c_e_p_t_i_o_n │ │ │ │ 86 { │ │ │ │ -87 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 │ │ │ │ -88 rebind<_Tp>::other _Tp_alloc_type; │ │ │ │ -89 typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer │ │ │ │ -90 pointer; │ │ │ │ -91 │ │ │ │ -92 struct _Vector_impl_data │ │ │ │ -93 { │ │ │ │ -94 pointer _M_start; │ │ │ │ -95 pointer _M_finish; │ │ │ │ -96 pointer _M_end_of_storage; │ │ │ │ +87 public: │ │ │ │ +_8_8 virtual char const* _w_h_a_t() const noexcept; │ │ │ │ +89 │ │ │ │ +90 _v_i_r_t_u_a_l ~_b_a_d___w_e_a_k___p_t_r() noexcept; │ │ │ │ +91 }; │ │ │ │ +92 │ │ │ │ +93 // Substitute for bad_weak_ptr object in the case of -fno-exceptions. │ │ │ │ +94 _i_n_l_i_n_e void │ │ │ │ +95 __throw_bad_weak_ptr() │ │ │ │ +96 { _GLIBCXX_THROW_OR_ABORT(_b_a_d___w_e_a_k___p_t_r()); } │ │ │ │ 97 │ │ │ │ -98 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -99 _Vector_impl_data() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -100 : _M_start(), _M_finish(), _M_end_of_storage() │ │ │ │ -101 { } │ │ │ │ -102 │ │ │ │ -103#if __cplusplus >= 201103L │ │ │ │ -104 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -105 _Vector_impl_data(_Vector_impl_data&& __x) noexcept │ │ │ │ -106 : _M_start(__x._M_start), _M_finish(__x._M_finish), │ │ │ │ -107 _M_end_of_storage(__x._M_end_of_storage) │ │ │ │ -108 { __x._M_start = __x._M_finish = __x._M_end_of_storage = pointer(); } │ │ │ │ -109#endif │ │ │ │ -110 │ │ │ │ -111 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -112 void │ │ │ │ -113 _M_copy_data(_Vector_impl_data const& __x) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -114 { │ │ │ │ -115 _M_start = __x._M_start; │ │ │ │ -116 _M_finish = __x._M_finish; │ │ │ │ -117 _M_end_of_storage = __x._M_end_of_storage; │ │ │ │ -118 } │ │ │ │ -119 │ │ │ │ -120 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -121 void │ │ │ │ -122 _M_swap_data(_Vector_impl_data& __x) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -123 { │ │ │ │ -124 // Do not use std::swap(_M_start, __x._M_start), etc as it loses │ │ │ │ -125 // information used by TBAA. │ │ │ │ -126 _Vector_impl_data _____t_m_p; │ │ │ │ -127 _____t_m_p._M_copy_data(*this); │ │ │ │ -128 _M_copy_data(__x); │ │ │ │ -129 __x._M_copy_data(_____t_m_p); │ │ │ │ -130 } │ │ │ │ -131 }; │ │ │ │ -132 │ │ │ │ -133 struct _Vector_impl │ │ │ │ -134 : public _Tp_alloc_type, public _Vector_impl_data │ │ │ │ -135 { │ │ │ │ -136 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -137 _Vector_impl() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T___I_F( │ │ │ │ -138 _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) │ │ │ │ -139#if __cpp_lib_concepts │ │ │ │ -140 requires _i_s___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t_i_b_l_e___v_<___T_p___a_l_l_o_c___t_y_p_e_> │ │ │ │ -141#endif │ │ │ │ -142 : _Tp_alloc_type() │ │ │ │ -143 { } │ │ │ │ -144 │ │ │ │ -145 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -146 _Vector_impl(_Tp_alloc_type const& __a) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -147 : _Tp_alloc_type(__a) │ │ │ │ -148 { } │ │ │ │ -149 │ │ │ │ -150#if __cplusplus >= 201103L │ │ │ │ -151 // Not defaulted, to enforce noexcept(true) even when │ │ │ │ -152 // !is_nothrow_move_constructible<_Tp_alloc_type>. │ │ │ │ -153 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -154 _Vector_impl(_Vector_impl&& __x) noexcept │ │ │ │ -155 : _Tp_alloc_type(_s_t_d_:_:_m_o_v_e(__x)), _Vector_impl_data(_s_t_d_:_:_m_o_v_e(__x)) │ │ │ │ -156 { } │ │ │ │ -157 │ │ │ │ -158 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -159 _Vector_impl(_Tp_alloc_type&& __a) noexcept │ │ │ │ -160 : _Tp_alloc_type(_s_t_d_:_:_m_o_v_e(__a)) │ │ │ │ -161 { } │ │ │ │ -162 │ │ │ │ -163 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -164 _Vector_impl(_Tp_alloc_type&& __a, _Vector_impl&& _____r_v) noexcept │ │ │ │ -165 : _Tp_alloc_type(_s_t_d_:_:_m_o_v_e(__a)), _Vector_impl_data(_s_t_d_:_:_m_o_v_e(_____r_v)) │ │ │ │ -166 { } │ │ │ │ -167#endif │ │ │ │ -168 │ │ │ │ -169#if _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR │ │ │ │ -170 template │ │ │ │ -171 struct ___A_s_a_n │ │ │ │ -172 { │ │ │ │ -173 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_> │ │ │ │ -174 ::size_type size_type; │ │ │ │ -175 │ │ │ │ -176 static ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R void │ │ │ │ -177 ___S___s_h_r_i_n_k(_Vector_impl&, size_type) { } │ │ │ │ -178 static ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R void │ │ │ │ -179 ___S___o_n___d_e_a_l_l_o_c(_Vector_impl&) { } │ │ │ │ -180 │ │ │ │ -181 typedef _Vector_impl& ___R_e_i_n_i_t; │ │ │ │ -182 │ │ │ │ -183 struct ___G_r_o_w │ │ │ │ -184 { │ │ │ │ -185 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R ___G_r_o_w(_Vector_impl&, size_type) { } │ │ │ │ -186 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R void ___M___g_r_e_w(size_type) { } │ │ │ │ -187 }; │ │ │ │ -188 }; │ │ │ │ -189 │ │ │ │ -190 // Enable ASan annotations for memory obtained from std::allocator. │ │ │ │ -191 template │ │ │ │ -192 struct ___A_s_a_n<_a_l_l_o_c_a_t_o_r<_Up> > │ │ │ │ -193 { │ │ │ │ -194 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_> │ │ │ │ -195 ::size_type size_type; │ │ │ │ -196 │ │ │ │ -197 // Adjust ASan annotation for [_M_start, _M_end_of_storage) to │ │ │ │ -198 // mark end of valid region as __curr instead of __prev. │ │ │ │ -199 static ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R void │ │ │ │ -200 ___S___a_d_j_u_s_t(_Vector_impl& __impl, pointer _____p_r_e_v, pointer _____c_u_r_r) │ │ │ │ -201 { │ │ │ │ -202#if __cpp_lib_is_constant_evaluated │ │ │ │ -203 if (_s_t_d_:_:_i_s___c_o_n_s_t_a_n_t___e_v_a_l_u_a_t_e_d()) │ │ │ │ -204 return; │ │ │ │ -205#endif │ │ │ │ -206 _____s_a_n_i_t_i_z_e_r___a_n_n_o_t_a_t_e___c_o_n_t_i_g_u_o_u_s___c_o_n_t_a_i_n_e_r(__impl._M_start, │ │ │ │ -207 __impl._M_end_of_storage, _____p_r_e_v, _____c_u_r_r); │ │ │ │ -208 } │ │ │ │ -209 │ │ │ │ -210 static ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R void │ │ │ │ -211 ___S___g_r_o_w(_Vector_impl& __impl, size_type __n) │ │ │ │ -212 { ___S___a_d_j_u_s_t(__impl, __impl._M_finish, __impl._M_finish + __n); } │ │ │ │ -213 │ │ │ │ -214 static ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R void │ │ │ │ -215 ___S___s_h_r_i_n_k(_Vector_impl& __impl, size_type __n) │ │ │ │ -216 { ___S___a_d_j_u_s_t(__impl, __impl._M_finish + __n, __impl._M_finish); } │ │ │ │ -217 │ │ │ │ -218 static ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R void │ │ │ │ -219 ___S___o_n___d_e_a_l_l_o_c(_Vector_impl& __impl) │ │ │ │ -220 { │ │ │ │ -221 if (__impl._M_start) │ │ │ │ -222 ___S___a_d_j_u_s_t(__impl, __impl._M_finish, __impl._M_end_of_storage); │ │ │ │ +98 using __gnu_cxx::_Lock_policy; │ │ │ │ +99 using __gnu_cxx::__default_lock_policy; │ │ │ │ +100 using __gnu_cxx::_S_single; │ │ │ │ +101 using __gnu_cxx::_S_mutex; │ │ │ │ +102 using __gnu_cxx::_S_atomic; │ │ │ │ +103 │ │ │ │ +104 // Empty helper class except when the template argument is _S_mutex. │ │ │ │ +105 template<_Lock_policy _Lp> │ │ │ │ +106 class _Mutex_base │ │ │ │ +107 { │ │ │ │ +108 protected: │ │ │ │ +109 // The atomic policy uses fully-fenced builtins, single doesn't care. │ │ │ │ +110 enum { _S_need_barriers = 0 }; │ │ │ │ +111 }; │ │ │ │ +112 │ │ │ │ +113 template<> │ │ │ │ +114 class _Mutex_base<_S_mutex> │ │ │ │ +115 : public __gnu_cxx::__mutex │ │ │ │ +116 { │ │ │ │ +117 protected: │ │ │ │ +118 // This policy is used when atomic builtins are not available. │ │ │ │ +119 // The replacement atomic operations might not have the necessary │ │ │ │ +120 // memory barriers. │ │ │ │ +121 enum { _S_need_barriers = 1 }; │ │ │ │ +122 }; │ │ │ │ +123 │ │ │ │ +124 template<_Lock_policy _Lp = __default_lock_policy> │ │ │ │ +125 class _Sp_counted_base │ │ │ │ +126 : public _Mutex_base<_Lp> │ │ │ │ +127 { │ │ │ │ +128 public: │ │ │ │ +129 _Sp_counted_base() noexcept │ │ │ │ +130 : _M_use_count(1), _M_weak_count(1) { } │ │ │ │ +131 │ │ │ │ +132 virtual │ │ │ │ +133 ~_Sp_counted_base() noexcept │ │ │ │ +134 { } │ │ │ │ +135 │ │ │ │ +136 // Called when _M_use_count drops to zero, to release the resources │ │ │ │ +137 // managed by *this. │ │ │ │ +138 virtual void │ │ │ │ +139 _M_dispose() noexcept = 0; │ │ │ │ +140 │ │ │ │ +141 // Called when _M_weak_count drops to zero. │ │ │ │ +142 virtual void │ │ │ │ +143 _M_destroy() noexcept │ │ │ │ +144 { delete this; } │ │ │ │ +145 │ │ │ │ +146 virtual void* │ │ │ │ +147 _M_get_deleter(const _s_t_d_:_:_t_y_p_e___i_n_f_o&) noexcept = 0; │ │ │ │ +148 │ │ │ │ +149 // Increment the use count (used when the count is greater than zero). │ │ │ │ +150 void │ │ │ │ +151 _M_add_ref_copy() │ │ │ │ +152 { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); } │ │ │ │ +153 │ │ │ │ +154 // Increment the use count if it is non-zero, throw otherwise. │ │ │ │ +155 void │ │ │ │ +156 _M_add_ref_lock() │ │ │ │ +157 { │ │ │ │ +158 if (!_M_add_ref_lock_nothrow()) │ │ │ │ +159 __throw_bad_weak_ptr(); │ │ │ │ +160 } │ │ │ │ +161 │ │ │ │ +162 // Increment the use count if it is non-zero. │ │ │ │ +163 bool │ │ │ │ +164 _M_add_ref_lock_nothrow() noexcept; │ │ │ │ +165 │ │ │ │ +166 // Decrement the use count. │ │ │ │ +167 void │ │ │ │ +168 _M_release() noexcept; │ │ │ │ +169 │ │ │ │ +170 // Called by _M_release() when the use count reaches zero. │ │ │ │ +171 void │ │ │ │ +172 _M_release_last_use() noexcept │ │ │ │ +173 { │ │ │ │ +174 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_use_count); │ │ │ │ +175 _M_dispose(); │ │ │ │ +176 // There must be a memory barrier between dispose() and destroy() │ │ │ │ +177 // to ensure that the effects of dispose() are observed in the │ │ │ │ +178 // thread that runs destroy(). │ │ │ │ +179 // See http://gcc.gnu.org/ml/libstdc++/2005-11/msg00136.html │ │ │ │ +180 if (_Mutex_base<_Lp>::_S_need_barriers) │ │ │ │ +181 { │ │ │ │ +182 __atomic_thread_fence (__ATOMIC_ACQ_REL); │ │ │ │ +183 } │ │ │ │ +184 │ │ │ │ +185 // Be race-detector-friendly. For more info see bits/c++config. │ │ │ │ +186 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count); │ │ │ │ +187 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, │ │ │ │ +188 -1) == 1) │ │ │ │ +189 { │ │ │ │ +190 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count); │ │ │ │ +191 _M_destroy(); │ │ │ │ +192 } │ │ │ │ +193 } │ │ │ │ +194 │ │ │ │ +195 // As above, but 'noinline' to reduce code size on the cold path. │ │ │ │ +196 __attribute__((__noinline__)) │ │ │ │ +197 void │ │ │ │ +198 _M_release_last_use_cold() noexcept │ │ │ │ +199 { _M_release_last_use(); } │ │ │ │ +200 │ │ │ │ +201 // Increment the weak count. │ │ │ │ +202 void │ │ │ │ +203 _M_weak_add_ref() noexcept │ │ │ │ +204 { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); } │ │ │ │ +205 │ │ │ │ +206 // Decrement the weak count. │ │ │ │ +207 void │ │ │ │ +208 _M_weak_release() noexcept │ │ │ │ +209 { │ │ │ │ +210 // Be race-detector-friendly. For more info see bits/c++config. │ │ │ │ +211 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count); │ │ │ │ +212 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1) │ │ │ │ +213 { │ │ │ │ +214 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count); │ │ │ │ +215 if (_Mutex_base<_Lp>::_S_need_barriers) │ │ │ │ +216 { │ │ │ │ +217 // See _M_release(), │ │ │ │ +218 // destroy() must observe results of dispose() │ │ │ │ +219 __atomic_thread_fence (__ATOMIC_ACQ_REL); │ │ │ │ +220 } │ │ │ │ +221 _M_destroy(); │ │ │ │ +222 } │ │ │ │ 223 } │ │ │ │ 224 │ │ │ │ -225 // Used on reallocation to tell ASan unused capacity is invalid. │ │ │ │ -226 struct ___R_e_i_n_i_t │ │ │ │ +225 long │ │ │ │ +226 _M_get_use_count() const noexcept │ │ │ │ 227 { │ │ │ │ -228 explicit ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -229 ___R_e_i_n_i_t(_Vector_impl& __impl) : _M_impl(__impl) │ │ │ │ -230 { │ │ │ │ -231 // Mark unused capacity as valid again before deallocating it. │ │ │ │ -232 ___S___o_n___d_e_a_l_l_o_c(_M_impl); │ │ │ │ -233 } │ │ │ │ -234 │ │ │ │ -235 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -236 _~___R_e_i_n_i_t() │ │ │ │ -237 { │ │ │ │ -238 // Mark unused capacity as invalid after reallocation. │ │ │ │ -239 if (_M_impl._M_start) │ │ │ │ -240 ___S___a_d_j_u_s_t(_M_impl, _M_impl._M_end_of_storage, │ │ │ │ -241 _M_impl._M_finish); │ │ │ │ -242 } │ │ │ │ -243 │ │ │ │ -244 _Vector_impl& _M_impl; │ │ │ │ -245 │ │ │ │ -246#if __cplusplus >= 201103L │ │ │ │ -247 ___R_e_i_n_i_t(const ___R_e_i_n_i_t&) = delete; │ │ │ │ -248 ___R_e_i_n_i_t& operator=(const ___R_e_i_n_i_t&) = delete; │ │ │ │ -249#endif │ │ │ │ -250 }; │ │ │ │ +228 // No memory barrier is used here so there is no synchronization │ │ │ │ +229 // with other threads. │ │ │ │ +230 return __atomic_load_n(&_M_use_count, __ATOMIC_RELAXED); │ │ │ │ +231 } │ │ │ │ +232 │ │ │ │ +233 private: │ │ │ │ +234 _Sp_counted_base(_Sp_counted_base const&) = delete; │ │ │ │ +235 _Sp_counted_base& operator=(_Sp_counted_base const&) = delete; │ │ │ │ +236 │ │ │ │ +237 _Atomic_word _M_use_count; // #shared │ │ │ │ +238 _Atomic_word _M_weak_count; // #weak + (#shared != 0) │ │ │ │ +239 }; │ │ │ │ +240 │ │ │ │ +241 template<> │ │ │ │ +242 inline bool │ │ │ │ +243 _Sp_counted_base<_S_single>:: │ │ │ │ +244 _M_add_ref_lock_nothrow() noexcept │ │ │ │ +245 { │ │ │ │ +246 if (_M_use_count == 0) │ │ │ │ +247 return false; │ │ │ │ +248 ++_M_use_count; │ │ │ │ +249 return true; │ │ │ │ +250 } │ │ │ │ 251 │ │ │ │ -252 // Tell ASan when unused capacity is initialized to be valid. │ │ │ │ -253 struct ___G_r_o_w │ │ │ │ -254 { │ │ │ │ -255 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -256 ___G_r_o_w(_Vector_impl& __impl, size_type __n) │ │ │ │ -257 : _M_impl(__impl), _M_n(__n) │ │ │ │ -258 { ___S___g_r_o_w(_M_impl, __n); } │ │ │ │ -259 │ │ │ │ -260 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -261 _~___G_r_o_w() { if (_M_n) ___S___s_h_r_i_n_k(_M_impl, _M_n); } │ │ │ │ -262 │ │ │ │ -263 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -264 void ___M___g_r_e_w(size_type __n) { _M_n -= __n; } │ │ │ │ +252 template<> │ │ │ │ +253 inline bool │ │ │ │ +254 _Sp_counted_base<_S_mutex>:: │ │ │ │ +255 _M_add_ref_lock_nothrow() noexcept │ │ │ │ +256 { │ │ │ │ +257 _____g_n_u___c_x_x_:_:_____s_c_o_p_e_d___l_o_c_k sentry(*this); │ │ │ │ +258 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) │ │ │ │ +259 { │ │ │ │ +260 _M_use_count = 0; │ │ │ │ +261 return false; │ │ │ │ +262 } │ │ │ │ +263 return true; │ │ │ │ +264 } │ │ │ │ 265 │ │ │ │ -266#if __cplusplus >= 201103L │ │ │ │ -267 ___G_r_o_w(const ___G_r_o_w&) = delete; │ │ │ │ -268 ___G_r_o_w& operator=(const ___G_r_o_w&) = delete; │ │ │ │ -269#endif │ │ │ │ -270 private: │ │ │ │ -271 _Vector_impl& _M_impl; │ │ │ │ -272 size_type _M_n; │ │ │ │ -273 }; │ │ │ │ -274 }; │ │ │ │ -275 │ │ │ │ -276#define _GLIBCXX_ASAN_ANNOTATE_REINIT \ │ │ │ │ -277 typename _Base::_Vector_impl::template _Asan<>::_Reinit const \ │ │ │ │ -278 __attribute__((__unused__)) __reinit_guard(this->_M_impl) │ │ │ │ -279#define _GLIBCXX_ASAN_ANNOTATE_GROW(n) \ │ │ │ │ -280 typename _Base::_Vector_impl::template _Asan<>::_Grow \ │ │ │ │ -281 __attribute__((__unused__)) __grow_guard(this->_M_impl, (n)) │ │ │ │ -282#define _GLIBCXX_ASAN_ANNOTATE_GREW(n) __grow_guard._M_grew(n) │ │ │ │ -283#define _GLIBCXX_ASAN_ANNOTATE_SHRINK(n) \ │ │ │ │ -284 _Base::_Vector_impl::template _Asan<>::_S_shrink(this->_M_impl, n) │ │ │ │ -285#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC \ │ │ │ │ -286 _Base::_Vector_impl::template _Asan<>::_S_on_dealloc(this->_M_impl) │ │ │ │ -287#else // ! (_GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR) │ │ │ │ -288#define _GLIBCXX_ASAN_ANNOTATE_REINIT │ │ │ │ -289#define _GLIBCXX_ASAN_ANNOTATE_GROW(n) │ │ │ │ -290#define _GLIBCXX_ASAN_ANNOTATE_GREW(n) │ │ │ │ -291#define _GLIBCXX_ASAN_ANNOTATE_SHRINK(n) │ │ │ │ -292#define _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC │ │ │ │ -293#endif // _GLIBCXX_SANITIZE_STD_ALLOCATOR && _GLIBCXX_SANITIZE_VECTOR │ │ │ │ -294 }; │ │ │ │ -295 │ │ │ │ -296 public: │ │ │ │ -297 typedef _Alloc allocator_type; │ │ │ │ -298 │ │ │ │ -299 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -300 _Tp_alloc_type& │ │ │ │ -301 _M_get_Tp_allocator() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -302 { return this->_M_impl; } │ │ │ │ -303 │ │ │ │ -304 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -305 const _Tp_alloc_type& │ │ │ │ -306 _M_get_Tp_allocator() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -307 { return this->_M_impl; } │ │ │ │ -308 │ │ │ │ -309 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -310 allocator_type │ │ │ │ -_3_1_1 get_allocator() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -312 { return allocator_type(_M_get_Tp_allocator()); } │ │ │ │ -313 │ │ │ │ -314#if __cplusplus >= 201103L │ │ │ │ -315 ___V_e_c_t_o_r___b_a_s_e() = default; │ │ │ │ -316#else │ │ │ │ -317 ___V_e_c_t_o_r___b_a_s_e() { } │ │ │ │ -318#endif │ │ │ │ -319 │ │ │ │ -320 _GLIBCXX20_CONSTEXPR │ │ │ │ -321 _Vector_base(const allocator_type& __a) _GLIBCXX_NOEXCEPT │ │ │ │ -322 : _M_impl(__a) { } │ │ │ │ -323 │ │ │ │ -324 // Kept for ABI compatibility. │ │ │ │ -325#if !_GLIBCXX_INLINE_VERSION │ │ │ │ -326 _GLIBCXX20_CONSTEXPR │ │ │ │ -327 _Vector_base(size_t __n) │ │ │ │ -328 : _M_impl() │ │ │ │ -329 { _M_create_storage(__n); } │ │ │ │ -330#endif │ │ │ │ -331 │ │ │ │ -332 _GLIBCXX20_CONSTEXPR │ │ │ │ -333 _Vector_base(size_t __n, const allocator_type& __a) │ │ │ │ -334 : _M_impl(__a) │ │ │ │ -335 { _M_create_storage(__n); } │ │ │ │ -336 │ │ │ │ -337#if __cplusplus >= 201103L │ │ │ │ -338 _Vector_base(_Vector_base&&) = default; │ │ │ │ -339 │ │ │ │ -340 // Kept for ABI compatibility. │ │ │ │ -341# if !_GLIBCXX_INLINE_VERSION │ │ │ │ -342 _GLIBCXX20_CONSTEXPR │ │ │ │ -343 _Vector_base(_Tp_alloc_type&& __a) noexcept │ │ │ │ -344 : _M_impl(_s_t_d_:_:_m_o_v_e(__a)) { } │ │ │ │ -345 │ │ │ │ -346 _GLIBCXX20_CONSTEXPR │ │ │ │ -347 _Vector_base(_Vector_base&& __x, const allocator_type& __a) │ │ │ │ -348 : _M_impl(__a) │ │ │ │ -349 { │ │ │ │ -350 if (__x.get_allocator() == __a) │ │ │ │ -351 this->_M_impl._M_swap_data(__x._M_impl); │ │ │ │ -352 else │ │ │ │ -353 { │ │ │ │ -354 size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start; │ │ │ │ -355 _M_create_storage(__n); │ │ │ │ +266 template<> │ │ │ │ +267 inline bool │ │ │ │ +268 _Sp_counted_base<_S_atomic>:: │ │ │ │ +269 _M_add_ref_lock_nothrow() noexcept │ │ │ │ +270 { │ │ │ │ +271 // Perform lock-free add-if-not-zero operation. │ │ │ │ +272 _Atomic_word __count = _M_get_use_count(); │ │ │ │ +273 do │ │ │ │ +274 { │ │ │ │ +275 if (__count == 0) │ │ │ │ +276 return false; │ │ │ │ +277 // Replace the current counter value with the old value + 1, as │ │ │ │ +278 // long as it's not changed meanwhile. │ │ │ │ +279 } │ │ │ │ +280 while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, │ │ │ │ +281 true, __ATOMIC_ACQ_REL, │ │ │ │ +282 __ATOMIC_RELAXED)); │ │ │ │ +283 return true; │ │ │ │ +284 } │ │ │ │ +285 │ │ │ │ +286 template<> │ │ │ │ +287 inline void │ │ │ │ +288 _Sp_counted_base<_S_single>::_M_add_ref_copy() │ │ │ │ +289 { ++_M_use_count; } │ │ │ │ +290 │ │ │ │ +291 template<> │ │ │ │ +292 inline void │ │ │ │ +293 _Sp_counted_base<_S_single>::_M_release() noexcept │ │ │ │ +294 { │ │ │ │ +295 if (--_M_use_count == 0) │ │ │ │ +296 { │ │ │ │ +297 _M_dispose(); │ │ │ │ +298 if (--_M_weak_count == 0) │ │ │ │ +299 _M_destroy(); │ │ │ │ +300 } │ │ │ │ +301 } │ │ │ │ +302 │ │ │ │ +303 template<> │ │ │ │ +304 inline void │ │ │ │ +305 _Sp_counted_base<_S_mutex>::_M_release() noexcept │ │ │ │ +306 { │ │ │ │ +307 // Be race-detector-friendly. For more info see bits/c++config. │ │ │ │ +308 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_use_count); │ │ │ │ +309 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) │ │ │ │ +310 { │ │ │ │ +311 _M_release_last_use(); │ │ │ │ +312 } │ │ │ │ +313 } │ │ │ │ +314 │ │ │ │ +315 template<> │ │ │ │ +316 inline void │ │ │ │ +317 _Sp_counted_base<_S_atomic>::_M_release() noexcept │ │ │ │ +318 { │ │ │ │ +319 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_use_count); │ │ │ │ +320#if ! _GLIBCXX_TSAN │ │ │ │ +321 constexpr bool __lock_free │ │ │ │ +322 = __atomic_always_lock_free(sizeof(long long), 0) │ │ │ │ +323 && __atomic_always_lock_free(sizeof(_Atomic_word), 0); │ │ │ │ +324 constexpr bool __double_word │ │ │ │ +325 = sizeof(long long) == 2 * sizeof(_Atomic_word); │ │ │ │ +326 // The ref-count members follow the vptr, so are aligned to │ │ │ │ +327 // alignof(void*). │ │ │ │ +328 constexpr bool __aligned = __alignof(long long) <= alignof(void*); │ │ │ │ +329 if _GLIBCXX17_CONSTEXPR (__lock_free && __double_word && __aligned) │ │ │ │ +330 { │ │ │ │ +331 constexpr int __wordbits = __CHAR_BIT__ * sizeof(_Atomic_word); │ │ │ │ +332 constexpr int __shiftbits = __double_word ? __wordbits : 0; │ │ │ │ +333 constexpr long long __unique_ref = 1LL + (1LL << __shiftbits); │ │ │ │ +334 auto __both_counts = reinterpret_cast(&_M_use_count); │ │ │ │ +335 │ │ │ │ +336 _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&_M_weak_count); │ │ │ │ +337 if (__atomic_load_n(__both_counts, __ATOMIC_ACQUIRE) == __unique_ref) │ │ │ │ +338 { │ │ │ │ +339 // Both counts are 1, so there are no weak references and │ │ │ │ +340 // we are releasing the last strong reference. No other │ │ │ │ +341 // threads can observe the effects of this _M_release() │ │ │ │ +342 // call (e.g. calling use_count()) without a data race. │ │ │ │ +343 _M_weak_count = _M_use_count = 0; │ │ │ │ +344 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_use_count); │ │ │ │ +345 _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&_M_weak_count); │ │ │ │ +346 _M_dispose(); │ │ │ │ +347 _M_destroy(); │ │ │ │ +348 return; │ │ │ │ +349 } │ │ │ │ +350 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) │ │ │ │ +351 [[__unlikely__]] │ │ │ │ +352 { │ │ │ │ +353 _M_release_last_use_cold(); │ │ │ │ +354 return; │ │ │ │ +355 } │ │ │ │ 356 } │ │ │ │ -357 } │ │ │ │ -358# endif │ │ │ │ -359 │ │ │ │ -360 _GLIBCXX20_CONSTEXPR │ │ │ │ -361 _Vector_base(const allocator_type& __a, _Vector_base&& __x) │ │ │ │ -362 : _M_impl(_Tp_alloc_type(__a), _s_t_d::_m_o_v_e(__x._M_impl)) │ │ │ │ -363 { } │ │ │ │ -364#endif │ │ │ │ -365 │ │ │ │ -366 _GLIBCXX20_CONSTEXPR │ │ │ │ -367 ~_Vector_base() _GLIBCXX_NOEXCEPT │ │ │ │ -368 { │ │ │ │ -369 _M_deallocate(_M_impl._M_start, │ │ │ │ -370 _M_impl._M_end_of_storage - _M_impl._M_start); │ │ │ │ -371 } │ │ │ │ -372 │ │ │ │ -373 public: │ │ │ │ -374 _Vector_impl _M_impl; │ │ │ │ -375 │ │ │ │ -376 _GLIBCXX20_CONSTEXPR │ │ │ │ -377 pointer │ │ │ │ -378 _M_allocate(size_t __n) │ │ │ │ -379 { │ │ │ │ -380 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_> _Tr; │ │ │ │ -381 return __n != 0 ? _Tr::allocate(_M_impl, __n) : pointer(); │ │ │ │ -382 } │ │ │ │ +357 else │ │ │ │ +358#endif │ │ │ │ +359 if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) │ │ │ │ +360 { │ │ │ │ +361 _M_release_last_use(); │ │ │ │ +362 } │ │ │ │ +363 } │ │ │ │ +364 │ │ │ │ +365 template<> │ │ │ │ +366 inline void │ │ │ │ +367 _Sp_counted_base<_S_single>::_M_weak_add_ref() noexcept │ │ │ │ +368 { ++_M_weak_count; } │ │ │ │ +369 │ │ │ │ +370 template<> │ │ │ │ +371 inline void │ │ │ │ +372 _Sp_counted_base<_S_single>::_M_weak_release() noexcept │ │ │ │ +373 { │ │ │ │ +374 if (--_M_weak_count == 0) │ │ │ │ +375 _M_destroy(); │ │ │ │ +376 } │ │ │ │ +377 │ │ │ │ +378 template<> │ │ │ │ +379 inline long │ │ │ │ +380 _Sp_counted_base<_S_single>::_M_get_use_count() const noexcept │ │ │ │ +381 { return _M_use_count; } │ │ │ │ +382 │ │ │ │ 383 │ │ │ │ -384 _GLIBCXX20_CONSTEXPR │ │ │ │ -385 void │ │ │ │ -386 _M_deallocate(pointer __p, size_t __n) │ │ │ │ -387 { │ │ │ │ -388 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_> _Tr; │ │ │ │ -389 if (__p) │ │ │ │ -390 _Tr::deallocate(_M_impl, __p, __n); │ │ │ │ -391 } │ │ │ │ -392 │ │ │ │ -393 protected: │ │ │ │ -394 _GLIBCXX20_CONSTEXPR │ │ │ │ -395 void │ │ │ │ -396 _M_create_storage(size_t __n) │ │ │ │ -397 { │ │ │ │ -398 this->_M_impl._M_start = this->_M_allocate(__n); │ │ │ │ -399 this->_M_impl._M_finish = this->_M_impl._M_start; │ │ │ │ -400 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; │ │ │ │ -401 } │ │ │ │ -402 }; │ │ │ │ -403 │ │ │ │ -404 /** │ │ │ │ -405 * @brief A standard container which offers fixed time access to │ │ │ │ -406 * individual elements in any order. │ │ │ │ -407 * │ │ │ │ -408 * @ingroup sequences │ │ │ │ -409 * @headerfile vector │ │ │ │ -410 * @since C++98 │ │ │ │ -411 * │ │ │ │ -412 * @tparam _Tp Type of element. │ │ │ │ -413 * @tparam _Alloc Allocator type, defaults to allocator<_Tp>. │ │ │ │ -414 * │ │ │ │ -415 * Meets the requirements of a container, a │ │ │ │ -416 * reversible container, and a │ │ │ │ -417 * sequence, including the │ │ │ │ -418 * optional sequence requirements with the │ │ │ │ -419 * %exception of @c push_front and @c pop_front. │ │ │ │ -420 * │ │ │ │ -421 * In some terminology a %vector can be described as a dynamic │ │ │ │ -422 * C-style array, it offers fast and efficient access to individual │ │ │ │ -423 * elements in any order and saves the user from worrying about │ │ │ │ -424 * memory and size allocation. Subscripting ( @c [] ) access is │ │ │ │ -425 * also provided as with C-style arrays. │ │ │ │ -426 */ │ │ │ │ -427 template > │ │ │ │ -_4_2_8 class _v_e_c_t_o_r : protected ___V_e_c_t_o_r___b_a_s_e<_Tp, _Alloc> │ │ │ │ -429 { │ │ │ │ -430#ifdef _GLIBCXX_CONCEPT_CHECKS │ │ │ │ -431 // Concept requirements. │ │ │ │ -432 typedef typename _Alloc::value_type ___A_l_l_o_c___v_a_l_u_e___t_y_p_e; │ │ │ │ -433# if __cplusplus < 201103L │ │ │ │ -434 __glibcxx_class_requires(_Tp, _SGIAssignableConcept) │ │ │ │ -435# endif │ │ │ │ -436 __glibcxx_class_requires2(_Tp, ___A_l_l_o_c___v_a_l_u_e___t_y_p_e, _SameTypeConcept) │ │ │ │ -437#endif │ │ │ │ -438 │ │ │ │ -439#if __cplusplus >= 201103L │ │ │ │ -440 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, │ │ │ │ -441 "std::vector must have a non-const, non-volatile value_type"); │ │ │ │ -442# if __cplusplus > 201703L || defined __STRICT_ANSI__ │ │ │ │ -443 static_assert(_i_s___s_a_m_e_<_t_y_p_e_n_a_m_e_ ___A_l_l_o_c_:_:_v_a_l_u_e___t_y_p_e_,_ ___T_p_>_:_:_v_a_l_u_e, │ │ │ │ -444 "std::vector must have the same value_type as its allocator"); │ │ │ │ -445# endif │ │ │ │ -446#endif │ │ │ │ -447 │ │ │ │ -448 typedef ___V_e_c_t_o_r___b_a_s_e_<___T_p_,_ ___A_l_l_o_c_> ___B_a_s_e; │ │ │ │ -449 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; │ │ │ │ -450 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_> ___A_l_l_o_c___t_r_a_i_t_s; │ │ │ │ -451 │ │ │ │ -452 public: │ │ │ │ -453 typedef _Tp value_type; │ │ │ │ -454 typedef typename _Base::pointer pointer; │ │ │ │ -455 typedef typename _Alloc_traits::const_pointer const_pointer; │ │ │ │ -456 typedef typename _Alloc_traits::reference reference; │ │ │ │ -457 typedef typename _Alloc_traits::const_reference const_reference; │ │ │ │ -458 typedef __gnu_cxx::__normal_iterator iterator; │ │ │ │ -459 typedef __gnu_cxx::__normal_iterator │ │ │ │ -460 const_iterator; │ │ │ │ -461 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_> _c_o_n_s_t___r_e_v_e_r_s_e___i_t_e_r_a_t_o_r; │ │ │ │ -462 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_> _r_e_v_e_r_s_e___i_t_e_r_a_t_o_r; │ │ │ │ -463 typedef size_t size_type; │ │ │ │ -464 typedef ptrdiff_t difference_type; │ │ │ │ -465 typedef _Alloc allocator_type; │ │ │ │ -466 │ │ │ │ -467 private: │ │ │ │ -468#if __cplusplus >= 201103L │ │ │ │ -469 static constexpr bool │ │ │ │ -470 _S_nothrow_relocate(_t_r_u_e___t_y_p_e) │ │ │ │ -471 { │ │ │ │ -472 return noexcept(_s_t_d_:_:_____r_e_l_o_c_a_t_e___a(_s_t_d_:_:_d_e_c_l_v_a_l_<_p_o_i_n_t_e_r_>(), │ │ │ │ -473 _s_t_d_:_:_d_e_c_l_v_a_l_<_p_o_i_n_t_e_r_>(), │ │ │ │ -474 _s_t_d_:_:_d_e_c_l_v_a_l_<_p_o_i_n_t_e_r_>(), │ │ │ │ -475 _s_t_d_:_:_d_e_c_l_v_a_l_<___T_p___a_l_l_o_c___t_y_p_e_&_>())); │ │ │ │ -476 } │ │ │ │ -477 │ │ │ │ -478 static constexpr bool │ │ │ │ -479 _S_nothrow_relocate(_f_a_l_s_e___t_y_p_e) │ │ │ │ -480 { return false; } │ │ │ │ -481 │ │ │ │ -482 static constexpr bool │ │ │ │ -483 _S_use_relocate() │ │ │ │ -484 { │ │ │ │ -485 // Instantiating std::__relocate_a might cause an error outside the │ │ │ │ -486 // immediate context (in __relocate_object_a's noexcept-specifier), │ │ │ │ -487 // so only do it if we know the type can be move-inserted into *this. │ │ │ │ -488 return _S_nothrow_relocate(_____i_s___m_o_v_e___i_n_s_e_r_t_a_b_l_e_<___T_p___a_l_l_o_c___t_y_p_e_>{}); │ │ │ │ -489 } │ │ │ │ -490 │ │ │ │ -491 static pointer │ │ │ │ -492 _S_do_relocate(pointer __first, pointer __last, pointer __result, │ │ │ │ -493 _Tp_alloc_type& _____a_l_l_o_c, _t_r_u_e___t_y_p_e) noexcept │ │ │ │ -494 { │ │ │ │ -495 return _s_t_d_:_:_____r_e_l_o_c_a_t_e___a(__first, __last, __result, _____a_l_l_o_c); │ │ │ │ -496 } │ │ │ │ -497 │ │ │ │ -498 static pointer │ │ │ │ -499 _S_do_relocate(pointer, pointer, pointer __result, │ │ │ │ -500 _Tp_alloc_type&, _f_a_l_s_e___t_y_p_e) noexcept │ │ │ │ -501 { return __result; } │ │ │ │ -502 │ │ │ │ -503 static ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R pointer │ │ │ │ -504 _S_relocate(pointer __first, pointer __last, pointer __result, │ │ │ │ -505 _Tp_alloc_type& _____a_l_l_o_c) noexcept │ │ │ │ -506 { │ │ │ │ -507#if __cpp_if_constexpr │ │ │ │ -508 // All callers have already checked _S_use_relocate() so just do it. │ │ │ │ -509 return _s_t_d_:_:_____r_e_l_o_c_a_t_e___a(__first, __last, __result, _____a_l_l_o_c); │ │ │ │ -510#else │ │ │ │ -511 using _____d_o___i_t = __bool_constant<_S_use_relocate()>; │ │ │ │ -512 return _S_do_relocate(__first, __last, __result, _____a_l_l_o_c, _____d_o___i_t{}); │ │ │ │ -513#endif │ │ │ │ -514 } │ │ │ │ -515#endif // C++11 │ │ │ │ -516 │ │ │ │ -517 protected: │ │ │ │ -518 using _Base::_M_allocate; │ │ │ │ -519 using _Base::_M_deallocate; │ │ │ │ -520 using _Base::_M_impl; │ │ │ │ -521 using _Base::_M_get_Tp_allocator; │ │ │ │ +384 // Forward declarations. │ │ │ │ +385 template │ │ │ │ +386 class __shared_ptr; │ │ │ │ +387 │ │ │ │ +388 template │ │ │ │ +389 class __weak_ptr; │ │ │ │ +390 │ │ │ │ +391 template │ │ │ │ +392 class __enable_shared_from_this; │ │ │ │ +393 │ │ │ │ +394 template │ │ │ │ +395 class shared_ptr; │ │ │ │ +396 │ │ │ │ +397 template │ │ │ │ +398 class weak_ptr; │ │ │ │ +399 │ │ │ │ +400 template │ │ │ │ +401 struct owner_less; │ │ │ │ +402 │ │ │ │ +403 template │ │ │ │ +404 class enable_shared_from_this; │ │ │ │ +405 │ │ │ │ +406 template<_Lock_policy _Lp = __default_lock_policy> │ │ │ │ +407 class __weak_count; │ │ │ │ +408 │ │ │ │ +409 template<_Lock_policy _Lp = __default_lock_policy> │ │ │ │ +410 class __shared_count; │ │ │ │ +411 │ │ │ │ +412#if __cplusplus >= 202002L │ │ │ │ +413 template │ │ │ │ +414 class _Sp_atomic; │ │ │ │ +415#endif │ │ │ │ +416 │ │ │ │ +417 // Counted ptr with no deleter or allocator support │ │ │ │ +418 template │ │ │ │ +419 class _Sp_counted_ptr final : public _Sp_counted_base<_Lp> │ │ │ │ +420 { │ │ │ │ +421 public: │ │ │ │ +422 explicit │ │ │ │ +423 _Sp_counted_ptr(_Ptr __p) noexcept │ │ │ │ +424 : _M_ptr(__p) { } │ │ │ │ +425 │ │ │ │ +426 virtual void │ │ │ │ +427 _M_dispose() noexcept │ │ │ │ +428 { delete _M_ptr; } │ │ │ │ +429 │ │ │ │ +430 virtual void │ │ │ │ +431 _M_destroy() noexcept │ │ │ │ +432 { delete this; } │ │ │ │ +433 │ │ │ │ +434 virtual void* │ │ │ │ +435 _M_get_deleter(const _s_t_d_:_:_t_y_p_e___i_n_f_o&) noexcept │ │ │ │ +436 { return nullptr; } │ │ │ │ +437 │ │ │ │ +438 _Sp_counted_ptr(const _Sp_counted_ptr&) = delete; │ │ │ │ +439 _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete; │ │ │ │ +440 │ │ │ │ +441 private: │ │ │ │ +442 _Ptr _M_ptr; │ │ │ │ +443 }; │ │ │ │ +444 │ │ │ │ +445 template<> │ │ │ │ +446 inline void │ │ │ │ +447 _Sp_counted_ptr::_M_dispose() noexcept { } │ │ │ │ +448 │ │ │ │ +449 template<> │ │ │ │ +450 inline void │ │ │ │ +451 _Sp_counted_ptr::_M_dispose() noexcept { } │ │ │ │ +452 │ │ │ │ +453 template<> │ │ │ │ +454 inline void │ │ │ │ +455 _Sp_counted_ptr::_M_dispose() noexcept { } │ │ │ │ +456 │ │ │ │ +457 // FIXME: once __has_cpp_attribute(__no_unique_address__)) is true for │ │ │ │ +458 // all supported compilers we can greatly simplify _Sp_ebo_helper. │ │ │ │ +459 // N.B. unconditionally applying the attribute could change layout for │ │ │ │ +460 // final types, which currently cannot use EBO so have a unique address. │ │ │ │ +461 │ │ │ │ +462 template │ │ │ │ +464 struct _Sp_ebo_helper; │ │ │ │ +465 │ │ │ │ +466 /// Specialization using EBO. │ │ │ │ +467 template │ │ │ │ +_4_6_8 struct _Sp_ebo_helper<___N_m, _Tp, _t_r_u_e> : private _Tp │ │ │ │ +469 { │ │ │ │ +470 explicit _Sp_ebo_helper(const _Tp& _____t_p) : _Tp(_____t_p) { } │ │ │ │ +471 explicit _Sp_ebo_helper(_Tp&& _____t_p) : _Tp(_s_t_d_:_:_m_o_v_e(_____t_p)) { } │ │ │ │ +472 │ │ │ │ +473 static _Tp& │ │ │ │ +474 _S_get(_Sp_ebo_helper& _____e_b_o_h) { return static_cast<_Tp&>(_____e_b_o_h); } │ │ │ │ +475 }; │ │ │ │ +476 │ │ │ │ +477 /// Specialization not using EBO. │ │ │ │ +478 template │ │ │ │ +_4_7_9 struct _Sp_ebo_helper<___N_m, _Tp, _f_a_l_s_e> │ │ │ │ +480 { │ │ │ │ +481 explicit _Sp_ebo_helper(const _Tp& _____t_p) : _M_tp(_____t_p) { } │ │ │ │ +482 explicit _Sp_ebo_helper(_Tp&& _____t_p) : _M_tp(_s_t_d_:_:_m_o_v_e(_____t_p)) { } │ │ │ │ +483 │ │ │ │ +484 static _Tp& │ │ │ │ +485 _S_get(_Sp_ebo_helper& _____e_b_o_h) │ │ │ │ +486 { return _____e_b_o_h._M_tp; } │ │ │ │ +487 │ │ │ │ +488 private: │ │ │ │ +489 _Tp _M_tp; │ │ │ │ +490 }; │ │ │ │ +491 │ │ │ │ +492 // Support for custom deleter and/or allocator │ │ │ │ +493 template │ │ │ │ +494 class _Sp_counted_deleter _f_i_n_a_l : public _Sp_counted_base<_Lp> │ │ │ │ +495 { │ │ │ │ +496 class _Impl : _Sp_ebo_helper<0, _Deleter>, _Sp_ebo_helper<1, _Alloc> │ │ │ │ +497 { │ │ │ │ +498 typedef ___S_p___e_b_o___h_e_l_p_e_r_<_0_,_ ___D_e_l_e_t_e_r_> _Del_base; │ │ │ │ +499 typedef ___S_p___e_b_o___h_e_l_p_e_r_<_1_,_ ___A_l_l_o_c_> _Alloc_base; │ │ │ │ +500 │ │ │ │ +501 public: │ │ │ │ +502 _Impl(_Ptr __p, ___D_e_l_e_t_e_r __d, const _Alloc& __a) noexcept │ │ │ │ +503 : _Del_base(_s_t_d_:_:_m_o_v_e(__d)), _Alloc_base(__a), _M_ptr(__p) │ │ │ │ +504 { } │ │ │ │ +505 │ │ │ │ +506 _Deleter& _M_del() noexcept { return _Del_base::_S_get(*this); } │ │ │ │ +507 _Alloc& _M_alloc() noexcept { return _Alloc_base::_S_get(*this); } │ │ │ │ +508 │ │ │ │ +509 _Ptr _M_ptr; │ │ │ │ +510 }; │ │ │ │ +511 │ │ │ │ +512 public: │ │ │ │ +513 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_deleter>; │ │ │ │ +514 │ │ │ │ +515 // __d(__p) must not throw. │ │ │ │ +516 _Sp_counted_deleter(_Ptr __p, _Deleter __d) noexcept │ │ │ │ +517 : _M_impl(__p, _s_t_d_:_:_m_o_v_e(__d), _Alloc()) { } │ │ │ │ +518 │ │ │ │ +519 // __d(__p) must not throw. │ │ │ │ +520 _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept │ │ │ │ +521 : _M_impl(__p, _s_t_d_:_:_m_o_v_e(__d), __a) { } │ │ │ │ 522 │ │ │ │ -523 public: │ │ │ │ -524 // [23.2.4.1] construct/copy/destroy │ │ │ │ -525 // (assign() and get_allocator() are also listed in this section) │ │ │ │ -526 │ │ │ │ -527 /** │ │ │ │ -528 * @brief Creates a %vector with no elements. │ │ │ │ -529 */ │ │ │ │ -530#if __cplusplus >= 201103L │ │ │ │ -_5_3_1 _v_e_c_t_o_r() = default; │ │ │ │ -532#else │ │ │ │ -533 _v_e_c_t_o_r() { } │ │ │ │ -534#endif │ │ │ │ -535 │ │ │ │ -536 /** │ │ │ │ -537 * @brief Creates a %vector with no elements. │ │ │ │ -538 * @param __a An allocator object. │ │ │ │ -539 */ │ │ │ │ -540 explicit │ │ │ │ -541 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -_5_4_2 _v_e_c_t_o_r(const allocator_type& __a) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -543 : ___B_a_s_e(__a) { } │ │ │ │ -544 │ │ │ │ -545#if __cplusplus >= 201103L │ │ │ │ -546 /** │ │ │ │ -547 * @brief Creates a %vector with default constructed elements. │ │ │ │ -548 * @param __n The number of elements to initially create. │ │ │ │ -549 * @param __a An allocator. │ │ │ │ -550 * │ │ │ │ -551 * This constructor fills the %vector with @a __n default │ │ │ │ -552 * constructed elements. │ │ │ │ -553 */ │ │ │ │ -554 explicit │ │ │ │ -555 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -_5_5_6 _v_e_c_t_o_r(size_type __n, const allocator_type& __a = allocator_type()) │ │ │ │ -557 : ___B_a_s_e(_S_check_init_len(__n, __a), __a) │ │ │ │ -558 { _M_default_initialize(__n); } │ │ │ │ -559 │ │ │ │ -560 /** │ │ │ │ -561 * @brief Creates a %vector with copies of an exemplar element. │ │ │ │ -562 * @param __n The number of elements to initially create. │ │ │ │ -563 * @param __value An element to copy. │ │ │ │ -564 * @param __a An allocator. │ │ │ │ -565 * │ │ │ │ -566 * This constructor fills the %vector with @a __n copies of @a __value. │ │ │ │ -567 */ │ │ │ │ -568 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -_5_6_9 _v_e_c_t_o_r(size_type __n, const value_type& __value, │ │ │ │ -570 const allocator_type& __a = allocator_type()) │ │ │ │ -571 : ___B_a_s_e(_S_check_init_len(__n, __a), __a) │ │ │ │ -572 { _M_fill_initialize(__n, __value); } │ │ │ │ -573#else │ │ │ │ -574 /** │ │ │ │ -575 * @brief Creates a %vector with copies of an exemplar element. │ │ │ │ -576 * @param __n The number of elements to initially create. │ │ │ │ -577 * @param __value An element to copy. │ │ │ │ -578 * @param __a An allocator. │ │ │ │ -579 * │ │ │ │ -580 * This constructor fills the %vector with @a __n copies of @a __value. │ │ │ │ -581 */ │ │ │ │ -582 explicit │ │ │ │ -583 _v_e_c_t_o_r(size_type __n, const value_type& __value = value_type(), │ │ │ │ -584 const allocator_type& __a = allocator_type()) │ │ │ │ -585 : _Base(_S_check_init_len(__n, __a), __a) │ │ │ │ -586 { _M_fill_initialize(__n, __value); } │ │ │ │ -587#endif │ │ │ │ +523 ~_Sp_counted_deleter() noexcept { } │ │ │ │ +524 │ │ │ │ +525 virtual void │ │ │ │ +526 _M_dispose() noexcept │ │ │ │ +527 { _M_impl._M_del()(_M_impl._M_ptr); } │ │ │ │ +528 │ │ │ │ +529 virtual void │ │ │ │ +530 _M_destroy() noexcept │ │ │ │ +531 { │ │ │ │ +532 __allocator_type __a(_M_impl._M_alloc()); │ │ │ │ +533 __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; │ │ │ │ +534 this->~_Sp_counted_deleter(); │ │ │ │ +535 } │ │ │ │ +536 │ │ │ │ +537 virtual void* │ │ │ │ +538 _M_get_deleter(const type_info& __ti [[__gnu__::__unused__]]) noexcept │ │ │ │ +539 { │ │ │ │ +540#if __cpp_rtti │ │ │ │ +541 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +542 // 2400. shared_ptr's get_deleter() should use addressof() │ │ │ │ +543 return __ti == typeid(_Deleter) │ │ │ │ +544 ? _s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_M_impl._M_del()) │ │ │ │ +545 : nullptr; │ │ │ │ +546#else │ │ │ │ +547 return nullptr; │ │ │ │ +548#endif │ │ │ │ +549 } │ │ │ │ +550 │ │ │ │ +551 private: │ │ │ │ +552 _Impl _M_impl; │ │ │ │ +553 }; │ │ │ │ +554 │ │ │ │ +555 // helpers for make_shared / allocate_shared │ │ │ │ +556 │ │ │ │ +557 struct _Sp_make_shared_tag │ │ │ │ +558 { │ │ │ │ +559 private: │ │ │ │ +560 template │ │ │ │ +561 friend class _Sp_counted_ptr_inplace; │ │ │ │ +562 │ │ │ │ +563 static const type_info& │ │ │ │ +564 _S_ti() noexcept _GLIBCXX_VISIBILITY(default) │ │ │ │ +565 { │ │ │ │ +566 alignas(type_info) static constexpr char __tag[sizeof(type_info)] = { }; │ │ │ │ +567 return reinterpret_cast(__tag); │ │ │ │ +568 } │ │ │ │ +569 │ │ │ │ +570 static bool _S_eq(const type_info&) noexcept; │ │ │ │ +571 }; │ │ │ │ +572 │ │ │ │ +573 template │ │ │ │ +574 struct _Sp_alloc_shared_tag │ │ │ │ +575 { │ │ │ │ +576 const _Alloc& _M_a; │ │ │ │ +577 }; │ │ │ │ +578 │ │ │ │ +579 template │ │ │ │ +580 class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp> │ │ │ │ +581 { │ │ │ │ +582 class _Impl : _Sp_ebo_helper<0, _Alloc> │ │ │ │ +583 { │ │ │ │ +584 typedef _Sp_ebo_helper<0, _Alloc> _A_base; │ │ │ │ +585 │ │ │ │ +586 public: │ │ │ │ +587 explicit _Impl(_Alloc __a) noexcept : _A_base(__a) { } │ │ │ │ 588 │ │ │ │ -589 /** │ │ │ │ -590 * @brief %Vector copy constructor. │ │ │ │ -591 * @param __x A %vector of identical element and allocator types. │ │ │ │ -592 * │ │ │ │ -593 * All the elements of @a __x are copied, but any unused capacity in │ │ │ │ -594 * @a __x will not be copied │ │ │ │ -595 * (i.e. capacity() == size() in the new %vector). │ │ │ │ -596 * │ │ │ │ -597 * The newly-created %vector uses a copy of the allocator object used │ │ │ │ -598 * by @a __x (unless the allocator traits dictate a different object). │ │ │ │ -599 */ │ │ │ │ -600 _GLIBCXX20_CONSTEXPR │ │ │ │ -_6_0_1 _v_e_c_t_o_r(const _v_e_c_t_o_r& __x) │ │ │ │ -602 : ___B_a_s_e(__x._s_i_z_e(), │ │ │ │ -603 ___A_l_l_o_c___t_r_a_i_t_s::_S_select_on_copy(__x._M_get_Tp_allocator())) │ │ │ │ -604 { │ │ │ │ -605 this->_M_impl._M_finish = │ │ │ │ -606 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_p_y___a(__x._b_e_g_i_n(), __x._e_n_d(), │ │ │ │ -607 _t_h_i_s->_M_impl._M_start, │ │ │ │ -608 _M_get_Tp_allocator()); │ │ │ │ -609 } │ │ │ │ -610 │ │ │ │ -611#if __cplusplus >= 201103L │ │ │ │ -612 /** │ │ │ │ -613 * @brief %Vector move constructor. │ │ │ │ -614 * │ │ │ │ -615 * The newly-created %vector contains the exact contents of the │ │ │ │ -616 * moved instance. │ │ │ │ -617 * The contents of the moved instance are a valid, but unspecified │ │ │ │ -618 * %vector. │ │ │ │ -619 */ │ │ │ │ -_6_2_0 _v_e_c_t_o_r(_v_e_c_t_o_r&&) noexcept = _d_e_f_a_u_l_t; │ │ │ │ -621 │ │ │ │ -622 /// Copy constructor with alternative allocator │ │ │ │ -623 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -_6_2_4 _v_e_c_t_o_r(const _v_e_c_t_o_r& __x, const _____t_y_p_e___i_d_e_n_t_i_t_y___t& __a) │ │ │ │ -625 : ___B_a_s_e(__x._s_i_z_e(), __a) │ │ │ │ -626 { │ │ │ │ -627 this->_M_impl._M_finish = │ │ │ │ -628 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_p_y___a(__x.begin(), __x.end(), │ │ │ │ -629 _t_h_i_s->_M_impl._M_start, │ │ │ │ -630 _M_get_Tp_allocator()); │ │ │ │ -631 } │ │ │ │ -632 │ │ │ │ -633 private: │ │ │ │ -634 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -635 _v_e_c_t_o_r(_v_e_c_t_o_r&& _____r_v, const allocator_type& _____m, _t_r_u_e___t_y_p_e) noexcept │ │ │ │ -636 : _Base(_____m, _s_t_d_:_:_m_o_v_e(_____r_v)) │ │ │ │ -637 { } │ │ │ │ -638 │ │ │ │ -639 _GLIBCXX20_CONSTEXPR │ │ │ │ -640 _v_e_c_t_o_r(_v_e_c_t_o_r&& __rv, const allocator_type& __m, _f_a_l_s_e___t_y_p_e) │ │ │ │ -641 : _Base(__m) │ │ │ │ -642 { │ │ │ │ -643 if (__rv.get_allocator() == __m) │ │ │ │ -644 this->_M_impl._M_swap_data(__rv._M_impl); │ │ │ │ -645 else if (!__rv.empty()) │ │ │ │ -646 { │ │ │ │ -647 this->_M_create_storage(__rv.size()); │ │ │ │ -648 this->_M_impl._M_finish = │ │ │ │ -649 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___a(__rv.begin(), __rv.end(), │ │ │ │ -650 this->_M_impl._M_start, │ │ │ │ -651 _M_get_Tp_allocator()); │ │ │ │ -652 __rv.clear(); │ │ │ │ -653 } │ │ │ │ -654 } │ │ │ │ -655 │ │ │ │ -656 public: │ │ │ │ -657 /// Move constructor with alternative allocator │ │ │ │ -658 _GLIBCXX20_CONSTEXPR │ │ │ │ -_6_5_9 _v_e_c_t_o_r(_v_e_c_t_o_r&& _____r_v, const _____t_y_p_e___i_d_e_n_t_i_t_y___t_<_a_l_l_o_c_a_t_o_r___t_y_p_e_>& _____m) │ │ │ │ -660 noexcept( noexcept( │ │ │ │ -661 _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_&_>(), │ │ │ │ -662 _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_>())) ) │ │ │ │ -663 : _v_e_c_t_o_r(_s_t_d_:_:_m_o_v_e(_____r_v), _____m, typename ___A_l_l_o_c___t_r_a_i_t_s_:_:_i_s___a_l_w_a_y_s___e_q_u_a_l{}) │ │ │ │ -664 { } │ │ │ │ -665 │ │ │ │ -666 /** │ │ │ │ -667 * @brief Builds a %vector from an initializer list. │ │ │ │ -668 * @param __l An initializer_list. │ │ │ │ -669 * @param __a An allocator. │ │ │ │ -670 * │ │ │ │ -671 * Create a %vector consisting of copies of the elements in the │ │ │ │ -672 * initializer_list @a __l. │ │ │ │ -673 * │ │ │ │ -674 * This will call the element type's copy constructor N times │ │ │ │ -675 * (where N is @a __l.size()) and do no memory reallocation. │ │ │ │ -676 */ │ │ │ │ -677 _GLIBCXX20_CONSTEXPR │ │ │ │ -_6_7_8 _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, │ │ │ │ -679 const allocator_type& __a = allocator_type()) │ │ │ │ -680 : ___B_a_s_e(__a) │ │ │ │ -681 { │ │ │ │ -682 _M_range_initialize(_____l.begin(), _____l.end(), │ │ │ │ -683 _r_a_n_d_o_m___a_c_c_e_s_s___i_t_e_r_a_t_o_r___t_a_g()); │ │ │ │ -684 } │ │ │ │ -685#endif │ │ │ │ -686 │ │ │ │ -687 /** │ │ │ │ -688 * @brief Builds a %vector from a range. │ │ │ │ -689 * @param __first An input iterator. │ │ │ │ -690 * @param __last An input iterator. │ │ │ │ -691 * @param __a An allocator. │ │ │ │ -692 * │ │ │ │ -693 * Create a %vector consisting of copies of the elements from │ │ │ │ -694 * [first,last). │ │ │ │ -695 * │ │ │ │ -696 * If the iterators are forward, bidirectional, or │ │ │ │ -697 * random-access, then this will call the elements' copy │ │ │ │ -698 * constructor N times (where N is distance(first,last)) and do │ │ │ │ -699 * no memory reallocation. But if only input iterators are │ │ │ │ -700 * used, then this will do at most 2N calls to the copy │ │ │ │ -701 * constructor, and logN memory reallocations. │ │ │ │ -702 */ │ │ │ │ -703#if __cplusplus >= 201103L │ │ │ │ -704 template> │ │ │ │ -706 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -_7_0_7 _v_e_c_t_o_r(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ -708 const allocator_type& __a = allocator_type()) │ │ │ │ -709 : ___B_a_s_e(__a) │ │ │ │ -710 { │ │ │ │ -711 _M_range_initialize(__first, __last, │ │ │ │ -712 _s_t_d_:_:_____i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y(__first)); │ │ │ │ -713 } │ │ │ │ -714#else │ │ │ │ -715 template │ │ │ │ -716 _v_e_c_t_o_r(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ -717 const allocator_type& __a = allocator_type()) │ │ │ │ -718 : _Base(__a) │ │ │ │ -719 { │ │ │ │ -720 // Check whether it's an integral type. If so, it's not an iterator. │ │ │ │ -721 typedef typename std::__is_integer<_InputIterator>::__type ___I_n_t_e_g_r_a_l; │ │ │ │ -722 _M_initialize_dispatch(__first, __last, ___I_n_t_e_g_r_a_l()); │ │ │ │ -723 } │ │ │ │ -724#endif │ │ │ │ -725 │ │ │ │ -726 /** │ │ │ │ -727 * The dtor only erases the elements, and note that if the │ │ │ │ -728 * elements themselves are pointers, the pointed-to memory is │ │ │ │ -729 * not touched in any way. Managing the pointer is the user's │ │ │ │ -730 * responsibility. │ │ │ │ -731 */ │ │ │ │ -732 _GLIBCXX20_CONSTEXPR │ │ │ │ -_7_3_3 _~_v_e_c_t_o_r() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ +589 _Alloc& _M_alloc() noexcept { return _A_base::_S_get(*this); } │ │ │ │ +590 │ │ │ │ +591 __gnu_cxx::__aligned_buffer<_Tp> _M_storage; │ │ │ │ +592 }; │ │ │ │ +593 │ │ │ │ +594 public: │ │ │ │ +595 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>; │ │ │ │ +596 │ │ │ │ +597 // Alloc parameter is not a reference so doesn't alias anything in __args │ │ │ │ +598 template │ │ │ │ +599 _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) │ │ │ │ +600 : _M_impl(__a) │ │ │ │ +601 { │ │ │ │ +602 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +603 // 2070. allocate_shared should use allocator_traits::construct │ │ │ │ +604 allocator_traits<_Alloc>::construct(__a, _M_ptr(), │ │ │ │ +605 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); // might throw │ │ │ │ +606 } │ │ │ │ +607 │ │ │ │ +608 ~_Sp_counted_ptr_inplace() noexcept { } │ │ │ │ +609 │ │ │ │ +610 virtual void │ │ │ │ +611 _M_dispose() noexcept │ │ │ │ +612 { │ │ │ │ +613 allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); │ │ │ │ +614 } │ │ │ │ +615 │ │ │ │ +616 // Override because the allocator needs to know the dynamic type │ │ │ │ +617 virtual void │ │ │ │ +618 _M_destroy() noexcept │ │ │ │ +619 { │ │ │ │ +620 __allocator_type __a(_M_impl._M_alloc()); │ │ │ │ +621 __allocated_ptr<__allocator_type> __guard_ptr{ __a, this }; │ │ │ │ +622 this->~_Sp_counted_ptr_inplace(); │ │ │ │ +623 } │ │ │ │ +624 │ │ │ │ +625 private: │ │ │ │ +626 friend class __shared_count<_Lp>; // To be able to call _M_ptr(). │ │ │ │ +627 │ │ │ │ +628 // No longer used, but code compiled against old libstdc++ headers │ │ │ │ +629 // might still call it from __shared_ptr ctor to get the pointer out. │ │ │ │ +630 virtual void* │ │ │ │ +631 _M_get_deleter(const _s_t_d_:_:_t_y_p_e___i_n_f_o& __ti) noexcept override │ │ │ │ +632 { │ │ │ │ +633 auto __ptr = const_cast::type*>(_M_ptr()); │ │ │ │ +634 // Check for the fake type_info first, so we don't try to access it │ │ │ │ +635 // as a real type_info object. Otherwise, check if it's the real │ │ │ │ +636 // type_info for this class. With RTTI enabled we can check directly, │ │ │ │ +637 // or call a library function to do it. │ │ │ │ +638 if (&__ti == &_Sp_make_shared_tag::_S_ti() │ │ │ │ +639 || │ │ │ │ +640#if __cpp_rtti │ │ │ │ +641 __ti == typeid(_Sp_make_shared_tag) │ │ │ │ +642#else │ │ │ │ +643 _Sp_make_shared_tag::_S_eq(__ti) │ │ │ │ +644#endif │ │ │ │ +645 ) │ │ │ │ +646 return __ptr; │ │ │ │ +647 return nullptr; │ │ │ │ +648 } │ │ │ │ +649 │ │ │ │ +650 _Tp* _M_ptr() noexcept { return _M_impl._M_storage._M_ptr(); } │ │ │ │ +651 │ │ │ │ +652 _Impl _M_impl; │ │ │ │ +653 }; │ │ │ │ +654 │ │ │ │ +655#if __cplusplus >= 202002L │ │ │ │ +656# define __cpp_lib_smart_ptr_for_overwrite 202002L │ │ │ │ +657 struct _Sp_overwrite_tag { }; │ │ │ │ +658 │ │ │ │ +659 // Partial specialization used for make_shared_for_overwrite(). │ │ │ │ +660 // This partial specialization is used when the allocator's value type │ │ │ │ +661 // is the special _Sp_overwrite_tag type. │ │ │ │ +662#if __cpp_concepts │ │ │ │ +663 template │ │ │ │ +664 requires is_same_v │ │ │ │ +665 class _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> final │ │ │ │ +666#else │ │ │ │ +667 template class _Alloc, _Lock_policy _Lp> │ │ │ │ +668 class _Sp_counted_ptr_inplace<_Tp, _Alloc<_Sp_overwrite_tag>, _Lp> final │ │ │ │ +669#endif │ │ │ │ +670 : public _Sp_counted_base<_Lp> │ │ │ │ +671 { │ │ │ │ +672 [[no_unique_address]] _Alloc _M_alloc; │ │ │ │ +673 │ │ │ │ +674 union { │ │ │ │ +675 _Tp _M_obj; │ │ │ │ +676 char _M_unused; │ │ │ │ +677 }; │ │ │ │ +678 │ │ │ │ +679 friend class __shared_count<_Lp>; // To be able to call _M_ptr(). │ │ │ │ +680 │ │ │ │ +681 _Tp* _M_ptr() noexcept { return _s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_M_obj); } │ │ │ │ +682 │ │ │ │ +683 public: │ │ │ │ +684 using __allocator_type = __alloc_rebind<_Alloc, _Sp_counted_ptr_inplace>; │ │ │ │ +685 │ │ │ │ +686 _Sp_counted_ptr_inplace(const _Alloc& __a) │ │ │ │ +687 : _M_alloc(__a) │ │ │ │ +688 { │ │ │ │ +689 ::new((void*)_M_ptr()) _Tp; // default-initialized, for overwrite. │ │ │ │ +690 } │ │ │ │ +691 │ │ │ │ +692 ~_Sp_counted_ptr_inplace() noexcept { } │ │ │ │ +693 │ │ │ │ +694 virtual void │ │ │ │ +695 _M_dispose() noexcept │ │ │ │ +696 { │ │ │ │ +697 _M_obj.~_Tp(); │ │ │ │ +698 } │ │ │ │ +699 │ │ │ │ +700 // Override because the allocator needs to know the dynamic type │ │ │ │ +701 virtual void │ │ │ │ +702 _M_destroy() noexcept │ │ │ │ +703 { │ │ │ │ +704 using pointer = typename allocator_traits<__allocator_type>::pointer; │ │ │ │ +705 __allocator_type __a(_M_alloc); │ │ │ │ +706 auto __p = pointer_traits::pointer_to(*this); │ │ │ │ +707 __allocated_ptr<__allocator_type> __guard_ptr{ __a, __p }; │ │ │ │ +708 this->~_Sp_counted_ptr_inplace(); │ │ │ │ +709 } │ │ │ │ +710 │ │ │ │ +711 void* │ │ │ │ +712 _M_get_deleter(const _s_t_d_:_:_t_y_p_e___i_n_f_o&) noexcept override │ │ │ │ +713 { return nullptr; } │ │ │ │ +714 }; │ │ │ │ +715#endif // C++20 │ │ │ │ +716 │ │ │ │ +717#if __cplusplus <= 201703L │ │ │ │ +718# define __cpp_lib_shared_ptr_arrays 201611L │ │ │ │ +719#else │ │ │ │ +720# define __cpp_lib_shared_ptr_arrays 201707L │ │ │ │ +721 │ │ │ │ +722 struct _Sp_overwrite_tag; │ │ │ │ +723 │ │ │ │ +724 // For make_shared, make_shared, allocate_shared etc. │ │ │ │ +725 template │ │ │ │ +726 struct _Sp_counted_array_base │ │ │ │ +727 { │ │ │ │ +728 [[no_unique_address]] _Alloc _M_alloc{}; │ │ │ │ +729 size_t _M_n = 0; │ │ │ │ +730 bool _M_overwrite = false; │ │ │ │ +731 │ │ │ │ +732 typename allocator_traits<_Alloc>::pointer │ │ │ │ +733 _M_alloc_array(size_t __tail) │ │ │ │ 734 { │ │ │ │ -735 _s_t_d_:_:___D_e_s_t_r_o_y(this->_M_impl._M_start, _t_h_i_s->_M_impl._M_finish, │ │ │ │ -736 _M_get_Tp_allocator()); │ │ │ │ -737 _GLIBCXX_ASAN_ANNOTATE_BEFORE_DEALLOC; │ │ │ │ -738 } │ │ │ │ -739 │ │ │ │ -740 /** │ │ │ │ -741 * @brief %Vector assignment operator. │ │ │ │ -742 * @param __x A %vector of identical element and allocator types. │ │ │ │ -743 * │ │ │ │ -744 * All the elements of @a __x are copied, but any unused capacity in │ │ │ │ -745 * @a __x will not be copied. │ │ │ │ -746 * │ │ │ │ -747 * Whether the allocator is copied depends on the allocator traits. │ │ │ │ -748 */ │ │ │ │ -749 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -750 _v_e_c_t_o_r& │ │ │ │ -_7_5_1 _o_p_e_r_a_t_o_r_=(const _v_e_c_t_o_r& __x); │ │ │ │ -752 │ │ │ │ -753#if __cplusplus >= 201103L │ │ │ │ -754 /** │ │ │ │ -755 * @brief %Vector move assignment operator. │ │ │ │ -756 * @param __x A %vector of identical element and allocator types. │ │ │ │ -757 * │ │ │ │ -758 * The contents of @a __x are moved into this %vector (without copying, │ │ │ │ -759 * if the allocators permit it). │ │ │ │ -760 * Afterwards @a __x is a valid, but unspecified %vector. │ │ │ │ -761 * │ │ │ │ -762 * Whether the allocator is moved depends on the allocator traits. │ │ │ │ -763 */ │ │ │ │ -764 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -765 _v_e_c_t_o_r& │ │ │ │ -_7_6_6 _o_p_e_r_a_t_o_r_=(_v_e_c_t_o_r&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) │ │ │ │ -767 { │ │ │ │ -768 constexpr bool _____m_o_v_e___s_t_o_r_a_g_e = │ │ │ │ -769 _Alloc_traits::_S_propagate_on_move_assign() │ │ │ │ -770 || _Alloc_traits::_S_always_equal(); │ │ │ │ -771 _M_move_assign(_s_t_d_:_:_m_o_v_e(__x), _____b_o_o_l___c_o_n_s_t_a_n_t_<_____m_o_v_e___s_t_o_r_a_g_e_>()); │ │ │ │ -772 return *this; │ │ │ │ -773 } │ │ │ │ +735 return allocator_traits<_Alloc>::allocate(_M_alloc, _M_n + __tail); │ │ │ │ +736 } │ │ │ │ +737 │ │ │ │ +738 void │ │ │ │ +739 _M_dealloc_array(typename allocator_traits<_Alloc>::pointer __p, │ │ │ │ +740 size_t __tail) │ │ │ │ +741 { │ │ │ │ +742 allocator_traits<_Alloc>::deallocate(_M_alloc, __p, _M_n + __tail); │ │ │ │ +743 } │ │ │ │ +744 │ │ │ │ +745 // Init the array elements │ │ │ │ +746 template │ │ │ │ +747 void │ │ │ │ +748 _M_init(typename allocator_traits<_Alloc>::value_type* __p, │ │ │ │ +749 _Init __init) │ │ │ │ +750 { │ │ │ │ +751 using _Tp = remove_pointer_t<_Init>; │ │ │ │ +752 using _Up = typename allocator_traits<_Alloc>::value_type; │ │ │ │ +753 │ │ │ │ +754 if constexpr (is_same_v<_Init, _Sp_overwrite_tag>) │ │ │ │ +755 { │ │ │ │ +756 _s_t_d_:_:_u_n_i_n_i_t_i_a_l_i_z_e_d___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t___n(__p, _M_n); │ │ │ │ +757 _M_overwrite = true; │ │ │ │ +758 } │ │ │ │ +759 else if (__init == nullptr) │ │ │ │ +760 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___d_e_f_a_u_l_t___n___a(__p, _M_n, _M_alloc); │ │ │ │ +761 else if constexpr (!is_array_v<_Tp>) │ │ │ │ +762 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___f_i_l_l___n___a(__p, _M_n, *__init, _M_alloc); │ │ │ │ +763 else │ │ │ │ +764 { │ │ │ │ +765#pragma GCC diagnostic push │ │ │ │ +766#pragma GCC diagnostic ignored "-Wunused-local-typedefs" │ │ │ │ +767 struct _Iter │ │ │ │ +768 { │ │ │ │ +769 using value_type = _Up; │ │ │ │ +770 using difference_type = ptrdiff_t; │ │ │ │ +771 using pointer = const _Up*; │ │ │ │ +772 using reference = const _Up&; │ │ │ │ +773 using iterator_category = forward_iterator_tag; │ │ │ │ 774 │ │ │ │ -775 /** │ │ │ │ -776 * @brief %Vector list assignment operator. │ │ │ │ -777 * @param __l An initializer_list. │ │ │ │ -778 * │ │ │ │ -779 * This function fills a %vector with copies of the elements in the │ │ │ │ -780 * initializer list @a __l. │ │ │ │ -781 * │ │ │ │ -782 * Note that the assignment completely changes the %vector and │ │ │ │ -783 * that the resulting %vector's size is the same as the number │ │ │ │ -784 * of elements assigned. │ │ │ │ -785 */ │ │ │ │ -786 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -787 _v_e_c_t_o_r& │ │ │ │ -_7_8_8 _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) │ │ │ │ -789 { │ │ │ │ -790 this->_M_assign_aux(_____l.begin(), _____l.end(), │ │ │ │ -791 _r_a_n_d_o_m___a_c_c_e_s_s___i_t_e_r_a_t_o_r___t_a_g()); │ │ │ │ -792 return *this; │ │ │ │ -793 } │ │ │ │ -794#endif │ │ │ │ -795 │ │ │ │ -796 /** │ │ │ │ -797 * @brief Assigns a given value to a %vector. │ │ │ │ -798 * @param __n Number of elements to be assigned. │ │ │ │ -799 * @param __val Value to be assigned. │ │ │ │ -800 * │ │ │ │ -801 * This function fills a %vector with @a __n copies of the given │ │ │ │ -802 * value. Note that the assignment completely changes the │ │ │ │ -803 * %vector and that the resulting %vector's size is the same as │ │ │ │ -804 * the number of elements assigned. │ │ │ │ -805 */ │ │ │ │ -806 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -807 void │ │ │ │ -_8_0_8 _a_s_s_i_g_n(size_type __n, const value_type& __val) │ │ │ │ -809 { _M_fill_assign(__n, __val); } │ │ │ │ -810 │ │ │ │ -811 /** │ │ │ │ -812 * @brief Assigns a range to a %vector. │ │ │ │ -813 * @param __first An input iterator. │ │ │ │ -814 * @param __last An input iterator. │ │ │ │ -815 * │ │ │ │ -816 * This function fills a %vector with copies of the elements in the │ │ │ │ -817 * range [__first,__last). │ │ │ │ -818 * │ │ │ │ -819 * Note that the assignment completely changes the %vector and │ │ │ │ -820 * that the resulting %vector's size is the same as the number │ │ │ │ -821 * of elements assigned. │ │ │ │ -822 */ │ │ │ │ -823#if __cplusplus >= 201103L │ │ │ │ -824 template> │ │ │ │ -826 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -827 void │ │ │ │ -_8_2_8 _a_s_s_i_g_n(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ -829 { _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)); } │ │ │ │ -830#else │ │ │ │ -831 template │ │ │ │ -832 void │ │ │ │ -833 _a_s_s_i_g_n(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ -834 { │ │ │ │ -835 // Check whether it's an integral type. If so, it's not an iterator. │ │ │ │ -836 typedef typename std::__is_integer<_InputIterator>::__type ___I_n_t_e_g_r_a_l; │ │ │ │ -837 _M_assign_dispatch(__first, __last, ___I_n_t_e_g_r_a_l()); │ │ │ │ -838 } │ │ │ │ -839#endif │ │ │ │ -840 │ │ │ │ -841#if __cplusplus >= 201103L │ │ │ │ -842 /** │ │ │ │ -843 * @brief Assigns an initializer list to a %vector. │ │ │ │ -844 * @param __l An initializer_list. │ │ │ │ -845 * │ │ │ │ -846 * This function fills a %vector with copies of the elements in the │ │ │ │ -847 * initializer list @a __l. │ │ │ │ -848 * │ │ │ │ -849 * Note that the assignment completely changes the %vector and │ │ │ │ -850 * that the resulting %vector's size is the same as the number │ │ │ │ -851 * of elements assigned. │ │ │ │ -852 */ │ │ │ │ -853 _GLIBCXX20_CONSTEXPR │ │ │ │ -854 void │ │ │ │ -_8_5_5 _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) │ │ │ │ -856 { │ │ │ │ -857 this->_M_assign_aux(_____l.begin(), _____l.end(), │ │ │ │ -858 _r_a_n_d_o_m___a_c_c_e_s_s___i_t_e_r_a_t_o_r___t_a_g()); │ │ │ │ +775 const _Up* _M_p; │ │ │ │ +776 size_t _M_len; │ │ │ │ +777 size_t _M_pos; │ │ │ │ +778 │ │ │ │ +779 _Iter& operator++() { ++_M_pos; return *this; } │ │ │ │ +780 _Iter operator++(int) { auto __i(*this); ++_M_pos; return __i; } │ │ │ │ +781 │ │ │ │ +782 reference _o_p_e_r_a_t_o_r_*() const { return _M_p[_M_pos % _M_len]; } │ │ │ │ +783 pointer operator->() const { return _M_p + (_M_pos % _M_len); } │ │ │ │ +784 │ │ │ │ +785 bool operator==(const _Iter& __i) const │ │ │ │ +786 { return _M_pos == __i._M_pos; } │ │ │ │ +787 }; │ │ │ │ +788#pragma GCC diagnostic pop │ │ │ │ +789 │ │ │ │ +790 _Iter __first{_S_first_elem(__init), sizeof(_Tp) / sizeof(_Up)}; │ │ │ │ +791 _Iter __last = __first; │ │ │ │ +792 __last._M_pos = _M_n; │ │ │ │ +793 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_p_y___a(__first, __last, __p, _M_alloc); │ │ │ │ +794 } │ │ │ │ +795 } │ │ │ │ +796 │ │ │ │ +797 protected: │ │ │ │ +798 // Destroy the array elements │ │ │ │ +799 void │ │ │ │ +800 _M_dispose_array(typename allocator_traits<_Alloc>::value_type* __p) │ │ │ │ +801 { │ │ │ │ +802 if (_M_overwrite) │ │ │ │ +803 std::destroy_n(__p, _M_n); │ │ │ │ +804 else │ │ │ │ +805 { │ │ │ │ +806 size_t __n = _M_n; │ │ │ │ +807 while (__n--) │ │ │ │ +808 allocator_traits<_Alloc>::destroy(_M_alloc, __p + __n); │ │ │ │ +809 } │ │ │ │ +810 } │ │ │ │ +811 │ │ │ │ +812 private: │ │ │ │ +813 template │ │ │ │ +814 static _Tp* │ │ │ │ +815 _S_first_elem(_Tp* __p) { return __p; } │ │ │ │ +816 │ │ │ │ +817 template │ │ │ │ +818 static auto │ │ │ │ +819 _S_first_elem(_Tp (*__p)[_Nm]) { return _S_first_elem(*__p); } │ │ │ │ +820 }; │ │ │ │ +821 │ │ │ │ +822 // Control block for make_shared, make_shared etc. that will be │ │ │ │ +823 // placed into unused memory at the end of the array. │ │ │ │ +824 template │ │ │ │ +825 class _Sp_counted_array final │ │ │ │ +826 : public _Sp_counted_base<_Lp>, _Sp_counted_array_base<_Alloc> │ │ │ │ +827 { │ │ │ │ +828 using pointer = typename allocator_traits<_Alloc>::pointer; │ │ │ │ +829 │ │ │ │ +830 pointer _M_alloc_ptr; │ │ │ │ +831 │ │ │ │ +832 auto _M_ptr() const noexcept { return _s_t_d_:_:_t_o___a_d_d_r_e_s_s(_M_alloc_ptr); } │ │ │ │ +833 │ │ │ │ +834 friend class __shared_count<_Lp>; // To be able to call _M_ptr(). │ │ │ │ +835 │ │ │ │ +836 public: │ │ │ │ +837 _Sp_counted_array(const _Sp_counted_array_base<_Alloc>& __a, │ │ │ │ +838 pointer __p) noexcept │ │ │ │ +839 : _Sp_counted_array_base<_Alloc>(__a), _M_alloc_ptr(__p) │ │ │ │ +840 { } │ │ │ │ +841 │ │ │ │ +842 ~_Sp_counted_array() = default; │ │ │ │ +843 │ │ │ │ +844 virtual void │ │ │ │ +845 _M_dispose() noexcept │ │ │ │ +846 { │ │ │ │ +847 if (this->_M_n) │ │ │ │ +848 this->_M_dispose_array(_M_ptr()); │ │ │ │ +849 } │ │ │ │ +850 │ │ │ │ +851 // Override because the allocator needs to know the dynamic type │ │ │ │ +852 virtual void │ │ │ │ +853 _M_destroy() noexcept │ │ │ │ +854 { │ │ │ │ +855 _Sp_counted_array_base<_Alloc> __a = *this; │ │ │ │ +856 pointer __p = _M_alloc_ptr; │ │ │ │ +857 this->~_Sp_counted_array(); │ │ │ │ +858 __a._M_dealloc_array(__p, _S_tail()); │ │ │ │ 859 } │ │ │ │ -860#endif │ │ │ │ -861 │ │ │ │ -862 /// Get a copy of the memory allocation object. │ │ │ │ -_8_6_3 using _Base::get_allocator; │ │ │ │ -864 │ │ │ │ -865 // iterators │ │ │ │ -866 /** │ │ │ │ -867 * Returns a read/write iterator that points to the first │ │ │ │ -868 * element in the %vector. Iteration is done in ordinary │ │ │ │ -869 * element order. │ │ │ │ -870 */ │ │ │ │ -871 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -872 iterator │ │ │ │ -_8_7_3 _b_e_g_i_n() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -874 { return iterator(this->_M_impl._M_start); } │ │ │ │ +860 │ │ │ │ +861 // Returns the number of additional array elements that must be │ │ │ │ +862 // allocated in order to store a _Sp_counted_array at the end. │ │ │ │ +863 static constexpr size_t │ │ │ │ +864 _S_tail() │ │ │ │ +865 { │ │ │ │ +866 // The array elemenent type. │ │ │ │ +867 using _Tp = typename allocator_traits<_Alloc>::value_type; │ │ │ │ +868 │ │ │ │ +869 // The space needed to store a _Sp_counted_array object. │ │ │ │ +870 size_t __bytes = sizeof(_Sp_counted_array); │ │ │ │ +871 │ │ │ │ +872 // Add any padding needed for manual alignment within the buffer. │ │ │ │ +873 if constexpr (alignof(_Tp) < alignof(_Sp_counted_array)) │ │ │ │ +874 __bytes += alignof(_Sp_counted_array) - alignof(_Tp); │ │ │ │ 875 │ │ │ │ -876 /** │ │ │ │ -877 * Returns a read-only (constant) iterator that points to the │ │ │ │ -878 * first element in the %vector. Iteration is done in ordinary │ │ │ │ -879 * element order. │ │ │ │ -880 */ │ │ │ │ -881 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -882 const_iterator │ │ │ │ -_8_8_3 _b_e_g_i_n() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -884 { return const_iterator(this->_M_impl._M_start); } │ │ │ │ -885 │ │ │ │ -886 /** │ │ │ │ -887 * Returns a read/write iterator that points one past the last │ │ │ │ -888 * element in the %vector. Iteration is done in ordinary │ │ │ │ -889 * element order. │ │ │ │ -890 */ │ │ │ │ -891 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -892 _i_t_e_r_a_t_o_r │ │ │ │ -_8_9_3 _e_n_d() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -894 { return iterator(this->_M_impl._M_finish); } │ │ │ │ -895 │ │ │ │ -896 /** │ │ │ │ -897 * Returns a read-only (constant) iterator that points one past │ │ │ │ -898 * the last element in the %vector. Iteration is done in │ │ │ │ -899 * ordinary element order. │ │ │ │ -900 */ │ │ │ │ -901 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -902 const_iterator │ │ │ │ -_9_0_3 _e_n_d() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -904 { return const_iterator(this->_M_impl._M_finish); } │ │ │ │ -905 │ │ │ │ -906 /** │ │ │ │ -907 * Returns a read/write reverse iterator that points to the │ │ │ │ -908 * last element in the %vector. Iteration is done in reverse │ │ │ │ -909 * element order. │ │ │ │ -910 */ │ │ │ │ -911 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -912 _r_e_v_e_r_s_e___i_t_e_r_a_t_o_r │ │ │ │ -_9_1_3 _r_b_e_g_i_n() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -914 { return _r_e_v_e_r_s_e___i_t_e_r_a_t_o_r(_e_n_d()); } │ │ │ │ -915 │ │ │ │ -916 /** │ │ │ │ -917 * Returns a read-only (constant) reverse iterator that points │ │ │ │ -918 * to the last element in the %vector. Iteration is done in │ │ │ │ -919 * reverse element order. │ │ │ │ -920 */ │ │ │ │ -921 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -922 const_reverse_iterator │ │ │ │ -_9_2_3 _r_b_e_g_i_n() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -924 { return _c_o_n_s_t___r_e_v_e_r_s_e___i_t_e_r_a_t_o_r(_e_n_d()); } │ │ │ │ +876 return (__bytes + sizeof(_Tp) - 1) / sizeof(_Tp); │ │ │ │ +877 } │ │ │ │ +878 │ │ │ │ +879 void* │ │ │ │ +880 _M_get_deleter(const _s_t_d_:_:_t_y_p_e___i_n_f_o&) noexcept override │ │ │ │ +881 { return nullptr; } │ │ │ │ +882 }; │ │ │ │ +883#endif // C++20 │ │ │ │ +884 │ │ │ │ +885 // The default deleter for shared_ptr and shared_ptr. │ │ │ │ +886 struct __sp_array_delete │ │ │ │ +887 { │ │ │ │ +888 template │ │ │ │ +889 void operator()(_Yp* __p) const { delete[] __p; } │ │ │ │ +890 }; │ │ │ │ +891 │ │ │ │ +892 template<_Lock_policy _Lp> │ │ │ │ +893 class __shared_count │ │ │ │ +894 { │ │ │ │ +895 // Prevent _Sp_alloc_shared_tag from matching the shared_ptr(P, D) ctor. │ │ │ │ +896 template │ │ │ │ +897 struct __not_alloc_shared_tag { using type = void; }; │ │ │ │ +898 │ │ │ │ +899 template │ │ │ │ +900 struct __not_alloc_shared_tag<_Sp_alloc_shared_tag<_Tp>> { }; │ │ │ │ +901 │ │ │ │ +902#if __cpp_lib_shared_ptr_arrays >= 201707L │ │ │ │ +903 template │ │ │ │ +904 struct __not_alloc_shared_tag<_Sp_counted_array_base<_Alloc>> { }; │ │ │ │ +905#endif │ │ │ │ +906 │ │ │ │ +907 public: │ │ │ │ +908 constexpr __shared_count() noexcept : _M_pi(0) │ │ │ │ +909 { } │ │ │ │ +910 │ │ │ │ +911 template │ │ │ │ +912 explicit │ │ │ │ +913 __shared_count(_Ptr __p) : _M_pi(0) │ │ │ │ +914 { │ │ │ │ +915 __try │ │ │ │ +916 { │ │ │ │ +917 _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p); │ │ │ │ +918 } │ │ │ │ +919 __catch(...) │ │ │ │ +920 { │ │ │ │ +921 delete __p; │ │ │ │ +922 __throw_exception_again; │ │ │ │ +923 } │ │ │ │ +924 } │ │ │ │ 925 │ │ │ │ -926 /** │ │ │ │ -927 * Returns a read/write reverse iterator that points to one │ │ │ │ -928 * before the first element in the %vector. Iteration is done │ │ │ │ -929 * in reverse element order. │ │ │ │ -930 */ │ │ │ │ -931 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -932 _r_e_v_e_r_s_e___i_t_e_r_a_t_o_r │ │ │ │ -_9_3_3 _r_e_n_d() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -934 { return _r_e_v_e_r_s_e___i_t_e_r_a_t_o_r(_b_e_g_i_n()); } │ │ │ │ +926 template │ │ │ │ +927 __shared_count(_Ptr __p, /* is_array = */ false_type) │ │ │ │ +928 : __shared_count(__p) │ │ │ │ +929 { } │ │ │ │ +930 │ │ │ │ +931 template │ │ │ │ +932 __shared_count(_Ptr __p, /* is_array = */ true_type) │ │ │ │ +933 : __shared_count(__p, __sp_array_delete{}, allocator()) │ │ │ │ +934 { } │ │ │ │ 935 │ │ │ │ -936 /** │ │ │ │ -937 * Returns a read-only (constant) reverse iterator that points │ │ │ │ -938 * to one before the first element in the %vector. Iteration │ │ │ │ -939 * is done in reverse element order. │ │ │ │ -940 */ │ │ │ │ -941 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -942 const_reverse_iterator │ │ │ │ -_9_4_3 _r_e_n_d() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -944 { return _c_o_n_s_t___r_e_v_e_r_s_e___i_t_e_r_a_t_o_r(_b_e_g_i_n()); } │ │ │ │ -945 │ │ │ │ -946#if __cplusplus >= 201103L │ │ │ │ -947 /** │ │ │ │ -948 * Returns a read-only (constant) iterator that points to the │ │ │ │ -949 * first element in the %vector. Iteration is done in ordinary │ │ │ │ -950 * element order. │ │ │ │ -951 */ │ │ │ │ -952 [[_____n_o_d_i_s_c_a_r_d____]] ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -953 const_iterator │ │ │ │ -_9_5_4 _c_b_e_g_i_n() const noexcept │ │ │ │ -955 { return const_iterator(this->_M_impl._M_start); } │ │ │ │ -956 │ │ │ │ -957 /** │ │ │ │ -958 * Returns a read-only (constant) iterator that points one past │ │ │ │ -959 * the last element in the %vector. Iteration is done in │ │ │ │ -960 * ordinary element order. │ │ │ │ -961 */ │ │ │ │ -962 [[_____n_o_d_i_s_c_a_r_d____]] ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -963 const_iterator │ │ │ │ -_9_6_4 _c_e_n_d() const noexcept │ │ │ │ -965 { return const_iterator(this->_M_impl._M_finish); } │ │ │ │ -966 │ │ │ │ -967 /** │ │ │ │ -968 * Returns a read-only (constant) reverse iterator that points │ │ │ │ -969 * to the last element in the %vector. Iteration is done in │ │ │ │ -970 * reverse element order. │ │ │ │ -971 */ │ │ │ │ -972 [[_____n_o_d_i_s_c_a_r_d____]] ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -973 const_reverse_iterator │ │ │ │ -_9_7_4 _c_r_b_e_g_i_n() const noexcept │ │ │ │ -975 { return _c_o_n_s_t___r_e_v_e_r_s_e___i_t_e_r_a_t_o_r(_e_n_d()); } │ │ │ │ -976 │ │ │ │ -977 /** │ │ │ │ -978 * Returns a read-only (constant) reverse iterator that points │ │ │ │ -979 * to one before the first element in the %vector. Iteration │ │ │ │ -980 * is done in reverse element order. │ │ │ │ -981 */ │ │ │ │ -982 [[_____n_o_d_i_s_c_a_r_d____]] ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -983 const_reverse_iterator │ │ │ │ -_9_8_4 _c_r_e_n_d() const noexcept │ │ │ │ -985 { return _c_o_n_s_t___r_e_v_e_r_s_e___i_t_e_r_a_t_o_r(_b_e_g_i_n()); } │ │ │ │ -986#endif │ │ │ │ -987 │ │ │ │ -988 // [23.2.4.2] capacity │ │ │ │ -989 /** Returns the number of elements in the %vector. */ │ │ │ │ -990 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -991 size_type │ │ │ │ -_9_9_2 _s_i_z_e() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -993 { return size_type(this->_M_impl._M_finish - _t_h_i_s->_M_impl._M_start); } │ │ │ │ -994 │ │ │ │ -995 /** Returns the size() of the largest possible %vector. */ │ │ │ │ -996 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -997 size_type │ │ │ │ -_9_9_8 _m_a_x___s_i_z_e() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -999 { return _S_max_size(_M_get_Tp_allocator()); } │ │ │ │ -1000 │ │ │ │ -1001#if __cplusplus >= 201103L │ │ │ │ -1002 /** │ │ │ │ -1003 * @brief Resizes the %vector to the specified number of elements. │ │ │ │ -1004 * @param __new_size Number of elements the %vector should contain. │ │ │ │ -1005 * │ │ │ │ -1006 * This function will %resize the %vector to the specified │ │ │ │ -1007 * number of elements. If the number is smaller than the │ │ │ │ -1008 * %vector's current size the %vector is truncated, otherwise │ │ │ │ -1009 * default constructed elements are appended. │ │ │ │ -1010 */ │ │ │ │ -1011 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1012 void │ │ │ │ -_1_0_1_3 _r_e_s_i_z_e(size_type _____n_e_w___s_i_z_e) │ │ │ │ -1014 { │ │ │ │ -1015 if (_____n_e_w___s_i_z_e > _s_i_z_e()) │ │ │ │ -1016 _M_default_append(_____n_e_w___s_i_z_e - _s_i_z_e()); │ │ │ │ -1017 else if (_____n_e_w___s_i_z_e < _s_i_z_e()) │ │ │ │ -1018 _M_erase_at_end(this->_M_impl._M_start + _____n_e_w___s_i_z_e); │ │ │ │ -1019 } │ │ │ │ -1020 │ │ │ │ -1021 /** │ │ │ │ -1022 * @brief Resizes the %vector to the specified number of elements. │ │ │ │ -1023 * @param __new_size Number of elements the %vector should contain. │ │ │ │ -1024 * @param __x Data with which new elements should be populated. │ │ │ │ -1025 * │ │ │ │ -1026 * This function will %resize the %vector to the specified │ │ │ │ -1027 * number of elements. If the number is smaller than the │ │ │ │ -1028 * %vector's current size the %vector is truncated, otherwise │ │ │ │ -1029 * the %vector is extended and new elements are populated with │ │ │ │ -1030 * given data. │ │ │ │ -1031 */ │ │ │ │ -1032 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1033 void │ │ │ │ -_1_0_3_4 _r_e_s_i_z_e(size_type _____n_e_w___s_i_z_e, const value_type& __x) │ │ │ │ -1035 { │ │ │ │ -1036 if (_____n_e_w___s_i_z_e > _s_i_z_e()) │ │ │ │ -1037 _M_fill_insert(_e_n_d(), _____n_e_w___s_i_z_e - _s_i_z_e(), __x); │ │ │ │ -1038 else if (_____n_e_w___s_i_z_e < _s_i_z_e()) │ │ │ │ -1039 _M_erase_at_end(this->_M_impl._M_start + _____n_e_w___s_i_z_e); │ │ │ │ -1040 } │ │ │ │ -1041#else │ │ │ │ -1042 /** │ │ │ │ -1043 * @brief Resizes the %vector to the specified number of elements. │ │ │ │ -1044 * @param __new_size Number of elements the %vector should contain. │ │ │ │ -1045 * @param __x Data with which new elements should be populated. │ │ │ │ -1046 * │ │ │ │ -1047 * This function will %resize the %vector to the specified │ │ │ │ -1048 * number of elements. If the number is smaller than the │ │ │ │ -1049 * %vector's current size the %vector is truncated, otherwise │ │ │ │ -1050 * the %vector is extended and new elements are populated with │ │ │ │ -1051 * given data. │ │ │ │ -1052 */ │ │ │ │ -1053 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1054 void │ │ │ │ -1055 _r_e_s_i_z_e(size_type _____n_e_w___s_i_z_e, value_type __x = value_type()) │ │ │ │ -1056 { │ │ │ │ -1057 if (_____n_e_w___s_i_z_e > _s_i_z_e()) │ │ │ │ -1058 _M_fill_insert(_e_n_d(), _____n_e_w___s_i_z_e - _s_i_z_e(), __x); │ │ │ │ -1059 else if (_____n_e_w___s_i_z_e < _s_i_z_e()) │ │ │ │ -1060 _M_erase_at_end(this->_M_impl._M_start + _____n_e_w___s_i_z_e); │ │ │ │ -1061 } │ │ │ │ -1062#endif │ │ │ │ +936 template::type> │ │ │ │ +938 __shared_count(_Ptr __p, _Deleter __d) │ │ │ │ +939 : __shared_count(__p, _s_t_d::move(__d), allocator()) │ │ │ │ +940 { } │ │ │ │ +941 │ │ │ │ +942 template::type> │ │ │ │ +944 __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0) │ │ │ │ +945 { │ │ │ │ +946 typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; │ │ │ │ +947 __try │ │ │ │ +948 { │ │ │ │ +949 typename _Sp_cd_type::__allocator_type __a2(__a); │ │ │ │ +950 auto __guard = _s_t_d_:_:_____a_l_l_o_c_a_t_e___g_u_a_r_d_e_d(__a2); │ │ │ │ +951 _Sp_cd_type* __mem = __guard.get(); │ │ │ │ +952 ::new (__mem) _Sp_cd_type(__p, _s_t_d_:_:_m_o_v_e(__d), _s_t_d_:_:_m_o_v_e(__a)); │ │ │ │ +953 _M_pi = __mem; │ │ │ │ +954 __guard = nullptr; │ │ │ │ +955 } │ │ │ │ +956 __catch(...) │ │ │ │ +957 { │ │ │ │ +958 __d(__p); // Call _Deleter on __p. │ │ │ │ +959 __throw_exception_again; │ │ │ │ +960 } │ │ │ │ +961 } │ │ │ │ +962 │ │ │ │ +963 template │ │ │ │ +964 __shared_count(_Tp*& __p, _Sp_alloc_shared_tag<_Alloc> __a, │ │ │ │ +965 _Args&&... __args) │ │ │ │ +966 { │ │ │ │ +967 typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type; │ │ │ │ +968 typename _Sp_cp_type::__allocator_type __a2(__a._M_a); │ │ │ │ +969 auto __guard = _s_t_d_:_:_____a_l_l_o_c_a_t_e___g_u_a_r_d_e_d(__a2); │ │ │ │ +970 _Sp_cp_type* __mem = __guard.get(); │ │ │ │ +971 auto __pi = ::new (__mem) │ │ │ │ +972 _Sp_cp_type(__a._M_a, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +973 __guard = nullptr; │ │ │ │ +974 _M_pi = __pi; │ │ │ │ +975 __p = __pi->_M_ptr(); │ │ │ │ +976 } │ │ │ │ +977 │ │ │ │ +978#if __cpp_lib_shared_ptr_arrays >= 201707L │ │ │ │ +979 template │ │ │ │ +980 __shared_count(_Tp*& __p, const _Sp_counted_array_base<_Alloc>& __a, │ │ │ │ +981 _Init __init) │ │ │ │ +982 { │ │ │ │ +983 using _Up = remove_all_extents_t<_Tp>; │ │ │ │ +984 static_assert(is_same_v<_Up, typename _Alloc::value_type>); │ │ │ │ +985 │ │ │ │ +986 using _Sp_ca_type = _Sp_counted_array<_Alloc, _Lp>; │ │ │ │ +987 const size_t __tail = _Sp_ca_type::_S_tail(); │ │ │ │ +988 │ │ │ │ +989 struct _Guarded_ptr : _Sp_counted_array_base<_Alloc> │ │ │ │ +990 { │ │ │ │ +991 typename allocator_traits<_Alloc>::pointer _M_ptr; │ │ │ │ +992 │ │ │ │ +993 _Guarded_ptr(_Sp_counted_array_base<_Alloc> __a) │ │ │ │ +994 : _Sp_counted_array_base<_Alloc>(__a), │ │ │ │ +995 _M_ptr(this->_M_alloc_array(_Sp_ca_type::_S_tail())) │ │ │ │ +996 { } │ │ │ │ +997 │ │ │ │ +998 ~_Guarded_ptr() │ │ │ │ +999 { │ │ │ │ +1000 if (_M_ptr) │ │ │ │ +1001 this->_M_dealloc_array(_M_ptr, _Sp_ca_type::_S_tail()); │ │ │ │ +1002 } │ │ │ │ +1003 }; │ │ │ │ +1004 │ │ │ │ +1005 _Guarded_ptr __guard{__a}; │ │ │ │ +1006 _Up* const __raw = _s_t_d_:_:_t_o___a_d_d_r_e_s_s(__guard._M_ptr); │ │ │ │ +1007 __guard._M_init(__raw, __init); // might throw │ │ │ │ +1008 │ │ │ │ +1009 void* __c = __raw + __a._M_n; │ │ │ │ +1010 if constexpr (alignof(_Up) < alignof(_Sp_ca_type)) │ │ │ │ +1011 { │ │ │ │ +1012 size_t __space = sizeof(_Up) * __tail; │ │ │ │ +1013 __c = _s_t_d_:_:_a_l_i_g_n(alignof(_Sp_ca_type), sizeof(_Sp_ca_type), │ │ │ │ +1014 __c, __space); │ │ │ │ +1015 } │ │ │ │ +1016 auto __pi = ::new(__c) _Sp_ca_type(__guard, __guard._M_ptr); │ │ │ │ +1017 __guard._M_ptr = nullptr; │ │ │ │ +1018 _M_pi = __pi; │ │ │ │ +1019 __p = reinterpret_cast<_Tp*>(__raw); │ │ │ │ +1020 } │ │ │ │ +1021#endif │ │ │ │ +1022 │ │ │ │ +1023#if _GLIBCXX_USE_DEPRECATED │ │ │ │ +1024#pragma GCC diagnostic push │ │ │ │ +1025#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +1026 // Special case for auto_ptr<_Tp> to provide the strong guarantee. │ │ │ │ +1027 template │ │ │ │ +1028 explicit │ │ │ │ +1029 __shared_count(_s_t_d_:_:_a_u_t_o___p_t_r_<___T_p_>&& __r); │ │ │ │ +1030#pragma GCC diagnostic pop │ │ │ │ +1031#endif │ │ │ │ +1032 │ │ │ │ +1033 // Special case for unique_ptr<_Tp,_Del> to provide the strong guarantee. │ │ │ │ +1034 template │ │ │ │ +1035 explicit │ │ │ │ +1036 __shared_count(_s_t_d_:_:_u_n_i_q_u_e___p_t_r_<___T_p_,_ ___D_e_l_>&& __r) : _M_pi(0) │ │ │ │ +1037 { │ │ │ │ +1038 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +1039 // 2415. Inconsistency between unique_ptr and shared_ptr │ │ │ │ +1040 if (__r.get() == nullptr) │ │ │ │ +1041 return; │ │ │ │ +1042 │ │ │ │ +1043 using _Ptr = typename unique_ptr<_Tp, _Del>::pointer; │ │ │ │ +1044 using _Del2 = __conditional_t::value, │ │ │ │ +1045 reference_wrapper::type>, │ │ │ │ +1046 _Del>; │ │ │ │ +1047 using _Sp_cd_type │ │ │ │ +1048 = _Sp_counted_deleter<_Ptr, _Del2, allocator, _Lp>; │ │ │ │ +1049 using _Alloc = allocator<_Sp_cd_type>; │ │ │ │ +1050 using _Alloc_traits = allocator_traits<_Alloc>; │ │ │ │ +1051 _Alloc __a; │ │ │ │ +1052 _Sp_cd_type* __mem = _Alloc_traits::allocate(__a, 1); │ │ │ │ +1053 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ +1054 // 3548. shared_ptr construction from unique_ptr should move │ │ │ │ +1055 // (not copy) the deleter │ │ │ │ +1056 _Alloc_traits::construct(__a, __mem, __r.release(), │ │ │ │ +1057 _s_t_d_:_:_f_o_r_w_a_r_d_<___D_e_l_>(__r.get_deleter())); │ │ │ │ +1058 _M_pi = __mem; │ │ │ │ +1059 } │ │ │ │ +1060 │ │ │ │ +1061 // Throw bad_weak_ptr when __r._M_get_use_count() == 0. │ │ │ │ +1062 explicit __shared_count(const __weak_count<_Lp>& __r); │ │ │ │ 1063 │ │ │ │ -1064#if __cplusplus >= 201103L │ │ │ │ -1065 /** A non-binding request to reduce capacity() to size(). */ │ │ │ │ -1066 _GLIBCXX20_CONSTEXPR │ │ │ │ -1067 void │ │ │ │ -_1_0_6_8 _s_h_r_i_n_k___t_o___f_i_t() │ │ │ │ -1069 { _M_shrink_to_fit(); } │ │ │ │ -1070#endif │ │ │ │ -1071 │ │ │ │ -1072 /** │ │ │ │ -1073 * Returns the total number of elements that the %vector can │ │ │ │ -1074 * hold before needing to allocate more memory. │ │ │ │ -1075 */ │ │ │ │ -1076 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1077 size_type │ │ │ │ -_1_0_7_8 _c_a_p_a_c_i_t_y() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -1079 { return size_type(this->_M_impl._M_end_of_storage │ │ │ │ -1080 - _t_h_i_s->_M_impl._M_start); } │ │ │ │ -1081 │ │ │ │ -1082 /** │ │ │ │ -1083 * Returns true if the %vector is empty. (Thus begin() would │ │ │ │ -1084 * equal end().) │ │ │ │ -1085 */ │ │ │ │ -1086 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1087 bool │ │ │ │ -_1_0_8_8 _e_m_p_t_y() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -1089 { return _b_e_g_i_n() == _e_n_d(); } │ │ │ │ -1090 │ │ │ │ -1091 /** │ │ │ │ -1092 * @brief Attempt to preallocate enough memory for specified number of │ │ │ │ -1093 * elements. │ │ │ │ -1094 * @param __n Number of elements required. │ │ │ │ -1095 * @throw std::length_error If @a n exceeds @c max_size(). │ │ │ │ -1096 * │ │ │ │ -1097 * This function attempts to reserve enough memory for the │ │ │ │ -1098 * %vector to hold the specified number of elements. If the │ │ │ │ -1099 * number requested is more than max_size(), length_error is │ │ │ │ -1100 * thrown. │ │ │ │ -1101 * │ │ │ │ -1102 * The advantage of this function is that if optimal code is a │ │ │ │ -1103 * necessity and the user can determine the number of elements │ │ │ │ -1104 * that will be required, the user can reserve the memory in │ │ │ │ -1105 * %advance, and thus prevent a possible reallocation of memory │ │ │ │ -1106 * and copying of %vector data. │ │ │ │ -1107 */ │ │ │ │ -1108 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1109 void │ │ │ │ -1110 _r_e_s_e_r_v_e(size_type __n); │ │ │ │ +1064 // Does not throw if __r._M_get_use_count() == 0, caller must check. │ │ │ │ +1065 explicit │ │ │ │ +1066 __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) noexcept; │ │ │ │ +1067 │ │ │ │ +1068 ~__shared_count() noexcept │ │ │ │ +1069 { │ │ │ │ +1070 if (_M_pi != nullptr) │ │ │ │ +1071 _M_pi->_M_release(); │ │ │ │ +1072 } │ │ │ │ +1073 │ │ │ │ +1074 __shared_count(const __shared_count& __r) noexcept │ │ │ │ +1075 : _M_pi(__r._M_pi) │ │ │ │ +1076 { │ │ │ │ +1077 if (_M_pi != nullptr) │ │ │ │ +1078 _M_pi->_M_add_ref_copy(); │ │ │ │ +1079 } │ │ │ │ +1080 │ │ │ │ +1081 __shared_count& │ │ │ │ +1082 operator=(const __shared_count& __r) noexcept │ │ │ │ +1083 { │ │ │ │ +1084 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +1085 if (__tmp != _M_pi) │ │ │ │ +1086 { │ │ │ │ +1087 if (__tmp != nullptr) │ │ │ │ +1088 __tmp->_M_add_ref_copy(); │ │ │ │ +1089 if (_M_pi != nullptr) │ │ │ │ +1090 _M_pi->_M_release(); │ │ │ │ +1091 _M_pi = __tmp; │ │ │ │ +1092 } │ │ │ │ +1093 return *this; │ │ │ │ +1094 } │ │ │ │ +1095 │ │ │ │ +1096 void │ │ │ │ +1097 _M_swap(__shared_count& __r) noexcept │ │ │ │ +1098 { │ │ │ │ +1099 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +1100 __r._M_pi = _M_pi; │ │ │ │ +1101 _M_pi = __tmp; │ │ │ │ +1102 } │ │ │ │ +1103 │ │ │ │ +1104 long │ │ │ │ +1105 _M_get_use_count() const noexcept │ │ │ │ +1106 { return _M_pi ? _M_pi->_M_get_use_count() : 0; } │ │ │ │ +1107 │ │ │ │ +1108 bool │ │ │ │ +1109 _M_unique() const noexcept │ │ │ │ +1110 { return this->_M_get_use_count() == 1; } │ │ │ │ 1111 │ │ │ │ -1112 // element access │ │ │ │ -1113 /** │ │ │ │ -1114 * @brief Subscript access to the data contained in the %vector. │ │ │ │ -1115 * @param __n The index of the element for which data should be │ │ │ │ -1116 * accessed. │ │ │ │ -1117 * @return Read/write reference to data. │ │ │ │ -1118 * │ │ │ │ -1119 * This operator allows for easy, array-style, data access. │ │ │ │ -1120 * Note that data access with this operator is unchecked and │ │ │ │ -1121 * out_of_range lookups are not defined. (For checked lookups │ │ │ │ -1122 * see at().) │ │ │ │ -1123 */ │ │ │ │ -1124 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1125 reference │ │ │ │ -_1_1_2_6 _o_p_e_r_a_t_o_r_[_](size_type __n) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -1127 { │ │ │ │ -1128 __glibcxx_requires_subscript(__n); │ │ │ │ -1129 return *(this->_M_impl._M_start + __n); │ │ │ │ -1130 } │ │ │ │ -1131 │ │ │ │ -1132 /** │ │ │ │ -1133 * @brief Subscript access to the data contained in the %vector. │ │ │ │ -1134 * @param __n The index of the element for which data should be │ │ │ │ -1135 * accessed. │ │ │ │ -1136 * @return Read-only (constant) reference to data. │ │ │ │ -1137 * │ │ │ │ -1138 * This operator allows for easy, array-style, data access. │ │ │ │ -1139 * Note that data access with this operator is unchecked and │ │ │ │ -1140 * out_of_range lookups are not defined. (For checked lookups │ │ │ │ -1141 * see at().) │ │ │ │ -1142 */ │ │ │ │ -1143 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1144 const_reference │ │ │ │ -_1_1_4_5 _o_p_e_r_a_t_o_r_[_](size_type __n) const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -1146 { │ │ │ │ -1147 __glibcxx_requires_subscript(__n); │ │ │ │ -1148 return *(this->_M_impl._M_start + __n); │ │ │ │ -1149 } │ │ │ │ -1150 │ │ │ │ -1151 protected: │ │ │ │ -1152 /// Safety check used only from at(). │ │ │ │ -1153 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1154 void │ │ │ │ -_1_1_5_5 ___M___r_a_n_g_e___c_h_e_c_k(size_type __n) const │ │ │ │ -1156 { │ │ │ │ -1157 if (__n >= this->_s_i_z_e()) │ │ │ │ -1158 __throw_out_of_range_fmt(__N("vector::_M_range_check: __n " │ │ │ │ -1159 "(which is %zu) >= this->size() " │ │ │ │ -1160 "(which is %zu)"), │ │ │ │ -1161 __n, this->_s_i_z_e()); │ │ │ │ -1162 } │ │ │ │ +1112 void* │ │ │ │ +1113 _M_get_deleter(const _s_t_d_:_:_t_y_p_e___i_n_f_o& __ti) const noexcept │ │ │ │ +1114 { return _M_pi ? _M_pi->_M_get_deleter(__ti) : nullptr; } │ │ │ │ +1115 │ │ │ │ +1116 bool │ │ │ │ +1117 _M_less(const __shared_count& __rhs) const noexcept │ │ │ │ +1118 { return _s_t_d_:_:_l_e_s_s_<___S_p___c_o_u_n_t_e_d___b_a_s_e_<___L_p_>*>()(this->_M_pi, __rhs._M_pi); } │ │ │ │ +1119 │ │ │ │ +1120 bool │ │ │ │ +1121 _M_less(const __weak_count<_Lp>& __rhs) const noexcept │ │ │ │ +1122 { return _s_t_d_:_:_l_e_s_s_<___S_p___c_o_u_n_t_e_d___b_a_s_e_<___L_p_>*>()(this->_M_pi, __rhs._M_pi); } │ │ │ │ +1123 │ │ │ │ +1124 // Friend function injected into enclosing namespace and found by ADL │ │ │ │ +1125 friend inline bool │ │ │ │ +1126 operator==(const __shared_count& __a, const __shared_count& __b) noexcept │ │ │ │ +1127 { return __a._M_pi == __b._M_pi; } │ │ │ │ +1128 │ │ │ │ +1129 private: │ │ │ │ +1130 friend class __weak_count<_Lp>; │ │ │ │ +1131#if __cplusplus >= 202002L │ │ │ │ +1132 template friend class _Sp_atomic; │ │ │ │ +1133#endif │ │ │ │ +1134 │ │ │ │ +1135 _Sp_counted_base<_Lp>* _M_pi; │ │ │ │ +1136 }; │ │ │ │ +1137 │ │ │ │ +1138 │ │ │ │ +1139 template<_Lock_policy _Lp> │ │ │ │ +1140 class __weak_count │ │ │ │ +1141 { │ │ │ │ +1142 public: │ │ │ │ +1143 constexpr __weak_count() noexcept : _M_pi(nullptr) │ │ │ │ +1144 { } │ │ │ │ +1145 │ │ │ │ +1146 __weak_count(const __shared_count<_Lp>& __r) noexcept │ │ │ │ +1147 : _M_pi(__r._M_pi) │ │ │ │ +1148 { │ │ │ │ +1149 if (_M_pi != nullptr) │ │ │ │ +1150 _M_pi->_M_weak_add_ref(); │ │ │ │ +1151 } │ │ │ │ +1152 │ │ │ │ +1153 __weak_count(const __weak_count& __r) noexcept │ │ │ │ +1154 : _M_pi(__r._M_pi) │ │ │ │ +1155 { │ │ │ │ +1156 if (_M_pi != nullptr) │ │ │ │ +1157 _M_pi->_M_weak_add_ref(); │ │ │ │ +1158 } │ │ │ │ +1159 │ │ │ │ +1160 __weak_count(__weak_count&& __r) noexcept │ │ │ │ +1161 : _M_pi(__r._M_pi) │ │ │ │ +1162 { __r._M_pi = nullptr; } │ │ │ │ 1163 │ │ │ │ -1164 public: │ │ │ │ -1165 /** │ │ │ │ -1166 * @brief Provides access to the data contained in the %vector. │ │ │ │ -1167 * @param __n The index of the element for which data should be │ │ │ │ -1168 * accessed. │ │ │ │ -1169 * @return Read/write reference to data. │ │ │ │ -1170 * @throw std::out_of_range If @a __n is an invalid index. │ │ │ │ -1171 * │ │ │ │ -1172 * This function provides for safer data access. The parameter │ │ │ │ -1173 * is first checked that it is in the range of the vector. The │ │ │ │ -1174 * function throws out_of_range if the check fails. │ │ │ │ -1175 */ │ │ │ │ -1176 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1177 reference │ │ │ │ -_1_1_7_8 _a_t(size_type __n) │ │ │ │ -1179 { │ │ │ │ -1180 ___M___r_a_n_g_e___c_h_e_c_k(__n); │ │ │ │ -1181 return (*this)[__n]; │ │ │ │ -1182 } │ │ │ │ -1183 │ │ │ │ -1184 /** │ │ │ │ -1185 * @brief Provides access to the data contained in the %vector. │ │ │ │ -1186 * @param __n The index of the element for which data should be │ │ │ │ -1187 * accessed. │ │ │ │ -1188 * @return Read-only (constant) reference to data. │ │ │ │ -1189 * @throw std::out_of_range If @a __n is an invalid index. │ │ │ │ -1190 * │ │ │ │ -1191 * This function provides for safer data access. The parameter │ │ │ │ -1192 * is first checked that it is in the range of the vector. The │ │ │ │ -1193 * function throws out_of_range if the check fails. │ │ │ │ -1194 */ │ │ │ │ -1195 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1196 const_reference │ │ │ │ -_1_1_9_7 _a_t(size_type __n) const │ │ │ │ -1198 { │ │ │ │ -1199 ___M___r_a_n_g_e___c_h_e_c_k(__n); │ │ │ │ -1200 return (*this)[__n]; │ │ │ │ -1201 } │ │ │ │ -1202 │ │ │ │ -1203 /** │ │ │ │ -1204 * Returns a read/write reference to the data at the first │ │ │ │ -1205 * element of the %vector. │ │ │ │ -1206 */ │ │ │ │ -1207 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1208 reference │ │ │ │ -_1_2_0_9 _f_r_o_n_t() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -1210 { │ │ │ │ -1211 __glibcxx_requires_nonempty(); │ │ │ │ -1212 return *_b_e_g_i_n(); │ │ │ │ -1213 } │ │ │ │ -1214 │ │ │ │ -1215 /** │ │ │ │ -1216 * Returns a read-only (constant) reference to the data at the first │ │ │ │ -1217 * element of the %vector. │ │ │ │ -1218 */ │ │ │ │ -1219 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1220 const_reference │ │ │ │ -_1_2_2_1 _f_r_o_n_t() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -1222 { │ │ │ │ -1223 __glibcxx_requires_nonempty(); │ │ │ │ -1224 return *_b_e_g_i_n(); │ │ │ │ -1225 } │ │ │ │ -1226 │ │ │ │ -1227 /** │ │ │ │ -1228 * Returns a read/write reference to the data at the last │ │ │ │ -1229 * element of the %vector. │ │ │ │ -1230 */ │ │ │ │ -1231 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1232 reference │ │ │ │ -_1_2_3_3 _b_a_c_k() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -1234 { │ │ │ │ -1235 __glibcxx_requires_nonempty(); │ │ │ │ -1236 return *(_e_n_d() - 1); │ │ │ │ -1237 } │ │ │ │ -1238 │ │ │ │ -1239 /** │ │ │ │ -1240 * Returns a read-only (constant) reference to the data at the │ │ │ │ -1241 * last element of the %vector. │ │ │ │ -1242 */ │ │ │ │ -1243 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1244 const_reference │ │ │ │ -_1_2_4_5 _b_a_c_k() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -1246 { │ │ │ │ -1247 __glibcxx_requires_nonempty(); │ │ │ │ -1248 return *(_e_n_d() - 1); │ │ │ │ -1249 } │ │ │ │ -1250 │ │ │ │ -1251 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -1252 // DR 464. Suggestion for new member functions in standard containers. │ │ │ │ -1253 // data access │ │ │ │ -1254 /** │ │ │ │ -1255 * Returns a pointer such that [data(), data() + size()) is a valid │ │ │ │ -1256 * range. For a non-empty %vector, data() == &front(). │ │ │ │ -1257 */ │ │ │ │ -1258 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1259 _Tp* │ │ │ │ -_1_2_6_0 _d_a_t_a() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -1261 { return _M_data_ptr(this->_M_impl._M_start); } │ │ │ │ -1262 │ │ │ │ -1263 _GLIBCXX_NODISCARD ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1264 const _Tp* │ │ │ │ -1265 _d_a_t_a() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -1266 { return _M_data_ptr(this->_M_impl._M_start); } │ │ │ │ +1164 ~__weak_count() noexcept │ │ │ │ +1165 { │ │ │ │ +1166 if (_M_pi != nullptr) │ │ │ │ +1167 _M_pi->_M_weak_release(); │ │ │ │ +1168 } │ │ │ │ +1169 │ │ │ │ +1170 __weak_count& │ │ │ │ +1171 operator=(const __shared_count<_Lp>& __r) noexcept │ │ │ │ +1172 { │ │ │ │ +1173 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +1174 if (__tmp != nullptr) │ │ │ │ +1175 __tmp->_M_weak_add_ref(); │ │ │ │ +1176 if (_M_pi != nullptr) │ │ │ │ +1177 _M_pi->_M_weak_release(); │ │ │ │ +1178 _M_pi = __tmp; │ │ │ │ +1179 return *this; │ │ │ │ +1180 } │ │ │ │ +1181 │ │ │ │ +1182 __weak_count& │ │ │ │ +1183 operator=(const __weak_count& __r) noexcept │ │ │ │ +1184 { │ │ │ │ +1185 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +1186 if (__tmp != nullptr) │ │ │ │ +1187 __tmp->_M_weak_add_ref(); │ │ │ │ +1188 if (_M_pi != nullptr) │ │ │ │ +1189 _M_pi->_M_weak_release(); │ │ │ │ +1190 _M_pi = __tmp; │ │ │ │ +1191 return *this; │ │ │ │ +1192 } │ │ │ │ +1193 │ │ │ │ +1194 __weak_count& │ │ │ │ +1195 operator=(__weak_count&& __r) noexcept │ │ │ │ +1196 { │ │ │ │ +1197 if (_M_pi != nullptr) │ │ │ │ +1198 _M_pi->_M_weak_release(); │ │ │ │ +1199 _M_pi = __r._M_pi; │ │ │ │ +1200 __r._M_pi = nullptr; │ │ │ │ +1201 return *this; │ │ │ │ +1202 } │ │ │ │ +1203 │ │ │ │ +1204 void │ │ │ │ +1205 _M_swap(__weak_count& __r) noexcept │ │ │ │ +1206 { │ │ │ │ +1207 _Sp_counted_base<_Lp>* __tmp = __r._M_pi; │ │ │ │ +1208 __r._M_pi = _M_pi; │ │ │ │ +1209 _M_pi = __tmp; │ │ │ │ +1210 } │ │ │ │ +1211 │ │ │ │ +1212 long │ │ │ │ +1213 _M_get_use_count() const noexcept │ │ │ │ +1214 { return _M_pi != nullptr ? _M_pi->_M_get_use_count() : 0; } │ │ │ │ +1215 │ │ │ │ +1216 bool │ │ │ │ +1217 _M_less(const __weak_count& __rhs) const noexcept │ │ │ │ +1218 { return _s_t_d_:_:_l_e_s_s_<___S_p___c_o_u_n_t_e_d___b_a_s_e_<___L_p_>*>()(this->_M_pi, __rhs._M_pi); } │ │ │ │ +1219 │ │ │ │ +1220 bool │ │ │ │ +1221 _M_less(const __shared_count<_Lp>& __rhs) const noexcept │ │ │ │ +1222 { return _s_t_d_:_:_l_e_s_s_<___S_p___c_o_u_n_t_e_d___b_a_s_e_<___L_p_>*>()(this->_M_pi, __rhs._M_pi); } │ │ │ │ +1223 │ │ │ │ +1224 // Friend function injected into enclosing namespace and found by ADL │ │ │ │ +1225 friend inline bool │ │ │ │ +1226 operator==(const __weak_count& __a, const __weak_count& __b) noexcept │ │ │ │ +1227 { return __a._M_pi == __b._M_pi; } │ │ │ │ +1228 │ │ │ │ +1229 private: │ │ │ │ +1230 friend class __shared_count<_Lp>; │ │ │ │ +1231#if __cplusplus >= 202002L │ │ │ │ +1232 template friend class _Sp_atomic; │ │ │ │ +1233#endif │ │ │ │ +1234 │ │ │ │ +1235 _Sp_counted_base<_Lp>* _M_pi; │ │ │ │ +1236 }; │ │ │ │ +1237 │ │ │ │ +1238 // Now that __weak_count is defined we can define this constructor: │ │ │ │ +1239 template<_Lock_policy _Lp> │ │ │ │ +1240 inline │ │ │ │ +1241 __shared_count<_Lp>::__shared_count(const __weak_count<_Lp>& __r) │ │ │ │ +1242 : _M_pi(__r._M_pi) │ │ │ │ +1243 { │ │ │ │ +1244 if (_M_pi == nullptr || !_M_pi->_M_add_ref_lock_nothrow()) │ │ │ │ +1245 __throw_bad_weak_ptr(); │ │ │ │ +1246 } │ │ │ │ +1247 │ │ │ │ +1248 // Now that __weak_count is defined we can define this constructor: │ │ │ │ +1249 template<_Lock_policy _Lp> │ │ │ │ +1250 inline │ │ │ │ +1251 __shared_count<_Lp>:: │ │ │ │ +1252 __shared_count(const __weak_count<_Lp>& __r, std::nothrow_t) noexcept │ │ │ │ +1253 : _M_pi(__r._M_pi) │ │ │ │ +1254 { │ │ │ │ +1255 if (_M_pi && !_M_pi->_M_add_ref_lock_nothrow()) │ │ │ │ +1256 _M_pi = nullptr; │ │ │ │ +1257 } │ │ │ │ +1258 │ │ │ │ +1259 // Helper traits for shared_ptr of array: │ │ │ │ +1260 │ │ │ │ +1261 // A pointer type Y* is said to be compatible with a pointer type T* when │ │ │ │ +1262 // either Y* is convertible to T* or Y is U[N] and T is U cv []. │ │ │ │ +1263 template │ │ │ │ +1264 struct __sp_compatible_with │ │ │ │ +1265 : _f_a_l_s_e___t_y_p_e │ │ │ │ +1266 { }; │ │ │ │ 1267 │ │ │ │ -1268 // [23.2.4.3] modifiers │ │ │ │ -1269 /** │ │ │ │ -1270 * @brief Add data to the end of the %vector. │ │ │ │ -1271 * @param __x Data to be added. │ │ │ │ -1272 * │ │ │ │ -1273 * This is a typical stack operation. The function creates an │ │ │ │ -1274 * element at the end of the %vector and assigns the given data │ │ │ │ -1275 * to it. Due to the nature of a %vector this operation can be │ │ │ │ -1276 * done in constant time if the %vector has preallocated space │ │ │ │ -1277 * available. │ │ │ │ -1278 */ │ │ │ │ -1279 _GLIBCXX20_CONSTEXPR │ │ │ │ -1280 void │ │ │ │ -_1_2_8_1 _p_u_s_h___b_a_c_k(const value_type& __x) │ │ │ │ -1282 { │ │ │ │ -1283 if (this->_M_impl._M_finish != _t_h_i_s->_M_impl._M_end_of_storage) │ │ │ │ -1284 { │ │ │ │ -1285 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ -1286 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ -1287 __x); │ │ │ │ -1288 ++this->_M_impl._M_finish; │ │ │ │ -1289 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ -1290 } │ │ │ │ -1291 else │ │ │ │ -1292 _M_realloc_insert(_e_n_d(), __x); │ │ │ │ -1293 } │ │ │ │ -1294 │ │ │ │ -1295#if __cplusplus >= 201103L │ │ │ │ -1296 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1297 void │ │ │ │ -1298 _p_u_s_h___b_a_c_k(value_type&& __x) │ │ │ │ -1299 { emplace_back(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -1300 │ │ │ │ -1301 template │ │ │ │ -1302#if __cplusplus > 201402L │ │ │ │ -1303 _GLIBCXX20_CONSTEXPR │ │ │ │ -1304 reference │ │ │ │ -1305#else │ │ │ │ -1306 void │ │ │ │ -1307#endif │ │ │ │ -1308 emplace_back(_Args&&... __args); │ │ │ │ -1309#endif │ │ │ │ -1310 │ │ │ │ -1311 /** │ │ │ │ -1312 * @brief Removes last element. │ │ │ │ -1313 * │ │ │ │ -1314 * This is a typical stack operation. It shrinks the %vector by one. │ │ │ │ -1315 * │ │ │ │ -1316 * Note that no data is returned, and if the last element's │ │ │ │ -1317 * data is needed, it should be retrieved before pop_back() is │ │ │ │ -1318 * called. │ │ │ │ -1319 */ │ │ │ │ -1320 _GLIBCXX20_CONSTEXPR │ │ │ │ -1321 void │ │ │ │ -_1_3_2_2 _p_o_p___b_a_c_k() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -1323 { │ │ │ │ -1324 __glibcxx_requires_nonempty(); │ │ │ │ -1325 --this->_M_impl._M_finish; │ │ │ │ -1326 _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); │ │ │ │ -1327 _GLIBCXX_ASAN_ANNOTATE_SHRINK(1); │ │ │ │ -1328 } │ │ │ │ -1329 │ │ │ │ -1330#if __cplusplus >= 201103L │ │ │ │ -1331 /** │ │ │ │ -1332 * @brief Inserts an object in %vector before specified iterator. │ │ │ │ -1333 * @param __position A const_iterator into the %vector. │ │ │ │ -1334 * @param __args Arguments. │ │ │ │ -1335 * @return An iterator that points to the inserted data. │ │ │ │ -1336 * │ │ │ │ -1337 * This function will insert an object of type T constructed │ │ │ │ -1338 * with T(std::forward(args)...) before the specified location. │ │ │ │ -1339 * Note that this kind of operation could be expensive for a %vector │ │ │ │ -1340 * and if it is frequently used the user should consider using │ │ │ │ -1341 * std::list. │ │ │ │ -1342 */ │ │ │ │ -1343 template │ │ │ │ -1344 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1345 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_4_6 _e_m_p_l_a_c_e(const_iterator _____p_o_s_i_t_i_o_n, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -1347 { return _M_emplace_aux(_____p_o_s_i_t_i_o_n, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -1348 │ │ │ │ -1349 /** │ │ │ │ -1350 * @brief Inserts given value into %vector before specified iterator. │ │ │ │ -1351 * @param __position A const_iterator into the %vector. │ │ │ │ -1352 * @param __x Data to be inserted. │ │ │ │ -1353 * @return An iterator that points to the inserted data. │ │ │ │ -1354 * │ │ │ │ -1355 * This function will insert a copy of the given value before │ │ │ │ -1356 * the specified location. Note that this kind of operation │ │ │ │ -1357 * could be expensive for a %vector and if it is frequently │ │ │ │ -1358 * used the user should consider using std::list. │ │ │ │ -1359 */ │ │ │ │ -1360 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1361 _i_t_e_r_a_t_o_r │ │ │ │ -1362 _i_n_s_e_r_t(const_iterator _____p_o_s_i_t_i_o_n, const value_type& __x); │ │ │ │ -1363#else │ │ │ │ -1364 /** │ │ │ │ -1365 * @brief Inserts given value into %vector before specified iterator. │ │ │ │ -1366 * @param __position An iterator into the %vector. │ │ │ │ -1367 * @param __x Data to be inserted. │ │ │ │ -1368 * @return An iterator that points to the inserted data. │ │ │ │ -1369 * │ │ │ │ -1370 * This function will insert a copy of the given value before │ │ │ │ -1371 * the specified location. Note that this kind of operation │ │ │ │ -1372 * could be expensive for a %vector and if it is frequently │ │ │ │ -1373 * used the user should consider using std::list. │ │ │ │ -1374 */ │ │ │ │ -1375 _i_t_e_r_a_t_o_r │ │ │ │ -1376 _i_n_s_e_r_t(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n, const value_type& __x); │ │ │ │ -1377#endif │ │ │ │ -1378 │ │ │ │ -1379#if __cplusplus >= 201103L │ │ │ │ -1380 /** │ │ │ │ -1381 * @brief Inserts given rvalue into %vector before specified iterator. │ │ │ │ -1382 * @param __position A const_iterator into the %vector. │ │ │ │ -1383 * @param __x Data to be inserted. │ │ │ │ -1384 * @return An iterator that points to the inserted data. │ │ │ │ -1385 * │ │ │ │ -1386 * This function will insert a copy of the given rvalue before │ │ │ │ -1387 * the specified location. Note that this kind of operation │ │ │ │ -1388 * could be expensive for a %vector and if it is frequently │ │ │ │ -1389 * used the user should consider using std::list. │ │ │ │ -1390 */ │ │ │ │ -1391 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1392 _i_t_e_r_a_t_o_r │ │ │ │ -_1_3_9_3 _i_n_s_e_r_t(const_iterator _____p_o_s_i_t_i_o_n, value_type&& __x) │ │ │ │ -1394 { return _M_insert_rval(_____p_o_s_i_t_i_o_n, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -1395 │ │ │ │ -1396 /** │ │ │ │ -1397 * @brief Inserts an initializer_list into the %vector. │ │ │ │ -1398 * @param __position An iterator into the %vector. │ │ │ │ -1399 * @param __l An initializer_list. │ │ │ │ -1400 * │ │ │ │ -1401 * This function will insert copies of the data in the │ │ │ │ -1402 * initializer_list @a l into the %vector before the location │ │ │ │ -1403 * specified by @a position. │ │ │ │ -1404 * │ │ │ │ -1405 * Note that this kind of operation could be expensive for a │ │ │ │ -1406 * %vector and if it is frequently used the user should │ │ │ │ -1407 * consider using std::list. │ │ │ │ -1408 */ │ │ │ │ -1409 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1410 _i_t_e_r_a_t_o_r │ │ │ │ -_1_4_1_1 _i_n_s_e_r_t(const_iterator _____p_o_s_i_t_i_o_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) │ │ │ │ -1412 { │ │ │ │ -1413 auto __offset = _____p_o_s_i_t_i_o_n - _c_b_e_g_i_n(); │ │ │ │ -1414 _M_range_insert(_b_e_g_i_n() + __offset, _____l.begin(), _____l.end(), │ │ │ │ -1415 _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()); │ │ │ │ -1416 return _b_e_g_i_n() + __offset; │ │ │ │ -1417 } │ │ │ │ -1418#endif │ │ │ │ -1419 │ │ │ │ -1420#if __cplusplus >= 201103L │ │ │ │ -1421 /** │ │ │ │ -1422 * @brief Inserts a number of copies of given data into the %vector. │ │ │ │ -1423 * @param __position A const_iterator into the %vector. │ │ │ │ -1424 * @param __n Number of elements to be inserted. │ │ │ │ -1425 * @param __x Data to be inserted. │ │ │ │ -1426 * @return An iterator that points to the inserted data. │ │ │ │ -1427 * │ │ │ │ -1428 * This function will insert a specified number of copies of │ │ │ │ -1429 * the given data before the location specified by @a position. │ │ │ │ -1430 * │ │ │ │ -1431 * Note that this kind of operation could be expensive for a │ │ │ │ -1432 * %vector and if it is frequently used the user should │ │ │ │ -1433 * consider using std::list. │ │ │ │ -1434 */ │ │ │ │ -1435 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1436 _i_t_e_r_a_t_o_r │ │ │ │ -_1_4_3_7 _i_n_s_e_r_t(const_iterator _____p_o_s_i_t_i_o_n, size_type __n, const value_type& __x) │ │ │ │ -1438 { │ │ │ │ -1439 difference_type __offset = _____p_o_s_i_t_i_o_n - _c_b_e_g_i_n(); │ │ │ │ -1440 _M_fill_insert(_b_e_g_i_n() + __offset, __n, __x); │ │ │ │ -1441 return _b_e_g_i_n() + __offset; │ │ │ │ -1442 } │ │ │ │ -1443#else │ │ │ │ -1444 /** │ │ │ │ -1445 * @brief Inserts a number of copies of given data into the %vector. │ │ │ │ -1446 * @param __position An iterator into the %vector. │ │ │ │ -1447 * @param __n Number of elements to be inserted. │ │ │ │ -1448 * @param __x Data to be inserted. │ │ │ │ -1449 * │ │ │ │ -1450 * This function will insert a specified number of copies of │ │ │ │ -1451 * the given data before the location specified by @a position. │ │ │ │ -1452 * │ │ │ │ -1453 * Note that this kind of operation could be expensive for a │ │ │ │ -1454 * %vector and if it is frequently used the user should │ │ │ │ -1455 * consider using std::list. │ │ │ │ -1456 */ │ │ │ │ -1457 void │ │ │ │ -1458 _i_n_s_e_r_t(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n, size_type __n, const value_type& __x) │ │ │ │ -1459 { _M_fill_insert(_____p_o_s_i_t_i_o_n, __n, __x); } │ │ │ │ +1268 template │ │ │ │ +1269 struct __sp_compatible_with<_Yp*, _Tp*> │ │ │ │ +1270 : is_convertible<_Yp*, _Tp*>::type │ │ │ │ +1271 { }; │ │ │ │ +1272 │ │ │ │ +1273 template │ │ │ │ +1274 struct __sp_compatible_with<_Up(*)[_Nm], _Up(*)[]> │ │ │ │ +1275 : _t_r_u_e___t_y_p_e │ │ │ │ +1276 { }; │ │ │ │ +1277 │ │ │ │ +1278 template │ │ │ │ +1279 struct __sp_compatible_with<_Up(*)[_Nm], const _Up(*)[]> │ │ │ │ +1280 : _t_r_u_e___t_y_p_e │ │ │ │ +1281 { }; │ │ │ │ +1282 │ │ │ │ +1283 template │ │ │ │ +1284 struct __sp_compatible_with<_Up(*)[_Nm], volatile _Up(*)[]> │ │ │ │ +1285 : _t_r_u_e___t_y_p_e │ │ │ │ +1286 { }; │ │ │ │ +1287 │ │ │ │ +1288 template │ │ │ │ +1289 struct __sp_compatible_with<_Up(*)[_Nm], const volatile _Up(*)[]> │ │ │ │ +1290 : _t_r_u_e___t_y_p_e │ │ │ │ +1291 { }; │ │ │ │ +1292 │ │ │ │ +1293 // Test conversion from Y(*)[N] to U(*)[N] without forming invalid type Y │ │ │ │ +[N]. │ │ │ │ +1294 template │ │ │ │ +1295 struct __sp_is_constructible_arrN │ │ │ │ +1296 : _f_a_l_s_e___t_y_p_e │ │ │ │ +1297 { }; │ │ │ │ +1298 │ │ │ │ +1299 template │ │ │ │ +1300 struct __sp_is_constructible_arrN<_Up, _Nm, _Yp, __void_t<_Yp[_Nm]>> │ │ │ │ +1301 : is_convertible<_Yp(*)[_Nm], _Up(*)[_Nm]>::type │ │ │ │ +1302 { }; │ │ │ │ +1303 │ │ │ │ +1304 // Test conversion from Y(*)[] to U(*)[] without forming invalid type Y[]. │ │ │ │ +1305 template │ │ │ │ +1306 struct __sp_is_constructible_arr │ │ │ │ +1307 : _f_a_l_s_e___t_y_p_e │ │ │ │ +1308 { }; │ │ │ │ +1309 │ │ │ │ +1310 template │ │ │ │ +1311 struct __sp_is_constructible_arr<_Up, _Yp, __void_t<_Yp[]>> │ │ │ │ +1312 : is_convertible<_Yp(*)[], _Up(*)[]>::type │ │ │ │ +1313 { }; │ │ │ │ +1314 │ │ │ │ +1315 // Trait to check if shared_ptr can be constructed from Y*. │ │ │ │ +1316 template │ │ │ │ +1317 struct __sp_is_constructible; │ │ │ │ +1318 │ │ │ │ +1319 // When T is U[N], Y(*)[N] shall be convertible to T*; │ │ │ │ +1320 template │ │ │ │ +1321 struct __sp_is_constructible<_Up[_Nm], _Yp> │ │ │ │ +1322 : __sp_is_constructible_arrN<_Up, _Nm, _Yp>::type │ │ │ │ +1323 { }; │ │ │ │ +1324 │ │ │ │ +1325 // when T is U[], Y(*)[] shall be convertible to T*; │ │ │ │ +1326 template │ │ │ │ +1327 struct __sp_is_constructible<_Up[], _Yp> │ │ │ │ +1328 : __sp_is_constructible_arr<_Up, _Yp>::type │ │ │ │ +1329 { }; │ │ │ │ +1330 │ │ │ │ +1331 // otherwise, Y* shall be convertible to T*. │ │ │ │ +1332 template │ │ │ │ +1333 struct __sp_is_constructible │ │ │ │ +1334 : is_convertible<_Yp*, _Tp*>::type │ │ │ │ +1335 { }; │ │ │ │ +1336 │ │ │ │ +1337 │ │ │ │ +1338 // Define operator* and operator-> for shared_ptr. │ │ │ │ +1339 template::value, bool = is_void<_Tp>::value> │ │ │ │ +1341 class __shared_ptr_access │ │ │ │ +1342 { │ │ │ │ +1343 public: │ │ │ │ +1344 using element_type = _Tp; │ │ │ │ +1345 │ │ │ │ +1346 element_type& │ │ │ │ +1347 _o_p_e_r_a_t_o_r_*() const noexcept │ │ │ │ +1348 { │ │ │ │ +1349 __glibcxx_assert(_M_get() != nullptr); │ │ │ │ +1350 return *_M_get(); │ │ │ │ +1351 } │ │ │ │ +1352 │ │ │ │ +1353 element_type* │ │ │ │ +1354 operator->() const noexcept │ │ │ │ +1355 { │ │ │ │ +1356 _GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr); │ │ │ │ +1357 return _M_get(); │ │ │ │ +1358 } │ │ │ │ +1359 │ │ │ │ +1360 private: │ │ │ │ +1361 element_type* │ │ │ │ +1362 _M_get() const noexcept │ │ │ │ +1363 { return static_cast*>(this)->get(); } │ │ │ │ +1364 }; │ │ │ │ +1365 │ │ │ │ +1366 // Define operator-> for shared_ptr. │ │ │ │ +1367 template │ │ │ │ +1368 class __shared_ptr_access<_Tp, _Lp, false, true> │ │ │ │ +1369 { │ │ │ │ +1370 public: │ │ │ │ +1371 using element_type = _Tp; │ │ │ │ +1372 │ │ │ │ +1373 element_type* │ │ │ │ +1374 operator->() const noexcept │ │ │ │ +1375 { │ │ │ │ +1376 auto __ptr = static_cast*>(this)->get(); │ │ │ │ +1377 _GLIBCXX_DEBUG_PEDASSERT(__ptr != nullptr); │ │ │ │ +1378 return __ptr; │ │ │ │ +1379 } │ │ │ │ +1380 }; │ │ │ │ +1381 │ │ │ │ +1382 // Define operator[] for shared_ptr and shared_ptr. │ │ │ │ +1383 template │ │ │ │ +1384 class __shared_ptr_access<_Tp, _Lp, true, false> │ │ │ │ +1385 { │ │ │ │ +1386 public: │ │ │ │ +1387 using element_type = typename remove_extent<_Tp>::type; │ │ │ │ +1388 │ │ │ │ +1389#if __cplusplus <= 201402L │ │ │ │ +1390 [[__deprecated__("shared_ptr::operator* is absent from C++17")]] │ │ │ │ +1391 element_type& │ │ │ │ +1392 _o_p_e_r_a_t_o_r_*() const noexcept │ │ │ │ +1393 { │ │ │ │ +1394 __glibcxx_assert(_M_get() != nullptr); │ │ │ │ +1395 return *_M_get(); │ │ │ │ +1396 } │ │ │ │ +1397 │ │ │ │ +1398 [[__deprecated__("shared_ptr::operator-> is absent from C++17")]] │ │ │ │ +1399 element_type* │ │ │ │ +1400 operator->() const noexcept │ │ │ │ +1401 { │ │ │ │ +1402 _GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr); │ │ │ │ +1403 return _M_get(); │ │ │ │ +1404 } │ │ │ │ +1405#endif │ │ │ │ +1406 │ │ │ │ +1407 element_type& │ │ │ │ +1408 operator[](ptrdiff_t __i) const noexcept │ │ │ │ +1409 { │ │ │ │ +1410 __glibcxx_assert(_M_get() != nullptr); │ │ │ │ +1411 __glibcxx_assert(!extent<_Tp>::value || __i < extent<_Tp>::value); │ │ │ │ +1412 return _M_get()[__i]; │ │ │ │ +1413 } │ │ │ │ +1414 │ │ │ │ +1415 private: │ │ │ │ +1416 element_type* │ │ │ │ +1417 _M_get() const noexcept │ │ │ │ +1418 { return static_cast*>(this)->get(); } │ │ │ │ +1419 }; │ │ │ │ +1420 │ │ │ │ +1421 template │ │ │ │ +1422 class __shared_ptr │ │ │ │ +1423 : public __shared_ptr_access<_Tp, _Lp> │ │ │ │ +1424 { │ │ │ │ +1425 public: │ │ │ │ +1426 using element_type = typename remove_extent<_Tp>::type; │ │ │ │ +1427 │ │ │ │ +1428 private: │ │ │ │ +1429 // Constraint for taking ownership of a pointer of type _Yp*: │ │ │ │ +1430 template │ │ │ │ +1431 using _SafeConv │ │ │ │ +1432 = typename enable_if<__sp_is_constructible<_Tp, _Yp>::value>::type; │ │ │ │ +1433 │ │ │ │ +1434 // Constraint for construction from shared_ptr and weak_ptr: │ │ │ │ +1435 template │ │ │ │ +1436 using _Compatible = typename │ │ │ │ +1437 enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; │ │ │ │ +1438 │ │ │ │ +1439 // Constraint for assignment from shared_ptr and weak_ptr: │ │ │ │ +1440 template │ │ │ │ +1441 using _Assignable = _Compatible<_Yp, __shared_ptr&>; │ │ │ │ +1442 │ │ │ │ +1443 // Constraint for construction from unique_ptr: │ │ │ │ +1444 template::pointer> │ │ │ │ +1446 using _UniqCompatible = __enable_if_t<__and_< │ │ │ │ +1447 __sp_compatible_with<_Yp*, _Tp*>, │ │ │ │ +1448 is_convertible<_Ptr, element_type*>, │ │ │ │ +1449 is_move_constructible<_Del> │ │ │ │ +1450 >::value, _Res>; │ │ │ │ +1451 │ │ │ │ +1452 // Constraint for assignment from unique_ptr: │ │ │ │ +1453 template │ │ │ │ +1454 using _UniqAssignable = _UniqCompatible<_Yp, _Del, __shared_ptr&>; │ │ │ │ +1455 │ │ │ │ +1456 public: │ │ │ │ +1457 │ │ │ │ +1458#if __cplusplus > 201402L │ │ │ │ +1459 using weak_type = __weak_ptr<_Tp, _Lp>; │ │ │ │ 1460#endif │ │ │ │ 1461 │ │ │ │ -1462#if __cplusplus >= 201103L │ │ │ │ -1463 /** │ │ │ │ -1464 * @brief Inserts a range into the %vector. │ │ │ │ -1465 * @param __position A const_iterator into the %vector. │ │ │ │ -1466 * @param __first An input iterator. │ │ │ │ -1467 * @param __last An input iterator. │ │ │ │ -1468 * @return An iterator that points to the inserted data. │ │ │ │ -1469 * │ │ │ │ -1470 * This function will insert copies of the data in the range │ │ │ │ -1471 * [__first,__last) into the %vector before the location specified │ │ │ │ -1472 * by @a pos. │ │ │ │ -1473 * │ │ │ │ -1474 * Note that this kind of operation could be expensive for a │ │ │ │ -1475 * %vector and if it is frequently used the user should │ │ │ │ -1476 * consider using std::list. │ │ │ │ -1477 */ │ │ │ │ -1478 template> │ │ │ │ -1480 _GLIBCXX20_CONSTEXPR │ │ │ │ -1481 iterator │ │ │ │ -_1_4_8_2 _i_n_s_e_r_t(const_iterator _____p_o_s_i_t_i_o_n, ___I_n_p_u_t_I_t_e_r_a_t_o_r __first, │ │ │ │ -1483 ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ -1484 { │ │ │ │ -1485 difference_type __offset = _____p_o_s_i_t_i_o_n - _c_b_e_g_i_n(); │ │ │ │ -1486 _M_range_insert(_b_e_g_i_n() + __offset, __first, __last, │ │ │ │ -1487 _s_t_d_:_:_____i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y(__first)); │ │ │ │ -1488 return _b_e_g_i_n() + __offset; │ │ │ │ -1489 } │ │ │ │ -1490#else │ │ │ │ -1491 /** │ │ │ │ -1492 * @brief Inserts a range into the %vector. │ │ │ │ -1493 * @param __position An iterator into the %vector. │ │ │ │ -1494 * @param __first An input iterator. │ │ │ │ -1495 * @param __last An input iterator. │ │ │ │ -1496 * │ │ │ │ -1497 * This function will insert copies of the data in the range │ │ │ │ -1498 * [__first,__last) into the %vector before the location specified │ │ │ │ -1499 * by @a pos. │ │ │ │ -1500 * │ │ │ │ -1501 * Note that this kind of operation could be expensive for a │ │ │ │ -1502 * %vector and if it is frequently used the user should │ │ │ │ -1503 * consider using std::list. │ │ │ │ -1504 */ │ │ │ │ -1505 template │ │ │ │ -1506 void │ │ │ │ -1507 _i_n_s_e_r_t(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n, ___I_n_p_u_t_I_t_e_r_a_t_o_r __first, │ │ │ │ -1508 ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ -1509 { │ │ │ │ -1510 // Check whether it's an integral type. If so, it's not an iterator. │ │ │ │ -1511 typedef typename std::__is_integer<_InputIterator>::__type ___I_n_t_e_g_r_a_l; │ │ │ │ -1512 _M_insert_dispatch(_____p_o_s_i_t_i_o_n, __first, __last, ___I_n_t_e_g_r_a_l()); │ │ │ │ -1513 } │ │ │ │ -1514#endif │ │ │ │ -1515 │ │ │ │ -1516 /** │ │ │ │ -1517 * @brief Remove element at given position. │ │ │ │ -1518 * @param __position Iterator pointing to element to be erased. │ │ │ │ -1519 * @return An iterator pointing to the next element (or end()). │ │ │ │ -1520 * │ │ │ │ -1521 * This function will erase the element at the given position and thus │ │ │ │ -1522 * shorten the %vector by one. │ │ │ │ -1523 * │ │ │ │ -1524 * Note This operation could be expensive and if it is │ │ │ │ -1525 * frequently used the user should consider using std::list. │ │ │ │ -1526 * The user is also cautioned that this function only erases │ │ │ │ -1527 * the element, and that if the element is itself a pointer, │ │ │ │ -1528 * the pointed-to memory is not touched in any way. Managing │ │ │ │ -1529 * the pointer is the user's responsibility. │ │ │ │ -1530 */ │ │ │ │ -1531 _GLIBCXX20_CONSTEXPR │ │ │ │ -1532 iterator │ │ │ │ -1533#if __cplusplus >= 201103L │ │ │ │ -_1_5_3_4 _e_r_a_s_e(const_iterator _____p_o_s_i_t_i_o_n) │ │ │ │ -1535 { return _M_erase(_b_e_g_i_n() + (_____p_o_s_i_t_i_o_n - _c_b_e_g_i_n())); } │ │ │ │ -1536#else │ │ │ │ -1537 _e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -1538 { return _M_erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -1539#endif │ │ │ │ -1540 │ │ │ │ -1541 /** │ │ │ │ -1542 * @brief Remove a range of elements. │ │ │ │ -1543 * @param __first Iterator pointing to the first element to be erased. │ │ │ │ -1544 * @param __last Iterator pointing to one past the last element to be │ │ │ │ -1545 * erased. │ │ │ │ -1546 * @return An iterator pointing to the element pointed to by @a __last │ │ │ │ -1547 * prior to erasing (or end()). │ │ │ │ -1548 * │ │ │ │ -1549 * This function will erase the elements in the range │ │ │ │ -1550 * [__first,__last) and shorten the %vector accordingly. │ │ │ │ -1551 * │ │ │ │ -1552 * Note This operation could be expensive and if it is │ │ │ │ -1553 * frequently used the user should consider using std::list. │ │ │ │ -1554 * The user is also cautioned that this function only erases │ │ │ │ -1555 * the elements, and that if the elements themselves are │ │ │ │ -1556 * pointers, the pointed-to memory is not touched in any way. │ │ │ │ -1557 * Managing the pointer is the user's responsibility. │ │ │ │ -1558 */ │ │ │ │ -1559 _GLIBCXX20_CONSTEXPR │ │ │ │ -1560 iterator │ │ │ │ -1561#if __cplusplus >= 201103L │ │ │ │ -_1_5_6_2 _e_r_a_s_e(const_iterator __first, const_iterator __last) │ │ │ │ -1563 { │ │ │ │ -1564 const auto _____b_e_g = _b_e_g_i_n(); │ │ │ │ -1565 const auto _____c_b_e_g = _c_b_e_g_i_n(); │ │ │ │ -1566 return _M_erase(_____b_e_g + (__first - _____c_b_e_g), _____b_e_g + (__last - _____c_b_e_g)); │ │ │ │ -1567 } │ │ │ │ -1568#else │ │ │ │ -1569 _e_r_a_s_e(_i_t_e_r_a_t_o_r __first, _i_t_e_r_a_t_o_r __last) │ │ │ │ -1570 { return _M_erase(__first, __last); } │ │ │ │ -1571#endif │ │ │ │ -1572 │ │ │ │ -1573 /** │ │ │ │ -1574 * @brief Swaps data with another %vector. │ │ │ │ -1575 * @param __x A %vector of the same element and allocator types. │ │ │ │ -1576 * │ │ │ │ -1577 * This exchanges the elements between two vectors in constant time. │ │ │ │ -1578 * (Three pointers, so it should be quite fast.) │ │ │ │ -1579 * Note that the global std::swap() function is specialized such that │ │ │ │ -1580 * std::swap(v1,v2) will feed to this function. │ │ │ │ -1581 * │ │ │ │ -1582 * Whether the allocators are swapped depends on the allocator traits. │ │ │ │ -1583 */ │ │ │ │ -1584 _GLIBCXX20_CONSTEXPR │ │ │ │ -1585 void │ │ │ │ -_1_5_8_6 _s_w_a_p(_v_e_c_t_o_r& __x) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -1587 { │ │ │ │ -1588#if __cplusplus >= 201103L │ │ │ │ -1589 __glibcxx_assert(_Alloc_traits::propagate_on_container_swap::value │ │ │ │ -1590 || _M_get_Tp_allocator() == __x._M_get_Tp_allocator()); │ │ │ │ +1462 constexpr __shared_ptr() noexcept │ │ │ │ +1463 : _M_ptr(0), _M_refcount() │ │ │ │ +1464 { } │ │ │ │ +1465 │ │ │ │ +1466 template> │ │ │ │ +1467 explicit │ │ │ │ +1468 __shared_ptr(_Yp* __p) │ │ │ │ +1469 : _M_ptr(__p), _M_refcount(__p, typename is_array<_Tp>::type()) │ │ │ │ +1470 { │ │ │ │ +1471 static_assert( !is_void<_Yp>::value, "incomplete type" ); │ │ │ │ +1472 static_assert( sizeof(_Yp) > 0, "incomplete type" ); │ │ │ │ +1473 _M_enable_shared_from_this_with(__p); │ │ │ │ +1474 } │ │ │ │ +1475 │ │ │ │ +1476 template> │ │ │ │ +1477 __shared_ptr(_Yp* __p, _Deleter __d) │ │ │ │ +1478 : _M_ptr(__p), _M_refcount(__p, _s_t_d::_m_o_v_e(__d)) │ │ │ │ +1479 { │ │ │ │ +1480 static_assert(__is_invocable<_Deleter&, _Yp*&>::value, │ │ │ │ +1481 "deleter expression d(p) is well-formed"); │ │ │ │ +1482 _M_enable_shared_from_this_with(__p); │ │ │ │ +1483 } │ │ │ │ +1484 │ │ │ │ +1485 template> │ │ │ │ +1487 __shared_ptr(_Yp* __p, _Deleter __d, _Alloc __a) │ │ │ │ +1488 : _M_ptr(__p), _M_refcount(__p, _s_t_d::_m_o_v_e(__d), _s_t_d::_m_o_v_e(__a)) │ │ │ │ +1489 { │ │ │ │ +1490 static_assert(__is_invocable<_Deleter&, _Yp*&>::value, │ │ │ │ +1491 "deleter expression d(p) is well-formed"); │ │ │ │ +1492 _M_enable_shared_from_this_with(__p); │ │ │ │ +1493 } │ │ │ │ +1494 │ │ │ │ +1495 template │ │ │ │ +1496 __shared_ptr(nullptr_t __p, _Deleter __d) │ │ │ │ +1497 : _M_ptr(0), _M_refcount(__p, _s_t_d::_m_o_v_e(__d)) │ │ │ │ +1498 { } │ │ │ │ +1499 │ │ │ │ +1500 template │ │ │ │ +1501 __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) │ │ │ │ +1502 : _M_ptr(0), _M_refcount(__p, _s_t_d::_m_o_v_e(__d), _s_t_d::_m_o_v_e(__a)) │ │ │ │ +1503 { } │ │ │ │ +1504 │ │ │ │ +1505 // Aliasing constructor │ │ │ │ +1506 template │ │ │ │ +1507 __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r, │ │ │ │ +1508 element_type* __p) noexcept │ │ │ │ +1509 : _M_ptr(__p), _M_refcount(__r._M_refcount) // never throws │ │ │ │ +1510 { } │ │ │ │ +1511 │ │ │ │ +1512 // Aliasing constructor │ │ │ │ +1513 template │ │ │ │ +1514 __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r, │ │ │ │ +1515 element_type* __p) noexcept │ │ │ │ +1516 : _M_ptr(__p), _M_refcount() │ │ │ │ +1517 { │ │ │ │ +1518 _M_refcount._M_swap(__r._M_refcount); │ │ │ │ +1519 __r._M_ptr = nullptr; │ │ │ │ +1520 } │ │ │ │ +1521 │ │ │ │ +1522 __shared_ptr(const __shared_ptr&) noexcept = default; │ │ │ │ +1523 __shared_ptr& operator=(const __shared_ptr&) noexcept = default; │ │ │ │ +1524 ~__shared_ptr() = default; │ │ │ │ +1525 │ │ │ │ +1526 template> │ │ │ │ +1527 __shared_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +1528 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) │ │ │ │ +1529 { } │ │ │ │ +1530 │ │ │ │ +1531 __shared_ptr(__shared_ptr&& __r) noexcept │ │ │ │ +1532 : _M_ptr(__r._M_ptr), _M_refcount() │ │ │ │ +1533 { │ │ │ │ +1534 _M_refcount._M_swap(__r._M_refcount); │ │ │ │ +1535 __r._M_ptr = nullptr; │ │ │ │ +1536 } │ │ │ │ +1537 │ │ │ │ +1538 template> │ │ │ │ +1539 __shared_ptr(__shared_ptr<_Yp, _Lp>&& __r) noexcept │ │ │ │ +1540 : _M_ptr(__r._M_ptr), _M_refcount() │ │ │ │ +1541 { │ │ │ │ +1542 _M_refcount._M_swap(__r._M_refcount); │ │ │ │ +1543 __r._M_ptr = nullptr; │ │ │ │ +1544 } │ │ │ │ +1545 │ │ │ │ +1546 template> │ │ │ │ +1547 explicit __shared_ptr(const __weak_ptr<_Yp, _Lp>& __r) │ │ │ │ +1548 : _M_refcount(__r._M_refcount) // may throw │ │ │ │ +1549 { │ │ │ │ +1550 // It is now safe to copy __r._M_ptr, as │ │ │ │ +1551 // _M_refcount(__r._M_refcount) did not throw. │ │ │ │ +1552 _M_ptr = __r._M_ptr; │ │ │ │ +1553 } │ │ │ │ +1554 │ │ │ │ +1555 // If an exception is thrown this constructor has no effect. │ │ │ │ +1556 template> │ │ │ │ +1558 __shared_ptr(unique_ptr<_Yp, _Del>&& __r) │ │ │ │ +1559 : _M_ptr(__r.get()), _M_refcount() │ │ │ │ +1560 { │ │ │ │ +1561 auto __raw = __to_address(__r.get()); │ │ │ │ +1562 _M_refcount = __shared_count<_Lp>(_s_t_d_:_:_m_o_v_e(__r)); │ │ │ │ +1563 _M_enable_shared_from_this_with(__raw); │ │ │ │ +1564 } │ │ │ │ +1565 │ │ │ │ +1566#if __cplusplus <= 201402L && _GLIBCXX_USE_DEPRECATED │ │ │ │ +1567 protected: │ │ │ │ +1568 // If an exception is thrown this constructor has no effect. │ │ │ │ +1569 template>, is_array<_Tp1>, │ │ │ │ +1572 is_convertible::pointer, _Tp*> │ │ │ │ +1573 >::value, bool>::type = true> │ │ │ │ +1574 __shared_ptr(unique_ptr<_Tp1, _Del>&& __r, __sp_array_delete) │ │ │ │ +1575 : _M_ptr(__r.get()), _M_refcount() │ │ │ │ +1576 { │ │ │ │ +1577 auto __raw = __to_address(__r.get()); │ │ │ │ +1578 _M_refcount = __shared_count<_Lp>(_s_t_d_:_:_m_o_v_e(__r)); │ │ │ │ +1579 _M_enable_shared_from_this_with(__raw); │ │ │ │ +1580 } │ │ │ │ +1581 public: │ │ │ │ +1582#endif │ │ │ │ +1583 │ │ │ │ +1584#if _GLIBCXX_USE_DEPRECATED │ │ │ │ +1585#pragma GCC diagnostic push │ │ │ │ +1586#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +1587 // Postcondition: use_count() == 1 and __r.get() == 0 │ │ │ │ +1588 template> │ │ │ │ +1589 __shared_ptr(auto_ptr<_Yp>&& __r); │ │ │ │ +1590#pragma GCC diagnostic pop │ │ │ │ 1591#endif │ │ │ │ -1592 this->_M_impl._M_swap_data(__x._M_impl); │ │ │ │ -1593 _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), │ │ │ │ -1594 __x._M_get_Tp_allocator()); │ │ │ │ -1595 } │ │ │ │ -1596 │ │ │ │ -1597 /** │ │ │ │ -1598 * Erases all the elements. Note that this function only erases the │ │ │ │ -1599 * elements, and that if the elements themselves are pointers, the │ │ │ │ -1600 * pointed-to memory is not touched in any way. Managing the pointer is │ │ │ │ -1601 * the user's responsibility. │ │ │ │ -1602 */ │ │ │ │ -1603 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1604 void │ │ │ │ -_1_6_0_5 _c_l_e_a_r() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -1606 { _M_erase_at_end(this->_M_impl._M_start); } │ │ │ │ -1607 │ │ │ │ -1608 protected: │ │ │ │ -1609 /** │ │ │ │ -1610 * Memory expansion handler. Uses the member allocation function to │ │ │ │ -1611 * obtain @a n bytes of memory, and then copies [first,last) into it. │ │ │ │ -1612 */ │ │ │ │ -1613 template │ │ │ │ -1614 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ -1615 pointer │ │ │ │ -_1_6_1_6 ___M___a_l_l_o_c_a_t_e___a_n_d___c_o_p_y(size_type __n, │ │ │ │ -1617 ___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r __first, ___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r __last) │ │ │ │ -1618 { │ │ │ │ -1619 pointer __result = this->_M_allocate(__n); │ │ │ │ -1620 __try │ │ │ │ -1621 { │ │ │ │ -1622 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_p_y___a(__first, __last, __result, │ │ │ │ -1623 _M_get_Tp_allocator()); │ │ │ │ -1624 return __result; │ │ │ │ -1625 } │ │ │ │ -1626 __catch(...) │ │ │ │ +1592 │ │ │ │ +1593 constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { } │ │ │ │ +1594 │ │ │ │ +1595 template │ │ │ │ +1596 _Assignable<_Yp> │ │ │ │ +1597 operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +1598 { │ │ │ │ +1599 _M_ptr = __r._M_ptr; │ │ │ │ +1600 _M_refcount = __r._M_refcount; // __shared_count::op= doesn't throw │ │ │ │ +1601 return *this; │ │ │ │ +1602 } │ │ │ │ +1603 │ │ │ │ +1604#if _GLIBCXX_USE_DEPRECATED │ │ │ │ +1605#pragma GCC diagnostic push │ │ │ │ +1606#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +1607 template │ │ │ │ +1608 _Assignable<_Yp> │ │ │ │ +1609 operator=(auto_ptr<_Yp>&& __r) │ │ │ │ +1610 { │ │ │ │ +1611 __shared_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +1612 return *this; │ │ │ │ +1613 } │ │ │ │ +1614#pragma GCC diagnostic pop │ │ │ │ +1615#endif │ │ │ │ +1616 │ │ │ │ +1617 __shared_ptr& │ │ │ │ +1618 operator=(__shared_ptr&& __r) noexcept │ │ │ │ +1619 { │ │ │ │ +1620 __shared_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +1621 return *this; │ │ │ │ +1622 } │ │ │ │ +1623 │ │ │ │ +1624 template │ │ │ │ +1625 _Assignable<_Yp> │ │ │ │ +1626 operator=(__shared_ptr<_Yp, _Lp>&& __r) noexcept │ │ │ │ 1627 { │ │ │ │ -1628 _M_deallocate(__result, __n); │ │ │ │ -1629 __throw_exception_again; │ │ │ │ +1628 __shared_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +1629 return *this; │ │ │ │ 1630 } │ │ │ │ -1631 } │ │ │ │ -1632 │ │ │ │ -1633 │ │ │ │ -1634 // Internal constructor functions follow. │ │ │ │ -1635 │ │ │ │ -1636 // Called by the range constructor to implement [23.1.1]/9 │ │ │ │ -1637 │ │ │ │ -1638#if __cplusplus < 201103L │ │ │ │ -1639 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -1640 // 438. Ambiguity in the "do the right thing" clause │ │ │ │ -1641 template │ │ │ │ -1642 void │ │ │ │ -1643 _M_initialize_dispatch(___I_n_t_e_g_e_r __n, ___I_n_t_e_g_e_r __value, __true_type) │ │ │ │ -1644 { │ │ │ │ -1645 this->_M_impl._M_start = _M_allocate(_S_check_init_len( │ │ │ │ -1646 static_cast(__n), _M_get_Tp_allocator())); │ │ │ │ -1647 this->_M_impl._M_end_of_storage = │ │ │ │ -1648 this->_M_impl._M_start + static_cast(__n); │ │ │ │ -1649 _M_fill_initialize(static_cast(__n), __value); │ │ │ │ -1650 } │ │ │ │ -1651 │ │ │ │ -1652 // Called by the range constructor to implement [23.1.1]/9 │ │ │ │ -1653 template │ │ │ │ -1654 void │ │ │ │ -1655 _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, │ │ │ │ -1656 __false_type) │ │ │ │ -1657 { │ │ │ │ -1658 _M_range_initialize(__first, __last, │ │ │ │ -1659 _s_t_d_:_:_____i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y(__first)); │ │ │ │ -1660 } │ │ │ │ -1661#endif │ │ │ │ +1631 │ │ │ │ +1632 template │ │ │ │ +1633 _UniqAssignable<_Yp, _Del> │ │ │ │ +1634 operator=(unique_ptr<_Yp, _Del>&& __r) │ │ │ │ +1635 { │ │ │ │ +1636 __shared_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +1637 return *this; │ │ │ │ +1638 } │ │ │ │ +1639 │ │ │ │ +1640 void │ │ │ │ +1641 reset() noexcept │ │ │ │ +1642 { __shared_ptr().swap(*this); } │ │ │ │ +1643 │ │ │ │ +1644 template │ │ │ │ +1645 _SafeConv<_Yp> │ │ │ │ +1646 reset(_Yp* __p) // _Yp must be complete. │ │ │ │ +1647 { │ │ │ │ +1648 // Catch self-reset errors. │ │ │ │ +1649 __glibcxx_assert(__p == nullptr || __p != _M_ptr); │ │ │ │ +1650 __shared_ptr(__p).swap(*this); │ │ │ │ +1651 } │ │ │ │ +1652 │ │ │ │ +1653 template │ │ │ │ +1654 _SafeConv<_Yp> │ │ │ │ +1655 reset(_Yp* __p, _Deleter __d) │ │ │ │ +1656 { __shared_ptr(__p, _s_t_d_:_:_m_o_v_e(__d)).swap(*this); } │ │ │ │ +1657 │ │ │ │ +1658 template │ │ │ │ +1659 _SafeConv<_Yp> │ │ │ │ +1660 reset(_Yp* __p, _Deleter __d, _Alloc __a) │ │ │ │ +1661 { __shared_ptr(__p, _s_t_d_:_:_m_o_v_e(__d), _s_t_d_:_:_m_o_v_e(__a)).swap(*this); } │ │ │ │ 1662 │ │ │ │ -1663 // Called by the second initialize_dispatch above │ │ │ │ -1664 template │ │ │ │ -1665 _GLIBCXX20_CONSTEXPR │ │ │ │ -1666 void │ │ │ │ -1667 _M_range_initialize(_InputIterator __first, _InputIterator __last, │ │ │ │ -1668 _s_t_d_:_:_i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g) │ │ │ │ -1669 { │ │ │ │ -1670 __try { │ │ │ │ -1671 for (; __first != __last; ++__first) │ │ │ │ -1672#if __cplusplus >= 201103L │ │ │ │ -1673 emplace_back(*__first); │ │ │ │ -1674#else │ │ │ │ -1675 _p_u_s_h___b_a_c_k(*__first); │ │ │ │ -1676#endif │ │ │ │ -1677 } __catch(...) { │ │ │ │ -1678 _c_l_e_a_r(); │ │ │ │ -1679 __throw_exception_again; │ │ │ │ -1680 } │ │ │ │ -1681 } │ │ │ │ -1682 │ │ │ │ -1683 // Called by the second initialize_dispatch above │ │ │ │ -1684 template │ │ │ │ -1685 _GLIBCXX20_CONSTEXPR │ │ │ │ -1686 void │ │ │ │ -1687 _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, │ │ │ │ -1688 _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g) │ │ │ │ -1689 { │ │ │ │ -1690 const size_type __n = _s_t_d_:_:_d_i_s_t_a_n_c_e(__first, __last); │ │ │ │ -1691 this->_M_impl._M_start │ │ │ │ -1692 = this->_M_allocate(_S_check_init_len(__n, _M_get_Tp_allocator())); │ │ │ │ -1693 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; │ │ │ │ -1694 this->_M_impl._M_finish = │ │ │ │ -1695 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_p_y___a(__first, __last, │ │ │ │ -1696 this->_M_impl._M_start, │ │ │ │ -1697 _M_get_Tp_allocator()); │ │ │ │ -1698 } │ │ │ │ -1699 │ │ │ │ -1700 // Called by the first initialize_dispatch above and by the │ │ │ │ -1701 // vector(n,value,a) constructor. │ │ │ │ -1702 _GLIBCXX20_CONSTEXPR │ │ │ │ -1703 void │ │ │ │ -1704 _M_fill_initialize(size_type __n, const value_type& __value) │ │ │ │ -1705 { │ │ │ │ -1706 this->_M_impl._M_finish = │ │ │ │ -1707 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___f_i_l_l___n___a(this->_M_impl._M_start, __n, __value, │ │ │ │ -1708 _M_get_Tp_allocator()); │ │ │ │ -1709 } │ │ │ │ -1710 │ │ │ │ -1711#if __cplusplus >= 201103L │ │ │ │ -1712 // Called by the vector(n) constructor. │ │ │ │ -1713 _GLIBCXX20_CONSTEXPR │ │ │ │ -1714 void │ │ │ │ -1715 _M_default_initialize(size_type __n) │ │ │ │ -1716 { │ │ │ │ -1717 this->_M_impl._M_finish = │ │ │ │ -1718 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___d_e_f_a_u_l_t___n___a(this->_M_impl._M_start, __n, │ │ │ │ -1719 _M_get_Tp_allocator()); │ │ │ │ -1720 } │ │ │ │ -1721#endif │ │ │ │ -1722 │ │ │ │ -1723 // Internal assign functions follow. The *_aux functions do the actual │ │ │ │ -1724 // assignment work for the range versions. │ │ │ │ -1725 │ │ │ │ -1726 // Called by the range assign to implement [23.1.1]/9 │ │ │ │ -1727 │ │ │ │ -1728 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -1729 // 438. Ambiguity in the "do the right thing" clause │ │ │ │ -1730 template │ │ │ │ -1731 _GLIBCXX20_CONSTEXPR │ │ │ │ -1732 void │ │ │ │ -1733 _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) │ │ │ │ -1734 { _M_fill_assign(__n, __val); } │ │ │ │ -1735 │ │ │ │ -1736 // Called by the range assign to implement [23.1.1]/9 │ │ │ │ -1737 template │ │ │ │ -1738 _GLIBCXX20_CONSTEXPR │ │ │ │ -1739 void │ │ │ │ -1740 _M_assign_dispatch(_InputIterator __first, _InputIterator __last, │ │ │ │ -1741 __false_type) │ │ │ │ -1742 { _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)); } │ │ │ │ -1743 │ │ │ │ -1744 // Called by the second assign_dispatch above │ │ │ │ -1745 template │ │ │ │ -1746 _GLIBCXX20_CONSTEXPR │ │ │ │ -1747 void │ │ │ │ -1748 _M_assign_aux(_InputIterator __first, _InputIterator __last, │ │ │ │ -1749 _s_t_d_:_:_i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g); │ │ │ │ +1663 /// Return the stored pointer. │ │ │ │ +1664 element_type* │ │ │ │ +1665 get() const noexcept │ │ │ │ +1666 { return _M_ptr; } │ │ │ │ +1667 │ │ │ │ +1668 /// Return true if the stored pointer is not null. │ │ │ │ +1669 explicit operator bool() const noexcept │ │ │ │ +1670 { return _M_ptr != nullptr; } │ │ │ │ +1671 │ │ │ │ +1672 /// Return true if use_count() == 1. │ │ │ │ +1673 bool │ │ │ │ +1674 unique() const noexcept │ │ │ │ +1675 { return _M_refcount._M_unique(); } │ │ │ │ +1676 │ │ │ │ +1677 /// If *this owns a pointer, return the number of owners, otherwise zero. │ │ │ │ +1678 long │ │ │ │ +1679 use_count() const noexcept │ │ │ │ +1680 { return _M_refcount._M_get_use_count(); } │ │ │ │ +1681 │ │ │ │ +1682 /// Exchange both the owned pointer and the stored pointer. │ │ │ │ +1683 void │ │ │ │ +1684 swap(__shared_ptr<_Tp, _Lp>& __other) noexcept │ │ │ │ +1685 { │ │ │ │ +1686 _s_t_d_:_:_s_w_a_p(_M_ptr, __other._M_ptr); │ │ │ │ +1687 _M_refcount._M_swap(__other._M_refcount); │ │ │ │ +1688 } │ │ │ │ +1689 │ │ │ │ +1690 /** @brief Define an ordering based on ownership. │ │ │ │ +1691 * │ │ │ │ +1692 * This function defines a strict weak ordering between two shared_ptr │ │ │ │ +1693 * or weak_ptr objects, such that one object is less than the other │ │ │ │ +1694 * unless they share ownership of the same pointer, or are both empty. │ │ │ │ +1695 * @{ │ │ │ │ +1696 */ │ │ │ │ +1697 template │ │ │ │ +1698 bool │ │ │ │ +1699 owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const noexcept │ │ │ │ +1700 { return _M_refcount._M_less(__rhs._M_refcount); } │ │ │ │ +1701 │ │ │ │ +1702 template │ │ │ │ +1703 bool │ │ │ │ +1704 owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const noexcept │ │ │ │ +1705 { return _M_refcount._M_less(__rhs._M_refcount); } │ │ │ │ +1706 /// @} │ │ │ │ +1707 │ │ │ │ +1708 protected: │ │ │ │ +1709 // This constructor is non-standard, it is used by allocate_shared. │ │ │ │ +1710 template │ │ │ │ +1711 __shared_ptr(_Sp_alloc_shared_tag<_Alloc> __tag, _Args&&... __args) │ │ │ │ +1712 : _M_ptr(), _M_refcount(_M_ptr, __tag, _s_t_d::_f_o_r_w_a_r_d<_Args>(__args)...) │ │ │ │ +1713 { _M_enable_shared_from_this_with(_M_ptr); } │ │ │ │ +1714 │ │ │ │ +1715 template │ │ │ │ +1717 friend __shared_ptr<_Tp1, _Lp1> │ │ │ │ +1718 __allocate_shared(const _Alloc& __a, _Args&&... __args); │ │ │ │ +1719 │ │ │ │ +1720#if __cpp_lib_shared_ptr_arrays >= 201707L │ │ │ │ +1721 // This constructor is non-standard, it is used by allocate_shared. │ │ │ │ +1722 template*> │ │ │ │ +1723 __shared_ptr(const _Sp_counted_array_base<_Alloc>& __a, │ │ │ │ +1724 _Init __init = nullptr) │ │ │ │ +1725 : _M_ptr(), _M_refcount(_M_ptr, __a, __init) │ │ │ │ +1726 { } │ │ │ │ +1727#endif │ │ │ │ +1728 │ │ │ │ +1729 // This constructor is used by __weak_ptr::lock() and │ │ │ │ +1730 // shared_ptr::shared_ptr(const weak_ptr&, std::nothrow_t). │ │ │ │ +1731 __shared_ptr(const __weak_ptr<_Tp, _Lp>& __r, std::nothrow_t) noexcept │ │ │ │ +1732 : _M_refcount(__r._M_refcount, std::nothrow) │ │ │ │ +1733 { │ │ │ │ +1734 _M_ptr = _M_refcount._M_get_use_count() ? __r._M_ptr : nullptr; │ │ │ │ +1735 } │ │ │ │ +1736 │ │ │ │ +1737 friend class __weak_ptr<_Tp, _Lp>; │ │ │ │ +1738 │ │ │ │ +1739 private: │ │ │ │ +1740 │ │ │ │ +1741 template │ │ │ │ +1742 using __esft_base_t = decltype(__enable_shared_from_this_base( │ │ │ │ +1743 _s_t_d_:_:_d_e_c_l_v_a_l&>(), │ │ │ │ +1744 _s_t_d_:_:_d_e_c_l_v_a_l_<___Y_p_*_>())); │ │ │ │ +1745 │ │ │ │ +1746 // Detect an accessible and unambiguous enable_shared_from_this base. │ │ │ │ +1747 template │ │ │ │ +1748 struct __has_esft_base │ │ │ │ +1749 : _f_a_l_s_e___t_y_p_e { }; │ │ │ │ 1750 │ │ │ │ -1751 // Called by the second assign_dispatch above │ │ │ │ -1752 template │ │ │ │ -1753 _GLIBCXX20_CONSTEXPR │ │ │ │ -1754 void │ │ │ │ -1755 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, │ │ │ │ -1756 _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g); │ │ │ │ -1757 │ │ │ │ -1758 // Called by assign(n,t), and the range assign when it turns out │ │ │ │ -1759 // to be the same thing. │ │ │ │ -1760 _GLIBCXX20_CONSTEXPR │ │ │ │ -1761 void │ │ │ │ -1762 _M_fill_assign(size_type __n, const value_type& __val); │ │ │ │ -1763 │ │ │ │ -1764 // Internal insert functions follow. │ │ │ │ -1765 │ │ │ │ -1766 // Called by the range insert to implement [23.1.1]/9 │ │ │ │ +1751 template │ │ │ │ +1752 struct __has_esft_base<_Yp, __void_t<__esft_base_t<_Yp>>> │ │ │ │ +1753 : __not_> { }; // No enable shared_from_this for arrays │ │ │ │ +1754 │ │ │ │ +1755 template::type> │ │ │ │ +1756 typename enable_if<__has_esft_base<_Yp2>::value>::type │ │ │ │ +1757 _M_enable_shared_from_this_with(_Yp* __p) noexcept │ │ │ │ +1758 { │ │ │ │ +1759 if (auto __base = __enable_shared_from_this_base(_M_refcount, __p)) │ │ │ │ +1760 _____b_a_s_e->_M_weak_assign(const_cast<_Yp2*>(__p), _M_refcount); │ │ │ │ +1761 } │ │ │ │ +1762 │ │ │ │ +1763 template::type> │ │ │ │ +1764 typename enable_if::value>::type │ │ │ │ +1765 _M_enable_shared_from_this_with(_Yp*) noexcept │ │ │ │ +1766 { } │ │ │ │ 1767 │ │ │ │ -1768 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -1769 // 438. Ambiguity in the "do the right thing" clause │ │ │ │ -1770 template │ │ │ │ -1771 _GLIBCXX20_CONSTEXPR │ │ │ │ -1772 void │ │ │ │ -1773 _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, │ │ │ │ -1774 __true_type) │ │ │ │ -1775 { _M_fill_insert(__pos, __n, __val); } │ │ │ │ -1776 │ │ │ │ -1777 // Called by the range insert to implement [23.1.1]/9 │ │ │ │ -1778 template │ │ │ │ -1779 _GLIBCXX20_CONSTEXPR │ │ │ │ -1780 void │ │ │ │ -1781 _M_insert_dispatch(iterator __pos, _InputIterator __first, │ │ │ │ -1782 _InputIterator __last, __false_type) │ │ │ │ -1783 { │ │ │ │ -1784 _M_range_insert(__pos, __first, __last, │ │ │ │ -1785 _s_t_d_:_:_____i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y(__first)); │ │ │ │ -1786 } │ │ │ │ -1787 │ │ │ │ -1788 // Called by the second insert_dispatch above │ │ │ │ -1789 template │ │ │ │ -1790 _GLIBCXX20_CONSTEXPR │ │ │ │ -1791 void │ │ │ │ -1792 _M_range_insert(iterator __pos, _InputIterator __first, │ │ │ │ -1793 _InputIterator __last, _s_t_d_:_:_i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g); │ │ │ │ -1794 │ │ │ │ -1795 // Called by the second insert_dispatch above │ │ │ │ -1796 template │ │ │ │ -1797 _GLIBCXX20_CONSTEXPR │ │ │ │ -1798 void │ │ │ │ -1799 _M_range_insert(iterator __pos, _ForwardIterator __first, │ │ │ │ -1800 _ForwardIterator __last, _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g); │ │ │ │ +1768 void* │ │ │ │ +1769 _M_get_deleter(const _s_t_d_:_:_t_y_p_e___i_n_f_o& __ti) const noexcept │ │ │ │ +1770 { return _M_refcount._M_get_deleter(__ti); } │ │ │ │ +1771 │ │ │ │ +1772 template friend class __shared_ptr; │ │ │ │ +1773 template friend class __weak_ptr; │ │ │ │ +1774 │ │ │ │ +1775 template │ │ │ │ +1776 friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept; │ │ │ │ +1777 │ │ │ │ +1778 template │ │ │ │ +1779 friend _Del* get_deleter(const shared_ptr<_Tp1>&) noexcept; │ │ │ │ +1780 │ │ │ │ +1781#if __cplusplus >= 202002L │ │ │ │ +1782 friend _Sp_atomic>; │ │ │ │ +1783#endif │ │ │ │ +1784 │ │ │ │ +1785 element_type* _M_ptr; // Contained pointer. │ │ │ │ +1786 __shared_count<_Lp> _M_refcount; // Reference counter. │ │ │ │ +1787 }; │ │ │ │ +1788 │ │ │ │ +1789 │ │ │ │ +1790 // 20.7.2.2.7 shared_ptr comparisons │ │ │ │ +1791 template │ │ │ │ +1792 inline bool │ │ │ │ +1793 operator==(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1794 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1795 { return __a.get() == __b.get(); } │ │ │ │ +1796 │ │ │ │ +1797 template │ │ │ │ +1798 inline bool │ │ │ │ +1799 operator==(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1800 { return !__a; } │ │ │ │ 1801 │ │ │ │ -1802 // Called by insert(p,n,x), and the range insert when it turns out to be │ │ │ │ -1803 // the same thing. │ │ │ │ -1804 _GLIBCXX20_CONSTEXPR │ │ │ │ -1805 void │ │ │ │ -1806 _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); │ │ │ │ -1807 │ │ │ │ -1808#if __cplusplus >= 201103L │ │ │ │ -1809 // Called by resize(n). │ │ │ │ -1810 _GLIBCXX20_CONSTEXPR │ │ │ │ -1811 void │ │ │ │ -1812 _M_default_append(size_type __n); │ │ │ │ -1813 │ │ │ │ -1814 _GLIBCXX20_CONSTEXPR │ │ │ │ -1815 bool │ │ │ │ -1816 _M_shrink_to_fit(); │ │ │ │ -1817#endif │ │ │ │ -1818 │ │ │ │ -1819#if __cplusplus < 201103L │ │ │ │ -1820 // Called by insert(p,x) │ │ │ │ -1821 void │ │ │ │ -1822 _M_insert_aux(iterator __position, const value_type& __x); │ │ │ │ -1823 │ │ │ │ -1824 void │ │ │ │ -1825 _M_realloc_insert(iterator __position, const value_type& __x); │ │ │ │ -1826#else │ │ │ │ -1827 // A value_type object constructed with _Alloc_traits::construct() │ │ │ │ -1828 // and destroyed with _Alloc_traits::destroy(). │ │ │ │ -1829 struct _Temporary_value │ │ │ │ -1830 { │ │ │ │ -1831 template │ │ │ │ -1832 _GLIBCXX20_CONSTEXPR explicit │ │ │ │ -1833 _Temporary_value(_v_e_c_t_o_r* __vec, _Args&&... __args) : _M_this(__vec) │ │ │ │ -1834 { │ │ │ │ -1835 _Alloc_traits::construct(_M_this->_M_impl, _M_ptr(), │ │ │ │ -1836 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ -1837 } │ │ │ │ -1838 │ │ │ │ -1839 _GLIBCXX20_CONSTEXPR │ │ │ │ -1840 ~_Temporary_value() │ │ │ │ -1841 { _Alloc_traits::destroy(_M_this->_M_impl, _M_ptr()); } │ │ │ │ -1842 │ │ │ │ -1843 _GLIBCXX20_CONSTEXPR value_type& │ │ │ │ -1844 _M_val() noexcept { return _M_storage._M_val; } │ │ │ │ -1845 │ │ │ │ -1846 private: │ │ │ │ -1847 _GLIBCXX20_CONSTEXPR _Tp* │ │ │ │ -1848 _M_ptr() noexcept { return _s_t_d_:_:_____a_d_d_r_e_s_s_o_f(_M_storage._M_val); } │ │ │ │ -1849 │ │ │ │ -1850 union _Storage │ │ │ │ -1851 { │ │ │ │ -1852 constexpr _Storage() : _M_byte() { } │ │ │ │ -1853 _GLIBCXX20_CONSTEXPR ~_Storage() { } │ │ │ │ -1854 _Storage& operator=(const _Storage&) = delete; │ │ │ │ -1855 unsigned char _M_byte; │ │ │ │ -1856 _Tp _M_val; │ │ │ │ -1857 }; │ │ │ │ -1858 │ │ │ │ -1859 _v_e_c_t_o_r* _M_this; │ │ │ │ -1860 _Storage _M_storage; │ │ │ │ -1861 }; │ │ │ │ -1862 │ │ │ │ -1863 // Called by insert(p,x) and other functions when insertion needs to │ │ │ │ -1864 // reallocate or move existing elements. _Arg is either _Tp& or _Tp. │ │ │ │ -1865 template │ │ │ │ -1866 _GLIBCXX20_CONSTEXPR │ │ │ │ -1867 void │ │ │ │ -1868 _M_insert_aux(iterator __position, _Arg&& __arg); │ │ │ │ -1869 │ │ │ │ -1870 template │ │ │ │ -1871 _GLIBCXX20_CONSTEXPR │ │ │ │ -1872 void │ │ │ │ -1873 _M_realloc_insert(iterator __position, _Args&&... __args); │ │ │ │ -1874 │ │ │ │ -1875 // Either move-construct at the end, or forward to _M_insert_aux. │ │ │ │ -1876 _GLIBCXX20_CONSTEXPR │ │ │ │ -1877 iterator │ │ │ │ -1878 _M_insert_rval(const_iterator __position, value_type&& __v); │ │ │ │ -1879 │ │ │ │ -1880 // Try to emplace at the end, otherwise forward to _M_insert_aux. │ │ │ │ -1881 template │ │ │ │ -1882 _GLIBCXX20_CONSTEXPR │ │ │ │ -1883 iterator │ │ │ │ -1884 _M_emplace_aux(const_iterator __position, _Args&&... __args); │ │ │ │ -1885 │ │ │ │ -1886 // Emplacing an rvalue of the correct type can use _M_insert_rval. │ │ │ │ -1887 _GLIBCXX20_CONSTEXPR │ │ │ │ -1888 iterator │ │ │ │ -1889 _M_emplace_aux(const_iterator __position, value_type&& __v) │ │ │ │ -1890 { return _M_insert_rval(__position, _s_t_d_:_:_m_o_v_e(__v)); } │ │ │ │ -1891#endif │ │ │ │ -1892 │ │ │ │ -1893 // Called by _M_fill_insert, _M_insert_aux etc. │ │ │ │ -1894 _GLIBCXX20_CONSTEXPR │ │ │ │ -1895 size_type │ │ │ │ -1896 _M_check_len(size_type __n, const char* __s) const │ │ │ │ -1897 { │ │ │ │ -1898 if (_m_a_x___s_i_z_e() - _s_i_z_e() < __n) │ │ │ │ -1899 __throw_length_error(__N(__s)); │ │ │ │ -1900 │ │ │ │ -1901 const size_type __len = _s_i_z_e() + (_s_t_d_:_:_m_a_x)(_s_i_z_e(), __n); │ │ │ │ -1902 return (__len < _s_i_z_e() || __len > _m_a_x___s_i_z_e()) ? _m_a_x___s_i_z_e() : __len; │ │ │ │ -1903 } │ │ │ │ -1904 │ │ │ │ -1905 // Called by constructors to check initial size. │ │ │ │ -1906 static _GLIBCXX20_CONSTEXPR size_type │ │ │ │ -1907 _S_check_init_len(size_type __n, const allocator_type& __a) │ │ │ │ -1908 { │ │ │ │ -1909 if (__n > _S_max_size(_Tp_alloc_type(__a))) │ │ │ │ -1910 __throw_length_error( │ │ │ │ -1911 __N("cannot create std::vector larger than max_size()")); │ │ │ │ -1912 return __n; │ │ │ │ -1913 } │ │ │ │ -1914 │ │ │ │ -1915 static _GLIBCXX20_CONSTEXPR size_type │ │ │ │ -1916 _S_max_size(const _Tp_alloc_type& __a) _GLIBCXX_NOEXCEPT │ │ │ │ -1917 { │ │ │ │ -1918 // std::distance(begin(), end()) cannot be greater than PTRDIFF_MAX, │ │ │ │ -1919 // and realistically we can't store more than PTRDIFF_MAX/sizeof(T) │ │ │ │ -1920 // (even if std::allocator_traits::max_size says we can). │ │ │ │ -1921 const size_t __diffmax │ │ │ │ -1922 = __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); │ │ │ │ -1923 const size_t __allocmax = ___A_l_l_o_c___t_r_a_i_t_s_:_:_m_a_x___s_i_z_e(__a); │ │ │ │ -1924 return (_s_t_d_:_:_m_i_n)(__diffmax, __allocmax); │ │ │ │ -1925 } │ │ │ │ -1926 │ │ │ │ -1927 // Internal erase functions follow. │ │ │ │ -1928 │ │ │ │ -1929 // Called by erase(q1,q2), clear(), resize(), _M_fill_assign, │ │ │ │ -1930 // _M_assign_aux. │ │ │ │ -1931 _GLIBCXX20_CONSTEXPR │ │ │ │ -1932 void │ │ │ │ -1933 _M_erase_at_end(pointer __pos) _GLIBCXX_NOEXCEPT │ │ │ │ -1934 { │ │ │ │ -1935 if (size_type __n = this->_M_impl._M_finish - __pos) │ │ │ │ -1936 { │ │ │ │ -1937 _s_t_d_:_:___D_e_s_t_r_o_y(__pos, this->_M_impl._M_finish, │ │ │ │ -1938 _M_get_Tp_allocator()); │ │ │ │ -1939 this->_M_impl._M_finish = __pos; │ │ │ │ -1940 _GLIBCXX_ASAN_ANNOTATE_SHRINK(__n); │ │ │ │ -1941 } │ │ │ │ -1942 } │ │ │ │ -1943 │ │ │ │ -1944 _GLIBCXX20_CONSTEXPR │ │ │ │ -1945 iterator │ │ │ │ -1946 _M_erase(iterator __position); │ │ │ │ +1802#ifdef __cpp_lib_three_way_comparison │ │ │ │ +1803 template │ │ │ │ +1804 inline strong_ordering │ │ │ │ +1805 operator<=>(const __shared_ptr<_Tp, _Lp>& __a, │ │ │ │ +1806 const __shared_ptr<_Up, _Lp>& __b) noexcept │ │ │ │ +1807 { return compare_three_way()(__a.get(), __b.get()); } │ │ │ │ +1808 │ │ │ │ +1809 template │ │ │ │ +1810 inline strong_ordering │ │ │ │ +1811 operator<=>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1812 { │ │ │ │ +1813 using pointer = typename __shared_ptr<_Tp, _Lp>::element_type*; │ │ │ │ +1814 return compare_three_way()(__a.get(), static_cast(nullptr)); │ │ │ │ +1815 } │ │ │ │ +1816#else │ │ │ │ +1817 template │ │ │ │ +1818 inline bool │ │ │ │ +1819 operator==(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1820 { return !__a; } │ │ │ │ +1821 │ │ │ │ +1822 template │ │ │ │ +1823 inline bool │ │ │ │ +1824 operator!=(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1825 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1826 { return __a.get() != __b.get(); } │ │ │ │ +1827 │ │ │ │ +1828 template │ │ │ │ +1829 inline bool │ │ │ │ +1830 operator!=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1831 { return (bool)__a; } │ │ │ │ +1832 │ │ │ │ +1833 template │ │ │ │ +1834 inline bool │ │ │ │ +1835 operator!=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1836 { return (bool)__a; } │ │ │ │ +1837 │ │ │ │ +1838 template │ │ │ │ +1839 inline bool │ │ │ │ +1840 operator<(const __shared_ptr<_Tp, _Lp>& __a, │ │ │ │ +1841 const __shared_ptr<_Up, _Lp>& __b) noexcept │ │ │ │ +1842 { │ │ │ │ +1843 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; │ │ │ │ +1844 using _Up_elt = typename __shared_ptr<_Up, _Lp>::element_type; │ │ │ │ +1845 using _Vp = typename common_type<_Tp_elt*, _Up_elt*>::type; │ │ │ │ +1846 return less<_Vp>()(__a.get(), __b.get()); │ │ │ │ +1847 } │ │ │ │ +1848 │ │ │ │ +1849 template │ │ │ │ +1850 inline bool │ │ │ │ +1851 operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1852 { │ │ │ │ +1853 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; │ │ │ │ +1854 return less<_Tp_elt*>()(__a.get(), nullptr); │ │ │ │ +1855 } │ │ │ │ +1856 │ │ │ │ +1857 template │ │ │ │ +1858 inline bool │ │ │ │ +1859 operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1860 { │ │ │ │ +1861 using _Tp_elt = typename __shared_ptr<_Tp, _Lp>::element_type; │ │ │ │ +1862 return less<_Tp_elt*>()(nullptr, __a.get()); │ │ │ │ +1863 } │ │ │ │ +1864 │ │ │ │ +1865 template │ │ │ │ +1866 inline bool │ │ │ │ +1867 operator<=(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1868 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1869 { return !(__b < __a); } │ │ │ │ +1870 │ │ │ │ +1871 template │ │ │ │ +1872 inline bool │ │ │ │ +1873 operator<=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1874 { return !(nullptr < __a); } │ │ │ │ +1875 │ │ │ │ +1876 template │ │ │ │ +1877 inline bool │ │ │ │ +1878 operator<=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1879 { return !(__a < nullptr); } │ │ │ │ +1880 │ │ │ │ +1881 template │ │ │ │ +1882 inline bool │ │ │ │ +1883 operator>(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1884 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1885 { return (__b < __a); } │ │ │ │ +1886 │ │ │ │ +1887 template │ │ │ │ +1888 inline bool │ │ │ │ +1889 operator>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1890 { return nullptr < __a; } │ │ │ │ +1891 │ │ │ │ +1892 template │ │ │ │ +1893 inline bool │ │ │ │ +1894 operator>(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1895 { return __a < nullptr; } │ │ │ │ +1896 │ │ │ │ +1897 template │ │ │ │ +1898 inline bool │ │ │ │ +1899 operator>=(const __shared_ptr<_Tp1, _Lp>& __a, │ │ │ │ +1900 const __shared_ptr<_Tp2, _Lp>& __b) noexcept │ │ │ │ +1901 { return !(__a < __b); } │ │ │ │ +1902 │ │ │ │ +1903 template │ │ │ │ +1904 inline bool │ │ │ │ +1905 operator>=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept │ │ │ │ +1906 { return !(__a < nullptr); } │ │ │ │ +1907 │ │ │ │ +1908 template │ │ │ │ +1909 inline bool │ │ │ │ +1910 operator>=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept │ │ │ │ +1911 { return !(nullptr < __a); } │ │ │ │ +1912#endif // three-way comparison │ │ │ │ +1913 │ │ │ │ +1914 // 20.7.2.2.8 shared_ptr specialized algorithms. │ │ │ │ +1915 template │ │ │ │ +1916 inline void │ │ │ │ +1917 swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept │ │ │ │ +1918 { __a.swap(__b); } │ │ │ │ +1919 │ │ │ │ +1920 // 20.7.2.2.9 shared_ptr casts │ │ │ │ +1921 │ │ │ │ +1922 // The seemingly equivalent code: │ │ │ │ +1923 // shared_ptr<_Tp, _Lp>(static_cast<_Tp*>(__r.get())) │ │ │ │ +1924 // will eventually result in undefined behaviour, attempting to │ │ │ │ +1925 // delete the same object twice. │ │ │ │ +1926 /// static_pointer_cast │ │ │ │ +1927 template │ │ │ │ +1928 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_9_2_9 _s_t_a_t_i_c___p_o_i_n_t_e_r___c_a_s_t(const _____s_h_a_r_e_d___p_t_r_<___T_p_1_,_ ___L_p_>& __r) noexcept │ │ │ │ +1930 { │ │ │ │ +1931 using ___S_p = _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>; │ │ │ │ +1932 return ___S_p(__r, static_cast<_t_y_p_e_n_a_m_e _Sp::element_type*>(__r.get())); │ │ │ │ +1933 } │ │ │ │ +1934 │ │ │ │ +1935 // The seemingly equivalent code: │ │ │ │ +1936 // shared_ptr<_Tp, _Lp>(const_cast<_Tp*>(__r.get())) │ │ │ │ +1937 // will eventually result in undefined behaviour, attempting to │ │ │ │ +1938 // delete the same object twice. │ │ │ │ +1939 /// const_pointer_cast │ │ │ │ +1940 template │ │ │ │ +1941 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_9_4_2 _c_o_n_s_t___p_o_i_n_t_e_r___c_a_s_t(const _____s_h_a_r_e_d___p_t_r_<___T_p_1_,_ ___L_p_>& __r) noexcept │ │ │ │ +1943 { │ │ │ │ +1944 using ___S_p = _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>; │ │ │ │ +1945 return ___S_p(__r, const_cast<_t_y_p_e_n_a_m_e _Sp::element_type*>(__r.get())); │ │ │ │ +1946 } │ │ │ │ 1947 │ │ │ │ -1948 _GLIBCXX20_CONSTEXPR │ │ │ │ -1949 iterator │ │ │ │ -1950 _M_erase(iterator __first, iterator __last); │ │ │ │ -1951 │ │ │ │ -1952#if __cplusplus >= 201103L │ │ │ │ -1953 private: │ │ │ │ -1954 // Constant-time move assignment when source object's memory can be │ │ │ │ -1955 // moved, either because the source's allocator will move too │ │ │ │ -1956 // or because the allocators are equal. │ │ │ │ -1957 _GLIBCXX20_CONSTEXPR │ │ │ │ -1958 void │ │ │ │ -1959 _M_move_assign(_v_e_c_t_o_r&& __x, _t_r_u_e___t_y_p_e) noexcept │ │ │ │ -1960 { │ │ │ │ -1961 _v_e_c_t_o_r __tmp(_g_e_t___a_l_l_o_c_a_t_o_r()); │ │ │ │ -1962 this->_M_impl._M_swap_data(__x._M_impl); │ │ │ │ -1963 __tmp._M_impl._M_swap_data(__x._M_impl); │ │ │ │ -1964 _s_t_d_:_:_____a_l_l_o_c___o_n___m_o_v_e(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); │ │ │ │ -1965 } │ │ │ │ -1966 │ │ │ │ -1967 // Do move assignment when it might not be possible to move source │ │ │ │ -1968 // object's memory, resulting in a linear-time operation. │ │ │ │ -1969 _GLIBCXX20_CONSTEXPR │ │ │ │ -1970 void │ │ │ │ -1971 _M_move_assign(_v_e_c_t_o_r&& __x, _f_a_l_s_e___t_y_p_e) │ │ │ │ -1972 { │ │ │ │ -1973 if (__x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) │ │ │ │ -1974 _M_move_assign(_s_t_d_:_:_m_o_v_e(__x), _t_r_u_e___t_y_p_e()); │ │ │ │ -1975 else │ │ │ │ -1976 { │ │ │ │ -1977 // The rvalue's allocator cannot be moved and is not equal, │ │ │ │ -1978 // so we need to individually move each element. │ │ │ │ -1979 this->_M_assign_aux(std::make_move_iterator(__x.begin()), │ │ │ │ -1980 std::make_move_iterator(__x.end()), │ │ │ │ -1981 _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()); │ │ │ │ -1982 __x.clear(); │ │ │ │ -1983 } │ │ │ │ -1984 } │ │ │ │ -1985#endif │ │ │ │ +1948 // The seemingly equivalent code: │ │ │ │ +1949 // shared_ptr<_Tp, _Lp>(dynamic_cast<_Tp*>(__r.get())) │ │ │ │ +1950 // will eventually result in undefined behaviour, attempting to │ │ │ │ +1951 // delete the same object twice. │ │ │ │ +1952 /// dynamic_pointer_cast │ │ │ │ +1953 template │ │ │ │ +1954 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +_1_9_5_5 _d_y_n_a_m_i_c___p_o_i_n_t_e_r___c_a_s_t(const _____s_h_a_r_e_d___p_t_r_<___T_p_1_,_ ___L_p_>& __r) noexcept │ │ │ │ +1956 { │ │ │ │ +1957 using ___S_p = _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>; │ │ │ │ +1958 if (auto* __p = dynamic_cast<_t_y_p_e_n_a_m_e _Sp::element_type*>(__r.get())) │ │ │ │ +1959 return ___S_p(__r, __p); │ │ │ │ +1960 return ___S_p(); │ │ │ │ +1961 } │ │ │ │ +1962 │ │ │ │ +1963#if __cplusplus > 201402L │ │ │ │ +1964 template │ │ │ │ +1965 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +1966 reinterpret_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept │ │ │ │ +1967 { │ │ │ │ +1968 using _Sp = __shared_ptr<_Tp, _Lp>; │ │ │ │ +1969 return _Sp(__r, reinterpret_cast(__r.get())); │ │ │ │ +1970 } │ │ │ │ +1971#endif │ │ │ │ +1972 │ │ │ │ +1973 template │ │ │ │ +1974 class __weak_ptr │ │ │ │ +1975 { │ │ │ │ +1976 template │ │ │ │ +1977 using _Compatible = typename │ │ │ │ +1978 enable_if<__sp_compatible_with<_Yp*, _Tp*>::value, _Res>::type; │ │ │ │ +1979 │ │ │ │ +1980 // Constraint for assignment from shared_ptr and weak_ptr: │ │ │ │ +1981 template │ │ │ │ +1982 using _Assignable = _Compatible<_Yp, __weak_ptr&>; │ │ │ │ +1983 │ │ │ │ +1984 public: │ │ │ │ +1985 using element_type = typename remove_extent<_Tp>::type; │ │ │ │ 1986 │ │ │ │ -1987 template │ │ │ │ -1988 _GLIBCXX20_CONSTEXPR │ │ │ │ -1989 _Up* │ │ │ │ -1990 _M_data_ptr(_Up* __ptr) const _GLIBCXX_NOEXCEPT │ │ │ │ -1991 { return __ptr; } │ │ │ │ +1987 constexpr __weak_ptr() noexcept │ │ │ │ +1988 : _M_ptr(nullptr), _M_refcount() │ │ │ │ +1989 { } │ │ │ │ +1990 │ │ │ │ +1991 __weak_ptr(const __weak_ptr&) noexcept = default; │ │ │ │ 1992 │ │ │ │ -1993#if __cplusplus >= 201103L │ │ │ │ -1994 template │ │ │ │ -1995 _GLIBCXX20_CONSTEXPR │ │ │ │ -1996 typename _s_t_d_:_:_p_o_i_n_t_e_r___t_r_a_i_t_s_<___P_t_r_>_:_:_e_l_e_m_e_n_t___t_y_p_e* │ │ │ │ -1997 _M_data_ptr(_Ptr __ptr) const │ │ │ │ -1998 { return _e_m_p_t_y() ? nullptr : std::__to_address(__ptr); } │ │ │ │ -1999#else │ │ │ │ -2000 template │ │ │ │ -2001 _Up* │ │ │ │ -2002 _M_data_ptr(_Up* __ptr) _GLIBCXX_NOEXCEPT │ │ │ │ -2003 { return __ptr; } │ │ │ │ -2004 │ │ │ │ -2005 template │ │ │ │ -2006 value_type* │ │ │ │ -2007 _M_data_ptr(_Ptr __ptr) │ │ │ │ -2008 { return _e_m_p_t_y() ? (value_type*)0 : __ptr.operator->(); } │ │ │ │ -2009 │ │ │ │ -2010 template │ │ │ │ -2011 const value_type* │ │ │ │ -2012 _M_data_ptr(_Ptr __ptr) const │ │ │ │ -2013 { return _e_m_p_t_y() ? (const value_type*)0 : __ptr.operator->(); } │ │ │ │ -2014#endif │ │ │ │ -2015 }; │ │ │ │ -2016 │ │ │ │ -2017#if __cpp_deduction_guides >= 201606 │ │ │ │ -2018 template::value_type, │ │ │ │ -2020 typename _Allocator = allocator<_ValT>, │ │ │ │ -2021 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -2022 typename = _RequireAllocator<_Allocator>> │ │ │ │ -2023 vector(_InputIterator, _InputIterator, _Allocator = _Allocator()) │ │ │ │ -2024 -> vector<_ValT, _Allocator>; │ │ │ │ -2025#endif │ │ │ │ -2026 │ │ │ │ -2027 /** │ │ │ │ -2028 * @brief Vector equality comparison. │ │ │ │ -2029 * @param __x A %vector. │ │ │ │ -2030 * @param __y A %vector of the same type as @a __x. │ │ │ │ -2031 * @return True iff the size and elements of the vectors are equal. │ │ │ │ -2032 * │ │ │ │ -2033 * This is an equivalence relation. It is linear in the size of the │ │ │ │ -2034 * vectors. Vectors are considered equivalent if their sizes are equal, │ │ │ │ -2035 * and if corresponding elements compare equal. │ │ │ │ -2036 */ │ │ │ │ -2037 template │ │ │ │ -2038 _GLIBCXX20_CONSTEXPR │ │ │ │ -2039 inline bool │ │ │ │ -_2_0_4_0 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) │ │ │ │ -2041 { return (__x.size() == __y.size() │ │ │ │ -2042 && std::equal(__x.begin(), __x.end(), __y.begin())); } │ │ │ │ -2043 │ │ │ │ -2044#if __cpp_lib_three_way_comparison // >= C++20 │ │ │ │ -2045 /** │ │ │ │ -2046 * @brief Vector ordering relation. │ │ │ │ -2047 * @param __x A `vector`. │ │ │ │ -2048 * @param __y A `vector` of the same type as `__x`. │ │ │ │ -2049 * @return A value indicating whether `__x` is less than, equal to, │ │ │ │ -2050 * greater than, or incomparable with `__y`. │ │ │ │ -2051 * │ │ │ │ -2052 * See `std::lexicographical_compare_three_way()` for how the determination │ │ │ │ -2053 * is made. This operator is used to synthesize relational operators like │ │ │ │ -2054 * `<` and `>=` etc. │ │ │ │ -2055 */ │ │ │ │ -2056 template │ │ │ │ -2057 constexpr __detail::__synth3way_t<_Tp> │ │ │ │ -2058 operator<=>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& │ │ │ │ -__y) │ │ │ │ +1993 ~__weak_ptr() = default; │ │ │ │ +1994 │ │ │ │ +1995 // The "obvious" converting constructor implementation: │ │ │ │ +1996 // │ │ │ │ +1997 // template │ │ │ │ +1998 // __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r) │ │ │ │ +1999 // : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) // never throws │ │ │ │ +2000 // { } │ │ │ │ +2001 // │ │ │ │ +2002 // has a serious problem. │ │ │ │ +2003 // │ │ │ │ +2004 // __r._M_ptr may already have been invalidated. The _M_ptr(__r._M_ptr) │ │ │ │ +2005 // conversion may require access to *__r._M_ptr (virtual inheritance). │ │ │ │ +2006 // │ │ │ │ +2007 // It is not possible to avoid spurious access violations since │ │ │ │ +2008 // in multithreaded programs __r._M_ptr may be invalidated at any point. │ │ │ │ +2009 template> │ │ │ │ +2010 __weak_ptr(const __weak_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +2011 : _M_refcount(__r._M_refcount) │ │ │ │ +2012 { _M_ptr = __r.lock().get(); } │ │ │ │ +2013 │ │ │ │ +2014 template> │ │ │ │ +2015 __weak_ptr(const __shared_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +2016 : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) │ │ │ │ +2017 { } │ │ │ │ +2018 │ │ │ │ +2019 __weak_ptr(__weak_ptr&& __r) noexcept │ │ │ │ +2020 : _M_ptr(__r._M_ptr), _M_refcount(_s_t_d_:_:_m_o_v_e(__r._M_refcount)) │ │ │ │ +2021 { __r._M_ptr = nullptr; } │ │ │ │ +2022 │ │ │ │ +2023 template> │ │ │ │ +2024 __weak_ptr(__weak_ptr<_Yp, _Lp>&& __r) noexcept │ │ │ │ +2025 : _M_ptr(__r.lock().get()), _M_refcount(_s_t_d_:_:_m_o_v_e(__r._M_refcount)) │ │ │ │ +2026 { __r._M_ptr = nullptr; } │ │ │ │ +2027 │ │ │ │ +2028 __weak_ptr& │ │ │ │ +2029 operator=(const __weak_ptr& __r) noexcept = default; │ │ │ │ +2030 │ │ │ │ +2031 template │ │ │ │ +2032 _Assignable<_Yp> │ │ │ │ +2033 operator=(const __weak_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +2034 { │ │ │ │ +2035 _M_ptr = __r.lock().get(); │ │ │ │ +2036 _M_refcount = __r._M_refcount; │ │ │ │ +2037 return *this; │ │ │ │ +2038 } │ │ │ │ +2039 │ │ │ │ +2040 template │ │ │ │ +2041 _Assignable<_Yp> │ │ │ │ +2042 operator=(const __shared_ptr<_Yp, _Lp>& __r) noexcept │ │ │ │ +2043 { │ │ │ │ +2044 _M_ptr = __r._M_ptr; │ │ │ │ +2045 _M_refcount = __r._M_refcount; │ │ │ │ +2046 return *this; │ │ │ │ +2047 } │ │ │ │ +2048 │ │ │ │ +2049 __weak_ptr& │ │ │ │ +2050 operator=(__weak_ptr&& __r) noexcept │ │ │ │ +2051 { │ │ │ │ +2052 __weak_ptr(_s_t_d_:_:_m_o_v_e(__r)).swap(*this); │ │ │ │ +2053 return *this; │ │ │ │ +2054 } │ │ │ │ +2055 │ │ │ │ +2056 template │ │ │ │ +2057 _Assignable<_Yp> │ │ │ │ +2058 operator=(__weak_ptr<_Yp, _Lp>&& __r) noexcept │ │ │ │ 2059 { │ │ │ │ -2060 return _s_t_d_:_:_l_e_x_i_c_o_g_r_a_p_h_i_c_a_l___c_o_m_p_a_r_e___t_h_r_e_e___w_a_y(__x.begin(), __x.end(), │ │ │ │ -2061 __y.begin(), __y.end(), │ │ │ │ -2062 __detail::__synth3way); │ │ │ │ -2063 } │ │ │ │ -2064#else │ │ │ │ -2065 /** │ │ │ │ -2066 * @brief Vector ordering relation. │ │ │ │ -2067 * @param __x A %vector. │ │ │ │ -2068 * @param __y A %vector of the same type as @a __x. │ │ │ │ -2069 * @return True iff @a __x is lexicographically less than @a __y. │ │ │ │ -2070 * │ │ │ │ -2071 * This is a total ordering relation. It is linear in the size of the │ │ │ │ -2072 * vectors. The elements must be comparable with @c <. │ │ │ │ -2073 * │ │ │ │ -2074 * See std::lexicographical_compare() for how the determination is made. │ │ │ │ -2075 */ │ │ │ │ -2076 template │ │ │ │ -_2_0_7_7 inline bool │ │ │ │ -2078 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) │ │ │ │ -2079 { return std::lexicographical_compare(__x.begin(), __x.end(), │ │ │ │ -2080 __y.begin(), __y.end()); } │ │ │ │ -2081 │ │ │ │ -2082 /// Based on operator== │ │ │ │ -2083 template │ │ │ │ -2084 inline bool │ │ │ │ -_2_0_8_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) │ │ │ │ -2086 { return !(__x == __y); } │ │ │ │ +2060 _M_ptr = __r.lock().get(); │ │ │ │ +2061 _M_refcount = _s_t_d_:_:_m_o_v_e(__r._M_refcount); │ │ │ │ +2062 __r._M_ptr = nullptr; │ │ │ │ +2063 return *this; │ │ │ │ +2064 } │ │ │ │ +2065 │ │ │ │ +2066 __shared_ptr<_Tp, _Lp> │ │ │ │ +2067 _l_o_c_k() const noexcept │ │ │ │ +2068 { return __shared_ptr<_Tp, _Lp>(*this, std::nothrow); } │ │ │ │ +2069 │ │ │ │ +2070 long │ │ │ │ +2071 use_count() const noexcept │ │ │ │ +2072 { return _M_refcount._M_get_use_count(); } │ │ │ │ +2073 │ │ │ │ +2074 bool │ │ │ │ +2075 expired() const noexcept │ │ │ │ +2076 { return _M_refcount._M_get_use_count() == 0; } │ │ │ │ +2077 │ │ │ │ +2078 template │ │ │ │ +2079 bool │ │ │ │ +2080 owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const noexcept │ │ │ │ +2081 { return _M_refcount._M_less(__rhs._M_refcount); } │ │ │ │ +2082 │ │ │ │ +2083 template │ │ │ │ +2084 bool │ │ │ │ +2085 owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const noexcept │ │ │ │ +2086 { return _M_refcount._M_less(__rhs._M_refcount); } │ │ │ │ 2087 │ │ │ │ -2088 /// Based on operator< │ │ │ │ -2089 template │ │ │ │ -2090 inline bool │ │ │ │ -_2_0_9_1 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) │ │ │ │ -2092 { return __y < __x; } │ │ │ │ -2093 │ │ │ │ -2094 /// Based on operator< │ │ │ │ -2095 template │ │ │ │ -_2_0_9_6 inline bool │ │ │ │ -2097 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) │ │ │ │ -2098 { return !(__y < __x); } │ │ │ │ -2099 │ │ │ │ -2100 /// Based on operator< │ │ │ │ -2101 template │ │ │ │ -2102 inline bool │ │ │ │ -_2_1_0_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) │ │ │ │ -2104 { return !(__x < __y); } │ │ │ │ -2105#endif // three-way comparison │ │ │ │ -2106 │ │ │ │ -2107 /// See std::vector::swap(). │ │ │ │ -2108 template │ │ │ │ -2109 _GLIBCXX20_CONSTEXPR │ │ │ │ -2110 inline void │ │ │ │ -_2_1_1_1 swap(_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) │ │ │ │ -2112 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T___I_F(noexcept(__x.swap(__y))) │ │ │ │ -2113 { __x.swap(__y); } │ │ │ │ -2114 │ │ │ │ -2115_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ -2116 │ │ │ │ -2117#if __cplusplus >= 201703L │ │ │ │ -2118 namespace __detail::__variant │ │ │ │ -2119 { │ │ │ │ -2120 template struct _Never_valueless_alt; // see │ │ │ │ -2121 │ │ │ │ -2122 // Provide the strong exception-safety guarantee when emplacing a │ │ │ │ -2123 // vector into a variant, but only if move assignment cannot throw. │ │ │ │ -2124 template │ │ │ │ -2125 struct _Never_valueless_alt<_GLIBCXX_STD_C::vector<_Tp, _Alloc>> │ │ │ │ -2126 : _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>> │ │ │ │ -2127 { }; │ │ │ │ -2128 } // namespace __detail::__variant │ │ │ │ -2129#endif // C++17 │ │ │ │ -2130 │ │ │ │ -2131_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -2132} // namespace std │ │ │ │ -2133 │ │ │ │ -2134#endif /* _STL_VECTOR_H */ │ │ │ │ +2088 void │ │ │ │ +2089 reset() noexcept │ │ │ │ +2090 { __weak_ptr().swap(*this); } │ │ │ │ +2091 │ │ │ │ +2092 void │ │ │ │ +2093 swap(__weak_ptr& __s) noexcept │ │ │ │ +2094 { │ │ │ │ +2095 _s_t_d_:_:_s_w_a_p(_M_ptr, __s._M_ptr); │ │ │ │ +2096 _M_refcount._M_swap(__s._M_refcount); │ │ │ │ +2097 } │ │ │ │ +2098 │ │ │ │ +2099 private: │ │ │ │ +2100 // Used by __enable_shared_from_this. │ │ │ │ +2101 void │ │ │ │ +2102 _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount) noexcept │ │ │ │ +2103 { │ │ │ │ +2104 if (use_count() == 0) │ │ │ │ +2105 { │ │ │ │ +2106 _M_ptr = __ptr; │ │ │ │ +2107 _M_refcount = __refcount; │ │ │ │ +2108 } │ │ │ │ +2109 } │ │ │ │ +2110 │ │ │ │ +2111 template friend class __shared_ptr; │ │ │ │ +2112 template friend class __weak_ptr; │ │ │ │ +2113 friend class __enable_shared_from_this<_Tp, _Lp>; │ │ │ │ +2114 friend class enable_shared_from_this<_Tp>; │ │ │ │ +2115#if __cplusplus >= 202002L │ │ │ │ +2116 friend _Sp_atomic>; │ │ │ │ +2117#endif │ │ │ │ +2118 │ │ │ │ +2119 element_type* _M_ptr; // Contained pointer. │ │ │ │ +2120 __weak_count<_Lp> _M_refcount; // Reference counter. │ │ │ │ +2121 }; │ │ │ │ +2122 │ │ │ │ +2123 // 20.7.2.3.6 weak_ptr specialized algorithms. │ │ │ │ +2124 template │ │ │ │ +2125 inline void │ │ │ │ +2126 swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept │ │ │ │ +2127 { __a.swap(__b); } │ │ │ │ +2128 │ │ │ │ +2129#pragma GCC diagnostic push │ │ │ │ +2130#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ +2131 template │ │ │ │ +2132 struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool> │ │ │ │ +2133 { │ │ │ │ +2134 bool │ │ │ │ +2135 operator()(const _Tp& __lhs, const _Tp& __rhs) const noexcept │ │ │ │ +2136 { return __lhs.owner_before(__rhs); } │ │ │ │ +2137 │ │ │ │ +2138 bool │ │ │ │ +2139 operator()(const _Tp& __lhs, const _Tp1& __rhs) const noexcept │ │ │ │ +2140 { return __lhs.owner_before(__rhs); } │ │ │ │ +2141 │ │ │ │ +2142 bool │ │ │ │ +2143 operator()(const _Tp1& __lhs, const _Tp& __rhs) const noexcept │ │ │ │ +2144 { return __lhs.owner_before(__rhs); } │ │ │ │ +2145 }; │ │ │ │ +2146#pragma GCC diagnostic pop │ │ │ │ +2147 │ │ │ │ +2148 template<> │ │ │ │ +2149 struct _Sp_owner_less │ │ │ │ +2150 { │ │ │ │ +2151 template │ │ │ │ +2152 auto │ │ │ │ +2153 operator()(const _Tp& __lhs, const _Up& __rhs) const noexcept │ │ │ │ +2154 -> decltype(__lhs.owner_before(__rhs)) │ │ │ │ +2155 { return __lhs.owner_before(__rhs); } │ │ │ │ +2156 │ │ │ │ +2157 using is_transparent = void; │ │ │ │ +2158 }; │ │ │ │ +2159 │ │ │ │ +2160 template │ │ │ │ +2161 struct owner_less<__shared_ptr<_Tp, _Lp>> │ │ │ │ +2162 : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>> │ │ │ │ +2163 { }; │ │ │ │ +2164 │ │ │ │ +2165 template │ │ │ │ +2166 struct owner_less<__weak_ptr<_Tp, _Lp>> │ │ │ │ +2167 : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>> │ │ │ │ +2168 { }; │ │ │ │ +2169 │ │ │ │ +2170 │ │ │ │ +2171 template │ │ │ │ +2172 class __enable_shared_from_this │ │ │ │ +2173 { │ │ │ │ +2174 protected: │ │ │ │ +2175 constexpr __enable_shared_from_this() noexcept { } │ │ │ │ +2176 │ │ │ │ +2177 __enable_shared_from_this(const __enable_shared_from_this&) noexcept { } │ │ │ │ +2178 │ │ │ │ +2179 __enable_shared_from_this& │ │ │ │ +2180 operator=(const __enable_shared_from_this&) noexcept │ │ │ │ +2181 { return *this; } │ │ │ │ +2182 │ │ │ │ +2183 ~__enable_shared_from_this() { } │ │ │ │ +2184 │ │ │ │ +2185 public: │ │ │ │ +2186 __shared_ptr<_Tp, _Lp> │ │ │ │ +2187 shared_from_this() │ │ │ │ +2188 { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); } │ │ │ │ +2189 │ │ │ │ +2190 __shared_ptr │ │ │ │ +2191 shared_from_this() const │ │ │ │ +2192 { return __shared_ptr(this->_M_weak_this); } │ │ │ │ +2193 │ │ │ │ +2194#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ +2195 __weak_ptr<_Tp, _Lp> │ │ │ │ +2196 weak_from_this() noexcept │ │ │ │ +2197 { return this->_M_weak_this; } │ │ │ │ +2198 │ │ │ │ +2199 __weak_ptr │ │ │ │ +2200 weak_from_this() const noexcept │ │ │ │ +2201 { return this->_M_weak_this; } │ │ │ │ +2202#endif │ │ │ │ +2203 │ │ │ │ +2204 private: │ │ │ │ +2205 template │ │ │ │ +2206 void │ │ │ │ +2207 _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept │ │ │ │ +2208 { _M_weak_this._M_assign(__p, __n); } │ │ │ │ +2209 │ │ │ │ +2210 friend const __enable_shared_from_this* │ │ │ │ +2211 __enable_shared_from_this_base(const __shared_count<_Lp>&, │ │ │ │ +2212 const __enable_shared_from_this* __p) │ │ │ │ +2213 { return __p; } │ │ │ │ +2214 │ │ │ │ +2215 template │ │ │ │ +2216 friend class __shared_ptr; │ │ │ │ +2217 │ │ │ │ +2218 mutable __weak_ptr<_Tp, _Lp> _M_weak_this; │ │ │ │ +2219 }; │ │ │ │ +2220 │ │ │ │ +2221 template │ │ │ │ +2223 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +2224 __allocate_shared(const _Alloc& __a, _Args&&... __args) │ │ │ │ +2225 { │ │ │ │ +2226 static_assert(!is_array<_Tp>::value, "make_shared not supported"); │ │ │ │ +2227 │ │ │ │ +2228 return __shared_ptr<_Tp, _Lp>(_Sp_alloc_shared_tag<_Alloc>{__a}, │ │ │ │ +2229 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +2230 } │ │ │ │ +2231 │ │ │ │ +2232 template │ │ │ │ +2234 inline __shared_ptr<_Tp, _Lp> │ │ │ │ +2235 __make_shared(_Args&&... __args) │ │ │ │ +2236 { │ │ │ │ +2237 typedef typename std::remove_const<_Tp>::type _Tp_nc; │ │ │ │ +2238 return _s_t_d_:_:_____a_l_l_o_c_a_t_e___s_h_a_r_e_d_<___T_p_,_ ___L_p_>(_s_t_d_:_:_a_l_l_o_c_a_t_o_r_<___T_p___n_c_>(), │ │ │ │ +2239 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +2240 } │ │ │ │ +2241 │ │ │ │ +2242 /// std::hash specialization for __shared_ptr. │ │ │ │ +2243 template │ │ │ │ +_2_2_4_4 struct _h_a_s_h<__shared_ptr<_Tp, ___L_p>> │ │ │ │ +2245 : public __hash_base> │ │ │ │ +2246 { │ │ │ │ +2247 size_t │ │ │ │ +2248 operator()(const _____s_h_a_r_e_d___p_t_r_<___T_p_,_ ___L_p_>& _____s) const noexcept │ │ │ │ +2249 { │ │ │ │ +2250 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*>()( │ │ │ │ +2251 _____s.get()); │ │ │ │ +2252 } │ │ │ │ +2253 }; │ │ │ │ +2254 │ │ │ │ +2255_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +2256} // namespace │ │ │ │ +2257 │ │ │ │ +2258#endif // _SHARED_PTR_BASE_H │ │ │ │ _c_o_m_p_a_r_e │ │ │ │ -_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t │ │ │ │ -_s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___f_u_n_c_s_._h │ │ │ │ -_f_u_n_c_t_e_x_c_e_p_t_._h │ │ │ │ -_c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ -_a_s_s_e_r_t_i_o_n_s_._h │ │ │ │ +_t_y_p_e_i_n_f_o │ │ │ │ +_b_i_t │ │ │ │ +_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h │ │ │ │ +_s_t_l___u_n_i_n_i_t_i_a_l_i_z_e_d_._h │ │ │ │ +_s_t_l___f_u_n_c_t_i_o_n_._h │ │ │ │ +_a_l_i_g_n_._h │ │ │ │ +_a_l_l_o_c_a_t_o_r_._h │ │ │ │ +_r_e_f_w_r_a_p_._h │ │ │ │ +_a_l_l_o_c_a_t_e_d___p_t_r_._h │ │ │ │ +_e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h │ │ │ │ +_u_n_i_q_u_e___p_t_r_._h │ │ │ │ +_c_o_n_c_u_r_r_e_n_c_e_._h │ │ │ │ +_a_l_i_g_n_e_d___b_u_f_f_e_r_._h │ │ │ │ +_a_t_o_m_i_c_i_t_y_._h │ │ │ │ +_s_t_d_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ +constexpr complex< _Tp > operator*(const complex< _Tp > &__x, const complex< │ │ │ │ +_Tp > &__y) │ │ │ │ +Return new complex value x times y. │ │ │ │ +DDeeffiinniittiioonn _c_o_m_p_l_e_x_:_3_9_5 │ │ │ │ +_s_t_d_:_:_u_n_i_n_i_t_i_a_l_i_z_e_d___d_e_f_a_u_l_t___c_o_n_s_t_r_u_c_t___n │ │ │ │ +_ForwardIterator uninitialized_default_construct_n(_ForwardIterator __first, │ │ │ │ +_Size __count) │ │ │ │ +Default-initializes objects in the range [first,first+count). │ │ │ │ +DDeeffiinniittiioonn _s_t_l___u_n_i_n_i_t_i_a_l_i_z_e_d_._h_:_9_9_2 │ │ │ │ +_s_t_d_:_:_a_l_i_g_n │ │ │ │ +void * align(size_t __align, size_t __size, void *&__ptr, size_t &__space) │ │ │ │ +noexcept │ │ │ │ +Fit aligned storage in buffer. │ │ │ │ +DDeeffiinniittiioonn _a_l_i_g_n_._h_:_6_2 │ │ │ │ +_s_t_d_:_:_t_o___a_d_d_r_e_s_s │ │ │ │ +constexpr _Tp * to_address(_Tp *__ptr) noexcept │ │ │ │ +Obtain address referenced by a pointer to an object. │ │ │ │ +DDeeffiinniittiioonn _p_t_r___t_r_a_i_t_s_._h_:_2_5_0 │ │ │ │ _s_t_d_:_:_t_r_u_e___t_y_p_e │ │ │ │ integral_constant< bool, true > true_type │ │ │ │ The type used as a compile-time boolean with true value. │ │ │ │ DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_8_2 │ │ │ │ _s_t_d_:_:_f_a_l_s_e___t_y_p_e │ │ │ │ integral_constant< bool, false > false_type │ │ │ │ The type used as a compile-time boolean with false value. │ │ │ │ DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_8_5 │ │ │ │ -_s_t_d_:_:_i_s___c_o_n_s_t_a_n_t___e_v_a_l_u_a_t_e_d │ │ │ │ -constexpr bool is_constant_evaluated() noexcept │ │ │ │ -Returns true only when called during constant evaluation. │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_3_6_5_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_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_:_9_7 │ │ │ │ +_s_t_d_:_:_s_w_a_p │ │ │ │ +void swap(any &__x, any &__y) noexcept │ │ │ │ +Exchange the states of two any objects. │ │ │ │ +DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ _s_t_d_:_:_____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_:_5_1 │ │ │ │ -_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_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_3 │ │ │ │ -_s_t_d_:_:_____i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y │ │ │ │ -constexpr iterator_traits< _Iter >::iterator_category __iterator_category(const │ │ │ │ -_Iter &) │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_2_3_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_0 │ │ │ │ +_s_t_d_:_:_l_o_c_k │ │ │ │ +void lock(_L1 &__l1, _L2 &__l2, _L3 &... __l3) │ │ │ │ +Generic lock. │ │ │ │ +DDeeffiinniittiioonn _m_u_t_e_x_:_6_9_3 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_d_i_s_t_a_n_c_e │ │ │ │ -constexpr iterator_traits< _InputIterator >::difference_type distance │ │ │ │ -(_InputIterator __first, _InputIterator __last) │ │ │ │ -A generalization of pointer arithmetic. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___f_u_n_c_s_._h_:_1_4_8 │ │ │ │ -_s_t_d_:_:___D_e_s_t_r_o_y │ │ │ │ -constexpr void _Destroy(_ForwardIterator __first, _ForwardIterator __last) │ │ │ │ -DDeeffiinniittiioonn _s_t_l___c_o_n_s_t_r_u_c_t_._h_:_1_8_2 │ │ │ │ -_s_t_d_:_:_i_n_t_e_g_r_a_l___c_o_n_s_t_a_n_t │ │ │ │ -integral_constant │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_6_3 │ │ │ │ -_s_t_d_:_:_i_s___s_a_m_e │ │ │ │ -is_same │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_3_9_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_1_2_4 │ │ │ │ -_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_2_1_0 │ │ │ │ -_s_t_d_:_:_a_l_l_o_c_a_t_o_r___t_r_a_i_t_s_:_:_i_s___a_l_w_a_y_s___e_q_u_a_l │ │ │ │ -typename __detected_or_t< is_empty< _Alloc >, __equal, _Alloc >::type │ │ │ │ -is_always_equal │ │ │ │ -Whether all instances of the allocator type compare equal. │ │ │ │ -DDeeffiinniittiioonn _b_i_t_s_/_a_l_l_o_c___t_r_a_i_t_s_._h_:_2_2_5 │ │ │ │ -_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_3_1 │ │ │ │ -_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_4_2 │ │ │ │ -_s_t_d_:_:_i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g │ │ │ │ -Marking input iterators. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_9_3 │ │ │ │ -_s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g │ │ │ │ -Forward iterators support a superset of input iterator operations. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_9_9 │ │ │ │ -_s_t_d_:_:_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_:_:___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_6 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r │ │ │ │ -A standard container which offers fixed time access to individual elements in │ │ │ │ -any order. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_4_2_9 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_i_n_s_e_r_t │ │ │ │ -constexpr 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_5 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_p_u_s_h___b_a_c_k │ │ │ │ -constexpr 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_2_8_1 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_r_e_s_i_z_e │ │ │ │ -constexpr 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_:_1_0_3_4 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -constexpr vector & operator=(initializer_list< value_type > __l) │ │ │ │ -Vector list assignment operator. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_7_8_8 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_r_b_e_g_i_n │ │ │ │ -constexpr reverse_iterator rbegin() noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_1_3 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_e_n_d │ │ │ │ -constexpr iterator end() noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_9_3 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ -constexpr vector(const vector &__x) │ │ │ │ -Vector copy constructor. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_6_0_1 │ │ │ │ -_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_:_:_e_m_p_l_a_c_e │ │ │ │ -constexpr 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_3_4_6 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_i_n_s_e_r_t │ │ │ │ -constexpr 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_3_9_3 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_r_e_n_d │ │ │ │ -constexpr const_reverse_iterator rend() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_4_3 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_b_e_g_i_n │ │ │ │ -constexpr iterator begin() noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_7_3 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_c_a_p_a_c_i_t_y │ │ │ │ -constexpr size_type capacity() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_0_7_8 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_i_n_s_e_r_t │ │ │ │ -constexpr 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_4_1_1 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_~_v_e_c_t_o_r │ │ │ │ -constexpr ~vector() noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_7_3_3 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_b_e_g_i_n │ │ │ │ -constexpr const_iterator begin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_8_3 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_a_s_s_i_g_n │ │ │ │ -constexpr void assign(_InputIterator __first, _InputIterator __last) │ │ │ │ -Assigns a range to a vector. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_8_2_8 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_a_s_s_i_g_n │ │ │ │ -constexpr 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_:_8_0_8 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_e_r_a_s_e │ │ │ │ -constexpr 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_5_6_2 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_s_w_a_p │ │ │ │ -constexpr void swap(vector &__x) noexcept │ │ │ │ -Swaps data with another vector. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_5_8_6 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ -constexpr vector(vector &&__rv, const __type_identity_t< 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_5_9 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_d_a_t_a │ │ │ │ -constexpr _Tp * data() noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_2_6_0 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ -constexpr 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_5_6 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_f_r_o_n_t │ │ │ │ -constexpr const_reference front() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_2_2_1 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -constexpr vector & operator=(const vector &__x) │ │ │ │ -Vector assignment operator. │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_p_o_p___b_a_c_k │ │ │ │ -constexpr void pop_back() noexcept │ │ │ │ -Removes last element. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_3_2_2 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -constexpr 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_6_6 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_b_a_c_k │ │ │ │ -constexpr const_reference back() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_2_4_5 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_r_e_s_e_r_v_e │ │ │ │ -constexpr void reserve(size_type __n) │ │ │ │ -Attempt to preallocate enough memory for specified number of elements. │ │ │ │ -DDeeffiinniittiioonn _v_e_c_t_o_r_._t_c_c_:_6_8 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_a_t │ │ │ │ -constexpr 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_1_7_8 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_r_e_s_i_z_e │ │ │ │ -constexpr 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_:_1_0_1_3 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:___M___r_a_n_g_e___c_h_e_c_k │ │ │ │ -constexpr 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_1_5_5 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_f_r_o_n_t │ │ │ │ -constexpr reference front() noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_2_0_9 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_i_n_s_e_r_t │ │ │ │ -constexpr 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_4_3_7 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ -constexpr 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_1_4_5 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ -constexpr vector(const allocator_type &__a) noexcept │ │ │ │ -Creates a vector with no elements. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_5_4_2 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_e_r_a_s_e │ │ │ │ -constexpr iterator erase(const_iterator __position) │ │ │ │ -Remove element at given position. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_5_3_4 │ │ │ │ -_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 │ │ │ │ -constexpr pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, │ │ │ │ -_ForwardIterator __last) │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_6_1_6 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_e_m_p_t_y │ │ │ │ -constexpr bool empty() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_0_8_8 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_r_e_n_d │ │ │ │ -constexpr reverse_iterator rend() noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_3_3 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_r_b_e_g_i_n │ │ │ │ -constexpr const_reverse_iterator rbegin() 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_b_e_g_i_n │ │ │ │ -constexpr const_reverse_iterator crbegin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_7_4 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_a_t │ │ │ │ -constexpr 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_9_7 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_c_b_e_g_i_n │ │ │ │ -constexpr const_iterator cbegin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_5_4 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ -constexpr 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_:_7_0_7 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ -constexpr 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_7_8 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_e_n_d │ │ │ │ -constexpr const_iterator end() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_0_3 │ │ │ │ -_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_:_:_i_n_s_e_r_t │ │ │ │ -constexpr 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_4_8_2 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_c_l_e_a_r │ │ │ │ -constexpr void clear() noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_6_0_5 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_a_s_s_i_g_n │ │ │ │ -constexpr 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_:_8_5_5 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_g_e_t___a_l_l_o_c_a_t_o_r │ │ │ │ -constexpr 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_:_3_1_1 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_s_i_z_e │ │ │ │ -constexpr size_type size() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_9_2 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_v_e_c_t_o_r │ │ │ │ -constexpr 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_6_9 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_b_a_c_k │ │ │ │ -constexpr reference back() noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_2_3_3 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_c_r_e_n_d │ │ │ │ -constexpr const_reverse_iterator crend() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_8_4 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_c_e_n_d │ │ │ │ -constexpr const_iterator cend() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_6_4 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ -constexpr 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_1_2_6 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_s_h_r_i_n_k___t_o___f_i_t │ │ │ │ -constexpr void shrink_to_fit() │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_1_0_6_8 │ │ │ │ -_s_t_d_:_:_v_e_c_t_o_r_:_:_m_a_x___s_i_z_e │ │ │ │ -constexpr size_type max_size() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___v_e_c_t_o_r_._h_:_9_9_8 │ │ │ │ +_s_t_d_:_:_d_y_n_a_m_i_c___p_o_i_n_t_e_r___c_a_s_t │ │ │ │ +__shared_ptr< _Tp, _Lp > dynamic_pointer_cast(const __shared_ptr< _Tp1, _Lp > │ │ │ │ +&__r) noexcept │ │ │ │ +dynamic_pointer_cast │ │ │ │ +DDeeffiinniittiioonn _s_h_a_r_e_d___p_t_r___b_a_s_e_._h_:_1_9_5_5 │ │ │ │ +_s_t_d_:_:_s_t_a_t_i_c___p_o_i_n_t_e_r___c_a_s_t │ │ │ │ +__shared_ptr< _Tp, _Lp > static_pointer_cast(const __shared_ptr< _Tp1, _Lp > │ │ │ │ +&__r) noexcept │ │ │ │ +static_pointer_cast │ │ │ │ +DDeeffiinniittiioonn _s_h_a_r_e_d___p_t_r___b_a_s_e_._h_:_1_9_2_9 │ │ │ │ +_s_t_d_:_:_c_o_n_s_t___p_o_i_n_t_e_r___c_a_s_t │ │ │ │ +__shared_ptr< _Tp, _Lp > const_pointer_cast(const __shared_ptr< _Tp1, _Lp > │ │ │ │ +&__r) noexcept │ │ │ │ +const_pointer_cast │ │ │ │ +DDeeffiinniittiioonn _s_h_a_r_e_d___p_t_r___b_a_s_e_._h_:_1_9_4_2 │ │ │ │ +_____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_2_1 │ │ │ │ +_s_t_d_:_:_t_y_p_e___i_n_f_o │ │ │ │ +Part of RTTI. │ │ │ │ +DDeeffiinniittiioonn _t_y_p_e_i_n_f_o_:_9_3 │ │ │ │ +_s_t_d_:_:_h_a_s_h │ │ │ │ +Primary class template hash. │ │ │ │ +DDeeffiinniittiioonn _f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h_:_1_0_3 │ │ │ │ +_s_t_d_:_:_e_x_c_e_p_t_i_o_n │ │ │ │ +Base class for all library exceptions. │ │ │ │ +DDeeffiinniittiioonn _e_x_c_e_p_t_i_o_n_._h_:_6_0 │ │ │ │ +_s_t_d_:_:_b_a_d___w_e_a_k___p_t_r │ │ │ │ +Exception possibly thrown by shared_ptr. │ │ │ │ +DDeeffiinniittiioonn _s_h_a_r_e_d___p_t_r___b_a_s_e_._h_:_8_6 │ │ │ │ +_s_t_d_:_:_b_a_d___w_e_a_k___p_t_r_:_:_w_h_a_t │ │ │ │ +virtual char const * what() const noexcept │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ -_____g_n_u___c_x_x_:_:_____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_:_4_9 │ │ │ │ -_____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 │ │ │ │ -The maximum supported allocation size. │ │ │ │ -DDeeffiinniittiioonn _b_i_t_s_/_a_l_l_o_c___t_r_a_i_t_s_._h_:_4_0_4 │ │ │ │ +_____g_n_u___c_x_x_:_:_____s_c_o_p_e_d___l_o_c_k │ │ │ │ +Scoped lock idiom. │ │ │ │ +DDeeffiinniittiioonn _c_o_n_c_u_r_r_e_n_c_e_._h_:_2_2_9 │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_l___v_e_c_t_o_r_._h │ │ │ │ + * _s_h_a_r_e_d___p_t_r___b_a_s_e_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00392.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stl_tempbuf.h File Reference │ │ │ +libstdc++: vector.tcc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,58 +46,57 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00392.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Functions
│ │ │ -
stl_tempbuf.h File Reference
│ │ │ +Macros
│ │ │ +
vector.tcc File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Classes

class  std::_Temporary_buffer< _ForwardIterator, _Tp >
 
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ - │ │ │

│ │ │ Namespaces

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

│ │ │ -Functions

template<typename _Tp >
void std::__detail::__return_temporary_buffer (_Tp *__p, size_t __len)
 
template<typename _Pointer , typename _ForwardIterator >
void std::__uninitialized_construct_buf (_Pointer __first, _Pointer __last, _ForwardIterator __seed)
 
template<typename _Tp >
pair< _Tp *, ptrdiff_t > std::get_temporary_buffer (ptrdiff_t __len) noexcept
 
template<typename _Tp >
void std::return_temporary_buffer (_Tp *__p)
 

│ │ │ +Macros

#define _VECTOR_TCC
 
│ │ │

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ + │ │ │ +

Definition in file vector.tcc.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _VECTOR_TCC

│ │ │ │ │ │ -

Definition in file stl_tempbuf.h.

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

Definition at line 57 of file vector.tcc.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,34 +1,21 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -stl_tempbuf.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ +vector.tcc File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _s_t_d_:_:___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r_<_ ___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r_,_ ___T_p_ _> │ │ │ │ -  │ │ │ │ NNaammeessppaacceess │ │ │ │ namespace   _s_t_d │ │ │ │   │ │ │ │ -namespace   _s_t_d_:_:_____d_e_t_a_i_l │ │ │ │ -  │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____r_e_t_u_r_n___t_e_m_p_o_r_a_r_y___b_u_f_f_e_r (_Tp *__p, │ │ │ │ - size_t _____l_e_n) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Pointer , _t_y_p_e_n_a_m_e ___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_n_s_t_r_u_c_t___b_u_f (_Pointer __first, │ │ │ │ - _Pointer __last, ___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r _____s_e_e_d) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ -_p_a_i_r< _Tp *, ptrdiff_t >  _s_t_d_:_:_g_e_t___t_e_m_p_o_r_a_r_y___b_u_f_f_e_r (ptrdiff_t _____l_e_n) noexcept │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ - _v_o_i_d  _s_t_d_:_:_r_e_t_u_r_n___t_e_m_p_o_r_a_r_y___b_u_f_f_e_r (_Tp *__p) │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  ___V_E_C_T_O_R___T_C_C │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _s_t_l___t_e_m_p_b_u_f_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _v_e_c_t_o_r_._t_c_c. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? __VVEECCTTOORR__TTCCCC ********** │ │ │ │ +#define _VECTOR_TCC │ │ │ │ +Definition at line _5_7 of file _v_e_c_t_o_r_._t_c_c. │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_l___t_e_m_p_b_u_f_._h │ │ │ │ + * _v_e_c_t_o_r_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00392_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stl_tempbuf.h Source File │ │ │ +libstdc++: vector.tcc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,18 +45,18 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stl_tempbuf.h
│ │ │ +
vector.tcc
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Temporary buffer implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// Vector implementation (out of line) -*- C++ -*-
│ │ │
2
│ │ │
3// Copyright (C) 2001-2023 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)
│ │ │ @@ -86,309 +86,1063 @@ │ │ │
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
│ │ │ +
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
│ │ │ +
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_tempbuf.h
│ │ │ +
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{memory}
│ │ │ +
53 * Do not attempt to use it directly. @headername{vector}
│ │ │
54 */
│ │ │
55
│ │ │ -
56#ifndef _STL_TEMPBUF_H
│ │ │ -
57#define _STL_TEMPBUF_H 1
│ │ │ +
56#ifndef _VECTOR_TCC
│ │ │ +
57#define _VECTOR_TCC 1
│ │ │
58
│ │ │ -
59#include <new>
│ │ │ - │ │ │ -
61#include <bits/stl_construct.h>
│ │ │ -
62#include <bits/stl_pair.h>
│ │ │ -
63#include <ext/numeric_traits.h>
│ │ │ -
64
│ │ │ -
65namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
66{
│ │ │ -
67_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
68
│ │ │ -
69 namespace __detail
│ │ │ -
70 {
│ │ │ -
71 template<typename _Tp>
│ │ │ -
72 inline void
│ │ │ -
73 __return_temporary_buffer(_Tp* __p,
│ │ │ -
74 size_t __len __attribute__((__unused__)))
│ │ │ -
75 {
│ │ │ -
76#if __cpp_sized_deallocation
│ │ │ -
77 ::operator delete(__p, __len * sizeof(_Tp));
│ │ │ -
78#else
│ │ │ -
79 ::operator delete(__p);
│ │ │ -
80#endif
│ │ │ -
81 }
│ │ │ -
82 }
│ │ │ -
83
│ │ │ -
84 /**
│ │ │ -
85 * @brief Allocates a temporary buffer.
│ │ │ -
86 * @param __len The number of objects of type Tp.
│ │ │ -
87 * @return See full description.
│ │ │ -
88 *
│ │ │ -
89 * Reinventing the wheel, but this time with prettier spokes!
│ │ │ -
90 *
│ │ │ -
91 * This function tries to obtain storage for @c __len adjacent Tp
│ │ │ -
92 * objects. The objects themselves are not constructed, of course.
│ │ │ -
93 * A pair<> is returned containing <em>the buffer s address and
│ │ │ -
94 * capacity (in the units of sizeof(_Tp)), or a pair of 0 values if
│ │ │ -
95 * no storage can be obtained.</em> Note that the capacity obtained
│ │ │ -
96 * may be less than that requested if the memory is unavailable;
│ │ │ -
97 * you should compare len with the .second return value.
│ │ │ -
98 *
│ │ │ -
99 * Provides the nothrow exception guarantee.
│ │ │ -
100 */
│ │ │ -
101 template<typename _Tp>
│ │ │ -
102 _GLIBCXX17_DEPRECATED
│ │ │ -
103 pair<_Tp*, ptrdiff_t>
│ │ │ -
│ │ │ - │ │ │ -
105 {
│ │ │ -
106 const ptrdiff_t __max =
│ │ │ -
107 __gnu_cxx::__numeric_traits<ptrdiff_t>::__max / sizeof(_Tp);
│ │ │ -
108 if (__len > __max)
│ │ │ -
109 __len = __max;
│ │ │ -
110
│ │ │ -
111 while (__len > 0)
│ │ │ -
112 {
│ │ │ -
113 _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp),
│ │ │ -
114 std::nothrow));
│ │ │ -
115 if (__tmp != 0)
│ │ │ - │ │ │ -
117 __len = __len == 1 ? 0 : ((__len + 1) / 2);
│ │ │ -
118 }
│ │ │ -
119 return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0);
│ │ │ -
120 }
│ │ │ +
59namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
60{
│ │ │ +
61_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
62_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
│ │ │ +
63
│ │ │ +
64 template<typename _Tp, typename _Alloc>
│ │ │ +
65 _GLIBCXX20_CONSTEXPR
│ │ │ +
66 void
│ │ │ +
│ │ │ + │ │ │ +
68 reserve(size_type __n)
│ │ │ +
69 {
│ │ │ +
70 if (__n > this->max_size())
│ │ │ +
71 __throw_length_error(__N("vector::reserve"));
│ │ │ +
72 if (this->capacity() < __n)
│ │ │ +
73 {
│ │ │ +
74 const size_type __old_size = size();
│ │ │ +
75 pointer __tmp;
│ │ │ +
76#if __cplusplus >= 201103L
│ │ │ +
77 if _GLIBCXX17_CONSTEXPR (_S_use_relocate())
│ │ │ +
78 {
│ │ │ +
79 __tmp = this->_M_allocate(__n);
│ │ │ +
80 _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ +
81 __tmp, _M_get_Tp_allocator());
│ │ │ +
82 }
│ │ │ +
83 else
│ │ │ +
84#endif
│ │ │ +
85 {
│ │ │ +
86 __tmp = _M_allocate_and_copy(__n,
│ │ │ +
87 _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_start),
│ │ │ +
88 _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_finish));
│ │ │ +
89 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ +
90 _M_get_Tp_allocator());
│ │ │ +
91 }
│ │ │ +
92 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ +
93 _M_deallocate(this->_M_impl._M_start,
│ │ │ +
94 this->_M_impl._M_end_of_storage
│ │ │ +
95 - this->_M_impl._M_start);
│ │ │ +
96 this->_M_impl._M_start = __tmp;
│ │ │ +
97 this->_M_impl._M_finish = __tmp + __old_size;
│ │ │ +
98 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
│ │ │ +
99 }
│ │ │ +
100 }
│ │ │
│ │ │ -
121
│ │ │ -
122 /**
│ │ │ -
123 * @brief The companion to get_temporary_buffer().
│ │ │ -
124 * @param __p A buffer previously allocated by get_temporary_buffer.
│ │ │ -
125 * @return None.
│ │ │ -
126 *
│ │ │ -
127 * Frees the memory pointed to by __p.
│ │ │ -
128 */
│ │ │ -
129 template<typename _Tp>
│ │ │ -
130 inline void
│ │ │ -
│ │ │ - │ │ │ -
132 { ::operator delete(__p); }
│ │ │ +
101
│ │ │ +
102#if __cplusplus >= 201103L
│ │ │ +
103 template<typename _Tp, typename _Alloc>
│ │ │ +
104 template<typename... _Args>
│ │ │ +
105#if __cplusplus > 201402L
│ │ │ + │ │ │ +
107 typename vector<_Tp, _Alloc>::reference
│ │ │ +
108#else
│ │ │ +
109 void
│ │ │ +
110#endif
│ │ │ + │ │ │ + │ │ │ +
113 {
│ │ │ +
114 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
│ │ │ +
115 {
│ │ │ +
116 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ +
117 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ + │ │ │ +
119 ++this->_M_impl._M_finish;
│ │ │ +
120 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ +
121 }
│ │ │ +
122 else
│ │ │ +
123 _M_realloc_insert(end(), std::forward<_Args>(__args)...);
│ │ │ +
124#if __cplusplus > 201402L
│ │ │ +
125 return back();
│ │ │ +
126#endif
│ │ │ +
127 }
│ │ │ +
128#endif
│ │ │ +
129
│ │ │ +
130 template<typename _Tp, typename _Alloc>
│ │ │ +
131 _GLIBCXX20_CONSTEXPR
│ │ │ +
132 typename vector<_Tp, _Alloc>::iterator
│ │ │ +
│ │ │ + │ │ │ +
134#if __cplusplus >= 201103L
│ │ │ +
135 insert(const_iterator __position, const value_type& __x)
│ │ │ +
136#else
│ │ │ +
137 insert(iterator __position, const value_type& __x)
│ │ │ +
138#endif
│ │ │ +
139 {
│ │ │ +
140 const size_type __n = __position - begin();
│ │ │ +
141 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
│ │ │ +
142 {
│ │ │ +
143 __glibcxx_assert(__position != const_iterator());
│ │ │ +
144 if (!(__position != const_iterator()))
│ │ │ +
145 __builtin_unreachable(); // PR 106434
│ │ │ +
146
│ │ │ +
147 if (__position == end())
│ │ │ +
148 {
│ │ │ +
149 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ +
150 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ +
151 __x);
│ │ │ +
152 ++this->_M_impl._M_finish;
│ │ │ +
153 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ +
154 }
│ │ │ +
155 else
│ │ │ +
156 {
│ │ │ +
157#if __cplusplus >= 201103L
│ │ │ +
158 const auto __pos = begin() + (__position - cbegin());
│ │ │ +
159 // __x could be an existing element of this vector, so make a
│ │ │ +
160 // copy of it before _M_insert_aux moves elements around.
│ │ │ +
161 _Temporary_value __x_copy(this, __x);
│ │ │ +
162 _M_insert_aux(__pos, std::move(__x_copy._M_val()));
│ │ │ +
163#else
│ │ │ +
164 _M_insert_aux(__position, __x);
│ │ │ +
165#endif
│ │ │ +
166 }
│ │ │ +
167 }
│ │ │ +
168 else
│ │ │ +
169#if __cplusplus >= 201103L
│ │ │ +
170 _M_realloc_insert(begin() + (__position - cbegin()), __x);
│ │ │ +
171#else
│ │ │ +
172 _M_realloc_insert(__position, __x);
│ │ │ +
173#endif
│ │ │ +
174
│ │ │ +
175 return iterator(this->_M_impl._M_start + __n);
│ │ │ +
176 }
│ │ │
│ │ │ -
133
│ │ │ -
134 /**
│ │ │ -
135 * This class is used in two places: stl_algo.h and ext/memory,
│ │ │ -
136 * where it is wrapped as the temporary_buffer class. See
│ │ │ -
137 * temporary_buffer docs for more notes.
│ │ │ -
138 */
│ │ │ -
139 template<typename _ForwardIterator, typename _Tp>
│ │ │ -
│ │ │ - │ │ │ -
141 {
│ │ │ -
142 // concept requirements
│ │ │ -
143 __glibcxx_class_requires(_ForwardIterator, _ForwardIteratorConcept)
│ │ │ -
144
│ │ │ -
145 public:
│ │ │ -
146 typedef _Tp value_type;
│ │ │ -
147 typedef value_type* pointer;
│ │ │ -
148 typedef pointer iterator;
│ │ │ -
149 typedef ptrdiff_t size_type;
│ │ │ -
150
│ │ │ -
151 protected:
│ │ │ -
152 size_type _M_original_len;
│ │ │ -
153 size_type _M_len;
│ │ │ -
154 pointer _M_buffer;
│ │ │ -
155
│ │ │ -
156 public:
│ │ │ -
157 /// As per Table mumble.
│ │ │ -
158 size_type
│ │ │ -
│ │ │ -
159 size() const
│ │ │ -
160 { return _M_len; }
│ │ │ -
│ │ │ -
161
│ │ │ -
162 /// Returns the size requested by the constructor; may be >size().
│ │ │ -
163 size_type
│ │ │ -
│ │ │ - │ │ │ -
165 { return _M_original_len; }
│ │ │ -
│ │ │ -
166
│ │ │ -
167 /// As per Table mumble.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
170 { return _M_buffer; }
│ │ │ -
│ │ │ -
171
│ │ │ -
172 /// As per Table mumble.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
175 { return _M_buffer + _M_len; }
│ │ │ -
│ │ │ -
176
│ │ │ -
177 /**
│ │ │ -
178 * Constructs a temporary buffer of a size somewhere between
│ │ │ -
179 * zero and the given length.
│ │ │ -
180 */
│ │ │ -
│ │ │ - │ │ │ -
182
│ │ │ - │ │ │ -
184 {
│ │ │ -
185 std::_Destroy(_M_buffer, _M_buffer + _M_len);
│ │ │ -
186 std::__detail::__return_temporary_buffer(_M_buffer, _M_len);
│ │ │ -
187 }
│ │ │ -
188
│ │ │ -
189 private:
│ │ │ -
190 // Disable copy constructor and assignment operator.
│ │ │ - │ │ │ -
192
│ │ │ -
193 void
│ │ │ -
194 operator=(const _Temporary_buffer&);
│ │ │ -
195 };
│ │ │ -
196
│ │ │ -
197
│ │ │ -
198 template<bool>
│ │ │ -
199 struct __uninitialized_construct_buf_dispatch
│ │ │ -
200 {
│ │ │ -
201 template<typename _Pointer, typename _ForwardIterator>
│ │ │ -
202 static void
│ │ │ -
203 __ucr(_Pointer __first, _Pointer __last,
│ │ │ -
204 _ForwardIterator __seed)
│ │ │ -
205 {
│ │ │ -
206 if (__first == __last)
│ │ │ -
207 return;
│ │ │ -
208
│ │ │ -
209 _Pointer __cur = __first;
│ │ │ -
210 __try
│ │ │ -
211 {
│ │ │ - │ │ │ -
213 _GLIBCXX_MOVE(*__seed));
│ │ │ -
214 _Pointer __prev = __cur;
│ │ │ -
215 ++__cur;
│ │ │ -
216 for(; __cur != __last; ++__cur, ++__prev)
│ │ │ - │ │ │ -
218 _GLIBCXX_MOVE(*__prev));
│ │ │ -
219 *__seed = _GLIBCXX_MOVE(*__prev);
│ │ │ -
220 }
│ │ │ -
221 __catch(...)
│ │ │ -
222 {
│ │ │ -
223 std::_Destroy(__first, __cur);
│ │ │ -
224 __throw_exception_again;
│ │ │ -
225 }
│ │ │ -
226 }
│ │ │ -
227 };
│ │ │ -
228
│ │ │ -
229 template<>
│ │ │ -
230 struct __uninitialized_construct_buf_dispatch<true>
│ │ │ -
231 {
│ │ │ -
232 template<typename _Pointer, typename _ForwardIterator>
│ │ │ -
233 static void
│ │ │ -
234 __ucr(_Pointer, _Pointer, _ForwardIterator) { }
│ │ │ -
235 };
│ │ │ -
236
│ │ │ -
237 // Constructs objects in the range [first, last).
│ │ │ -
238 // Note that while these new objects will take valid values,
│ │ │ -
239 // their exact value is not defined. In particular they may
│ │ │ -
240 // be 'moved from'.
│ │ │ -
241 //
│ │ │ -
242 // While *__seed may be altered during this algorithm, it will have
│ │ │ -
243 // the same value when the algorithm finishes, unless one of the
│ │ │ -
244 // constructions throws.
│ │ │ -
245 //
│ │ │ -
246 // Requirements: _Pointer::value_type(_Tp&&) is valid.
│ │ │ -
247 template<typename _Pointer, typename _ForwardIterator>
│ │ │ -
248 inline void
│ │ │ -
249 __uninitialized_construct_buf(_Pointer __first, _Pointer __last,
│ │ │ -
250 _ForwardIterator __seed)
│ │ │ -
251 {
│ │ │ - │ │ │ -
253 _ValueType;
│ │ │ -
254
│ │ │ -
255 std::__uninitialized_construct_buf_dispatch<
│ │ │ -
256 __has_trivial_constructor(_ValueType)>::
│ │ │ -
257 __ucr(__first, __last, __seed);
│ │ │ -
258 }
│ │ │ -
259
│ │ │ -
260#pragma GCC diagnostic push
│ │ │ -
261#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
│ │ │ -
262 template<typename _ForwardIterator, typename _Tp>
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
265 : _M_original_len(__original_len), _M_len(0), _M_buffer(0)
│ │ │ -
266 {
│ │ │ - │ │ │ - │ │ │ -
269
│ │ │ -
270 if (__p.first)
│ │ │ -
271 {
│ │ │ -
272 __try
│ │ │ -
273 {
│ │ │ -
274 std::__uninitialized_construct_buf(__p.first, __p.first + __p.second,
│ │ │ -
275 __seed);
│ │ │ -
276 _M_buffer = __p.first;
│ │ │ -
277 _M_len = __p.second;
│ │ │ -
278 }
│ │ │ -
279 __catch(...)
│ │ │ -
280 {
│ │ │ -
281 std::__detail::__return_temporary_buffer(__p.first, __p.second);
│ │ │ -
282 __throw_exception_again;
│ │ │ -
283 }
│ │ │ -
284 }
│ │ │ -
285 }
│ │ │ -
│ │ │ -
│ │ │ -
286#pragma GCC diagnostic pop
│ │ │ -
287
│ │ │ -
288_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
289} // namespace
│ │ │ -
290
│ │ │ -
291#endif /* _STL_TEMPBUF_H */
│ │ │ -
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:51
│ │ │ +
177
│ │ │ +
178 template<typename _Tp, typename _Alloc>
│ │ │ + │ │ │ +
180 typename vector<_Tp, _Alloc>::iterator
│ │ │ + │ │ │ + │ │ │ +
183 {
│ │ │ +
184 if (__position + 1 != end())
│ │ │ +
185 _GLIBCXX_MOVE3(__position + 1, end(), __position);
│ │ │ +
186 --this->_M_impl._M_finish;
│ │ │ +
187 _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish);
│ │ │ +
188 _GLIBCXX_ASAN_ANNOTATE_SHRINK(1);
│ │ │ +
189 return __position;
│ │ │ +
190 }
│ │ │ +
191
│ │ │ +
192 template<typename _Tp, typename _Alloc>
│ │ │ +
193 _GLIBCXX20_CONSTEXPR
│ │ │ +
194 typename vector<_Tp, _Alloc>::iterator
│ │ │ +
195 vector<_Tp, _Alloc>::
│ │ │ +
196 _M_erase(iterator __first, iterator __last)
│ │ │ +
197 {
│ │ │ +
198 if (__first != __last)
│ │ │ +
199 {
│ │ │ +
200 if (__last != end())
│ │ │ +
201 _GLIBCXX_MOVE3(__last, end(), __first);
│ │ │ +
202 _M_erase_at_end(__first.base() + (end() - __last));
│ │ │ +
203 }
│ │ │ +
204 return __first;
│ │ │ +
205 }
│ │ │ +
206
│ │ │ +
207 template<typename _Tp, typename _Alloc>
│ │ │ +
208 _GLIBCXX20_CONSTEXPR
│ │ │ +
209 vector<_Tp, _Alloc>&
│ │ │ + │ │ │ +
211 operator=(const vector<_Tp, _Alloc>& __x)
│ │ │ +
212 {
│ │ │ +
213 if (std::__addressof(__x) != this)
│ │ │ +
214 {
│ │ │ +
215 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ +
216#if __cplusplus >= 201103L
│ │ │ +
217 if (_Alloc_traits::_S_propagate_on_copy_assign())
│ │ │ +
218 {
│ │ │ +
219 if (!_Alloc_traits::_S_always_equal()
│ │ │ +
220 && _M_get_Tp_allocator() != __x._M_get_Tp_allocator())
│ │ │ +
221 {
│ │ │ +
222 // replacement allocator cannot free existing storage
│ │ │ +
223 this->clear();
│ │ │ +
224 _M_deallocate(this->_M_impl._M_start,
│ │ │ +
225 this->_M_impl._M_end_of_storage
│ │ │ +
226 - this->_M_impl._M_start);
│ │ │ +
227 this->_M_impl._M_start = nullptr;
│ │ │ +
228 this->_M_impl._M_finish = nullptr;
│ │ │ +
229 this->_M_impl._M_end_of_storage = nullptr;
│ │ │ +
230 }
│ │ │ +
231 std::__alloc_on_copy(_M_get_Tp_allocator(),
│ │ │ +
232 __x._M_get_Tp_allocator());
│ │ │ +
233 }
│ │ │ +
234#endif
│ │ │ +
235 const size_type __xlen = __x.size();
│ │ │ +
236 if (__xlen > capacity())
│ │ │ +
237 {
│ │ │ +
238 pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(),
│ │ │ +
239 __x.end());
│ │ │ +
240 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ +
241 _M_get_Tp_allocator());
│ │ │ +
242 _M_deallocate(this->_M_impl._M_start,
│ │ │ +
243 this->_M_impl._M_end_of_storage
│ │ │ +
244 - this->_M_impl._M_start);
│ │ │ +
245 this->_M_impl._M_start = __tmp;
│ │ │ +
246 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen;
│ │ │ +
247 }
│ │ │ +
248 else if (size() >= __xlen)
│ │ │ +
249 {
│ │ │ +
250 std::_Destroy(std::copy(__x.begin(), __x.end(), begin()),
│ │ │ +
251 end(), _M_get_Tp_allocator());
│ │ │ +
252 }
│ │ │ +
253 else
│ │ │ +
254 {
│ │ │ +
255 std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(),
│ │ │ +
256 this->_M_impl._M_start);
│ │ │ +
257 std::__uninitialized_copy_a(__x._M_impl._M_start + size(),
│ │ │ +
258 __x._M_impl._M_finish,
│ │ │ +
259 this->_M_impl._M_finish,
│ │ │ +
260 _M_get_Tp_allocator());
│ │ │ +
261 }
│ │ │ +
262 this->_M_impl._M_finish = this->_M_impl._M_start + __xlen;
│ │ │ +
263 }
│ │ │ +
264 return *this;
│ │ │ +
265 }
│ │ │ +
266
│ │ │ +
267 template<typename _Tp, typename _Alloc>
│ │ │ +
268 _GLIBCXX20_CONSTEXPR
│ │ │ +
269 void
│ │ │ +
270 vector<_Tp, _Alloc>::
│ │ │ +
271 _M_fill_assign(size_t __n, const value_type& __val)
│ │ │ +
272 {
│ │ │ +
273 if (__n > capacity())
│ │ │ +
274 {
│ │ │ +
275 vector __tmp(__n, __val, _M_get_Tp_allocator());
│ │ │ +
276 __tmp._M_impl._M_swap_data(this->_M_impl);
│ │ │ +
277 }
│ │ │ +
278 else if (__n > size())
│ │ │ +
279 {
│ │ │ +
280 std::fill(begin(), end(), __val);
│ │ │ +
281 const size_type __add = __n - size();
│ │ │ +
282 _GLIBCXX_ASAN_ANNOTATE_GROW(__add);
│ │ │ +
283 this->_M_impl._M_finish =
│ │ │ +
284 std::__uninitialized_fill_n_a(this->_M_impl._M_finish,
│ │ │ +
285 __add, __val, _M_get_Tp_allocator());
│ │ │ +
286 _GLIBCXX_ASAN_ANNOTATE_GREW(__add);
│ │ │ +
287 }
│ │ │ +
288 else
│ │ │ +
289 _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val));
│ │ │ +
290 }
│ │ │ +
291
│ │ │ +
292 template<typename _Tp, typename _Alloc>
│ │ │ +
293 template<typename _InputIterator>
│ │ │ +
294 _GLIBCXX20_CONSTEXPR
│ │ │ +
295 void
│ │ │ +
296 vector<_Tp, _Alloc>::
│ │ │ +
297 _M_assign_aux(_InputIterator __first, _InputIterator __last,
│ │ │ + │ │ │ +
299 {
│ │ │ +
300 pointer __cur(this->_M_impl._M_start);
│ │ │ +
301 for (; __first != __last && __cur != this->_M_impl._M_finish;
│ │ │ +
302 ++__cur, (void)++__first)
│ │ │ +
303 *__cur = *__first;
│ │ │ +
304 if (__first == __last)
│ │ │ +
305 _M_erase_at_end(__cur);
│ │ │ +
306 else
│ │ │ +
307 _M_range_insert(end(), __first, __last,
│ │ │ +
308 std::__iterator_category(__first));
│ │ │ +
309 }
│ │ │ +
310
│ │ │ +
311 template<typename _Tp, typename _Alloc>
│ │ │ +
312 template<typename _ForwardIterator>
│ │ │ +
313 _GLIBCXX20_CONSTEXPR
│ │ │ +
314 void
│ │ │ +
315 vector<_Tp, _Alloc>::
│ │ │ +
316 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
│ │ │ + │ │ │ +
318 {
│ │ │ +
319 const size_type __len = std::distance(__first, __last);
│ │ │ +
320
│ │ │ +
321 if (__len > capacity())
│ │ │ +
322 {
│ │ │ +
323 _S_check_init_len(__len, _M_get_Tp_allocator());
│ │ │ +
324 pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
│ │ │ +
325 std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
│ │ │ +
326 _M_get_Tp_allocator());
│ │ │ +
327 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ +
328 _M_deallocate(this->_M_impl._M_start,
│ │ │ +
329 this->_M_impl._M_end_of_storage
│ │ │ +
330 - this->_M_impl._M_start);
│ │ │ +
331 this->_M_impl._M_start = __tmp;
│ │ │ +
332 this->_M_impl._M_finish = this->_M_impl._M_start + __len;
│ │ │ +
333 this->_M_impl._M_end_of_storage = this->_M_impl._M_finish;
│ │ │ +
334 }
│ │ │ +
335 else if (size() >= __len)
│ │ │ +
336 _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start));
│ │ │ +
337 else
│ │ │ +
338 {
│ │ │ +
339 _ForwardIterator __mid = __first;
│ │ │ +
340 std::advance(__mid, size());
│ │ │ +
341 std::copy(__first, __mid, this->_M_impl._M_start);
│ │ │ +
342 const size_type __attribute__((__unused__)) __n = __len - size();
│ │ │ +
343 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ +
344 this->_M_impl._M_finish =
│ │ │ +
345 std::__uninitialized_copy_a(__mid, __last,
│ │ │ +
346 this->_M_impl._M_finish,
│ │ │ +
347 _M_get_Tp_allocator());
│ │ │ +
348 _GLIBCXX_ASAN_ANNOTATE_GREW(__n);
│ │ │ +
349 }
│ │ │ +
350 }
│ │ │ +
351
│ │ │ +
352#if __cplusplus >= 201103L
│ │ │ +
353 template<typename _Tp, typename _Alloc>
│ │ │ +
354 _GLIBCXX20_CONSTEXPR
│ │ │ +
355 auto
│ │ │ +
356 vector<_Tp, _Alloc>::
│ │ │ +
357 _M_insert_rval(const_iterator __position, value_type&& __v) -> iterator
│ │ │ +
358 {
│ │ │ +
359 const auto __n = __position - cbegin();
│ │ │ +
360 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
│ │ │ +
361 if (__position == cend())
│ │ │ +
362 {
│ │ │ +
363 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ +
364 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ +
365 std::move(__v));
│ │ │ +
366 ++this->_M_impl._M_finish;
│ │ │ +
367 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ +
368 }
│ │ │ +
369 else
│ │ │ +
370 _M_insert_aux(begin() + __n, std::move(__v));
│ │ │ +
371 else
│ │ │ +
372 _M_realloc_insert(begin() + __n, std::move(__v));
│ │ │ +
373
│ │ │ +
374 return iterator(this->_M_impl._M_start + __n);
│ │ │ +
375 }
│ │ │ +
376
│ │ │ +
377 template<typename _Tp, typename _Alloc>
│ │ │ +
378 template<typename... _Args>
│ │ │ +
379 _GLIBCXX20_CONSTEXPR
│ │ │ +
380 auto
│ │ │ +
381 vector<_Tp, _Alloc>::
│ │ │ +
382 _M_emplace_aux(const_iterator __position, _Args&&... __args)
│ │ │ +
383 -> iterator
│ │ │ +
384 {
│ │ │ +
385 const auto __n = __position - cbegin();
│ │ │ +
386 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
│ │ │ +
387 if (__position == cend())
│ │ │ +
388 {
│ │ │ +
389 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ +
390 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ +
391 std::forward<_Args>(__args)...);
│ │ │ +
392 ++this->_M_impl._M_finish;
│ │ │ +
393 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ +
394 }
│ │ │ +
395 else
│ │ │ +
396 {
│ │ │ +
397 // We need to construct a temporary because something in __args...
│ │ │ +
398 // could alias one of the elements of the container and so we
│ │ │ +
399 // need to use it before _M_insert_aux moves elements around.
│ │ │ +
400 _Temporary_value __tmp(this, std::forward<_Args>(__args)...);
│ │ │ +
401 _M_insert_aux(begin() + __n, std::move(__tmp._M_val()));
│ │ │ +
402 }
│ │ │ +
403 else
│ │ │ +
404 _M_realloc_insert(begin() + __n, std::forward<_Args>(__args)...);
│ │ │ +
405
│ │ │ +
406 return iterator(this->_M_impl._M_start + __n);
│ │ │ +
407 }
│ │ │ +
408
│ │ │ +
409 template<typename _Tp, typename _Alloc>
│ │ │ +
410 template<typename _Arg>
│ │ │ +
411 _GLIBCXX20_CONSTEXPR
│ │ │ +
412 void
│ │ │ +
413 vector<_Tp, _Alloc>::
│ │ │ +
414 _M_insert_aux(iterator __position, _Arg&& __arg)
│ │ │ +
415#else
│ │ │ +
416 template<typename _Tp, typename _Alloc>
│ │ │ +
417 void
│ │ │ +
418 vector<_Tp, _Alloc>::
│ │ │ +
419 _M_insert_aux(iterator __position, const _Tp& __x)
│ │ │ +
420#endif
│ │ │ +
421 {
│ │ │ +
422 _GLIBCXX_ASAN_ANNOTATE_GROW(1);
│ │ │ +
423 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
│ │ │ +
424 _GLIBCXX_MOVE(*(this->_M_impl._M_finish - 1)));
│ │ │ +
425 ++this->_M_impl._M_finish;
│ │ │ +
426 _GLIBCXX_ASAN_ANNOTATE_GREW(1);
│ │ │ +
427#if __cplusplus < 201103L
│ │ │ +
428 _Tp __x_copy = __x;
│ │ │ +
429#endif
│ │ │ +
430 _GLIBCXX_MOVE_BACKWARD3(__position.base(),
│ │ │ +
431 this->_M_impl._M_finish - 2,
│ │ │ +
432 this->_M_impl._M_finish - 1);
│ │ │ +
433#if __cplusplus < 201103L
│ │ │ +
434 *__position = __x_copy;
│ │ │ +
435#else
│ │ │ +
436 *__position = std::forward<_Arg>(__arg);
│ │ │ +
437#endif
│ │ │ +
438 }
│ │ │ +
439
│ │ │ +
440#if __cplusplus >= 201103L
│ │ │ +
441 template<typename _Tp, typename _Alloc>
│ │ │ +
442 template<typename... _Args>
│ │ │ +
443 _GLIBCXX20_CONSTEXPR
│ │ │ +
444 void
│ │ │ +
445 vector<_Tp, _Alloc>::
│ │ │ +
446 _M_realloc_insert(iterator __position, _Args&&... __args)
│ │ │ +
447#else
│ │ │ +
448 template<typename _Tp, typename _Alloc>
│ │ │ +
449 void
│ │ │ +
450 vector<_Tp, _Alloc>::
│ │ │ +
451 _M_realloc_insert(iterator __position, const _Tp& __x)
│ │ │ +
452#endif
│ │ │ +
453 {
│ │ │ +
454 const size_type __len =
│ │ │ +
455 _M_check_len(size_type(1), "vector::_M_realloc_insert");
│ │ │ +
456 pointer __old_start = this->_M_impl._M_start;
│ │ │ +
457 pointer __old_finish = this->_M_impl._M_finish;
│ │ │ +
458 const size_type __elems_before = __position - begin();
│ │ │ +
459 pointer __new_start(this->_M_allocate(__len));
│ │ │ +
460 pointer __new_finish(__new_start);
│ │ │ +
461 __try
│ │ │ +
462 {
│ │ │ +
463 // The order of the three operations is dictated by the C++11
│ │ │ +
464 // case, where the moves could alter a new element belonging
│ │ │ +
465 // to the existing vector. This is an issue only for callers
│ │ │ +
466 // taking the element by lvalue ref (see last bullet of C++11
│ │ │ +
467 // [res.on.arguments]).
│ │ │ +
468 _Alloc_traits::construct(this->_M_impl,
│ │ │ +
469 __new_start + __elems_before,
│ │ │ +
470#if __cplusplus >= 201103L
│ │ │ +
471 std::forward<_Args>(__args)...);
│ │ │ +
472#else
│ │ │ +
473 __x);
│ │ │ +
474#endif
│ │ │ +
475 __new_finish = pointer();
│ │ │ +
476
│ │ │ +
477#if __cplusplus >= 201103L
│ │ │ +
478 if _GLIBCXX17_CONSTEXPR (_S_use_relocate())
│ │ │ +
479 {
│ │ │ +
480 __new_finish = _S_relocate(__old_start, __position.base(),
│ │ │ +
481 __new_start, _M_get_Tp_allocator());
│ │ │ +
482
│ │ │ +
483 ++__new_finish;
│ │ │ +
484
│ │ │ +
485 __new_finish = _S_relocate(__position.base(), __old_finish,
│ │ │ +
486 __new_finish, _M_get_Tp_allocator());
│ │ │ +
487 }
│ │ │ +
488 else
│ │ │ +
489#endif
│ │ │ +
490 {
│ │ │ +
491 __new_finish
│ │ │ + │ │ │ +
493 (__old_start, __position.base(),
│ │ │ +
494 __new_start, _M_get_Tp_allocator());
│ │ │ +
495
│ │ │ +
496 ++__new_finish;
│ │ │ +
497
│ │ │ +
498 __new_finish
│ │ │ + │ │ │ +
500 (__position.base(), __old_finish,
│ │ │ +
501 __new_finish, _M_get_Tp_allocator());
│ │ │ +
502 }
│ │ │ +
503 }
│ │ │ +
504 __catch(...)
│ │ │ +
505 {
│ │ │ +
506 if (!__new_finish)
│ │ │ +
507 _Alloc_traits::destroy(this->_M_impl,
│ │ │ +
508 __new_start + __elems_before);
│ │ │ +
509 else
│ │ │ +
510 std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator());
│ │ │ +
511 _M_deallocate(__new_start, __len);
│ │ │ +
512 __throw_exception_again;
│ │ │ +
513 }
│ │ │ +
514#if __cplusplus >= 201103L
│ │ │ +
515 if _GLIBCXX17_CONSTEXPR (!_S_use_relocate())
│ │ │ +
516#endif
│ │ │ +
517 std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator());
│ │ │ +
518 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ +
519 _M_deallocate(__old_start,
│ │ │ +
520 this->_M_impl._M_end_of_storage - __old_start);
│ │ │ +
521 this->_M_impl._M_start = __new_start;
│ │ │ +
522 this->_M_impl._M_finish = __new_finish;
│ │ │ +
523 this->_M_impl._M_end_of_storage = __new_start + __len;
│ │ │ +
524 }
│ │ │ +
525
│ │ │ +
526 template<typename _Tp, typename _Alloc>
│ │ │ +
527 _GLIBCXX20_CONSTEXPR
│ │ │ +
528 void
│ │ │ +
529 vector<_Tp, _Alloc>::
│ │ │ +
530 _M_fill_insert(iterator __position, size_type __n, const value_type& __x)
│ │ │ +
531 {
│ │ │ +
532 if (__n != 0)
│ │ │ +
533 {
│ │ │ +
534 if (size_type(this->_M_impl._M_end_of_storage
│ │ │ +
535 - this->_M_impl._M_finish) >= __n)
│ │ │ +
536 {
│ │ │ +
537#if __cplusplus < 201103L
│ │ │ +
538 value_type __x_copy = __x;
│ │ │ +
539#else
│ │ │ +
540 _Temporary_value __tmp(this, __x);
│ │ │ +
541 value_type& __x_copy = __tmp._M_val();
│ │ │ +
542#endif
│ │ │ +
543 const size_type __elems_after = end() - __position;
│ │ │ +
544 pointer __old_finish(this->_M_impl._M_finish);
│ │ │ +
545 if (__elems_after > __n)
│ │ │ +
546 {
│ │ │ +
547 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ +
548 std::__uninitialized_move_a(__old_finish - __n,
│ │ │ +
549 __old_finish,
│ │ │ +
550 __old_finish,
│ │ │ +
551 _M_get_Tp_allocator());
│ │ │ +
552 this->_M_impl._M_finish += __n;
│ │ │ +
553 _GLIBCXX_ASAN_ANNOTATE_GREW(__n);
│ │ │ +
554 _GLIBCXX_MOVE_BACKWARD3(__position.base(),
│ │ │ +
555 __old_finish - __n, __old_finish);
│ │ │ +
556 std::fill(__position.base(), __position.base() + __n,
│ │ │ +
557 __x_copy);
│ │ │ +
558 }
│ │ │ +
559 else
│ │ │ +
560 {
│ │ │ +
561 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ +
562 this->_M_impl._M_finish =
│ │ │ + │ │ │ +
564 __n - __elems_after,
│ │ │ +
565 __x_copy,
│ │ │ +
566 _M_get_Tp_allocator());
│ │ │ +
567 _GLIBCXX_ASAN_ANNOTATE_GREW(__n - __elems_after);
│ │ │ +
568 std::__uninitialized_move_a(__position.base(), __old_finish,
│ │ │ +
569 this->_M_impl._M_finish,
│ │ │ +
570 _M_get_Tp_allocator());
│ │ │ +
571 this->_M_impl._M_finish += __elems_after;
│ │ │ +
572 _GLIBCXX_ASAN_ANNOTATE_GREW(__elems_after);
│ │ │ +
573 std::fill(__position.base(), __old_finish, __x_copy);
│ │ │ +
574 }
│ │ │ +
575 }
│ │ │ +
576 else
│ │ │ +
577 {
│ │ │ +
578 // Make local copies of these members because the compiler thinks
│ │ │ +
579 // the allocator can alter them if 'this' is globally reachable.
│ │ │ +
580 pointer __old_start = this->_M_impl._M_start;
│ │ │ +
581 pointer __old_finish = this->_M_impl._M_finish;
│ │ │ +
582 const pointer __pos = __position.base();
│ │ │ +
583
│ │ │ +
584 const size_type __len =
│ │ │ +
585 _M_check_len(__n, "vector::_M_fill_insert");
│ │ │ +
586 const size_type __elems_before = __pos - __old_start;
│ │ │ +
587 pointer __new_start(this->_M_allocate(__len));
│ │ │ +
588 pointer __new_finish(__new_start);
│ │ │ +
589 __try
│ │ │ +
590 {
│ │ │ +
591 // See _M_realloc_insert above.
│ │ │ +
592 std::__uninitialized_fill_n_a(__new_start + __elems_before,
│ │ │ +
593 __n, __x,
│ │ │ +
594 _M_get_Tp_allocator());
│ │ │ +
595 __new_finish = pointer();
│ │ │ +
596
│ │ │ +
597 __new_finish
│ │ │ + │ │ │ +
599 (__old_start, __pos, __new_start, _M_get_Tp_allocator());
│ │ │ +
600
│ │ │ +
601 __new_finish += __n;
│ │ │ +
602
│ │ │ +
603 __new_finish
│ │ │ + │ │ │ +
605 (__pos, __old_finish, __new_finish, _M_get_Tp_allocator());
│ │ │ +
606 }
│ │ │ +
607 __catch(...)
│ │ │ +
608 {
│ │ │ +
609 if (!__new_finish)
│ │ │ +
610 std::_Destroy(__new_start + __elems_before,
│ │ │ +
611 __new_start + __elems_before + __n,
│ │ │ +
612 _M_get_Tp_allocator());
│ │ │ +
613 else
│ │ │ +
614 std::_Destroy(__new_start, __new_finish,
│ │ │ +
615 _M_get_Tp_allocator());
│ │ │ +
616 _M_deallocate(__new_start, __len);
│ │ │ +
617 __throw_exception_again;
│ │ │ +
618 }
│ │ │ +
619 std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator());
│ │ │ +
620 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ +
621 _M_deallocate(__old_start,
│ │ │ +
622 this->_M_impl._M_end_of_storage - __old_start);
│ │ │ +
623 this->_M_impl._M_start = __new_start;
│ │ │ +
624 this->_M_impl._M_finish = __new_finish;
│ │ │ +
625 this->_M_impl._M_end_of_storage = __new_start + __len;
│ │ │ +
626 }
│ │ │ +
627 }
│ │ │ +
628 }
│ │ │ +
629
│ │ │ +
630#if __cplusplus >= 201103L
│ │ │ +
631 template<typename _Tp, typename _Alloc>
│ │ │ +
632 _GLIBCXX20_CONSTEXPR
│ │ │ +
633 void
│ │ │ +
634 vector<_Tp, _Alloc>::
│ │ │ +
635 _M_default_append(size_type __n)
│ │ │ +
636 {
│ │ │ +
637 if (__n != 0)
│ │ │ +
638 {
│ │ │ +
639 const size_type __size = size();
│ │ │ +
640 size_type __navail = size_type(this->_M_impl._M_end_of_storage
│ │ │ +
641 - this->_M_impl._M_finish);
│ │ │ +
642
│ │ │ +
643 if (__size > max_size() || __navail > max_size() - __size)
│ │ │ +
644 __builtin_unreachable();
│ │ │ +
645
│ │ │ +
646 if (__navail >= __n)
│ │ │ +
647 {
│ │ │ +
648 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ +
649 this->_M_impl._M_finish =
│ │ │ +
650 std::__uninitialized_default_n_a(this->_M_impl._M_finish,
│ │ │ +
651 __n, _M_get_Tp_allocator());
│ │ │ +
652 _GLIBCXX_ASAN_ANNOTATE_GREW(__n);
│ │ │ +
653 }
│ │ │ +
654 else
│ │ │ +
655 {
│ │ │ +
656 // Make local copies of these members because the compiler thinks
│ │ │ +
657 // the allocator can alter them if 'this' is globally reachable.
│ │ │ +
658 pointer __old_start = this->_M_impl._M_start;
│ │ │ +
659 pointer __old_finish = this->_M_impl._M_finish;
│ │ │ +
660
│ │ │ +
661 const size_type __len =
│ │ │ +
662 _M_check_len(__n, "vector::_M_default_append");
│ │ │ +
663 pointer __new_start(this->_M_allocate(__len));
│ │ │ +
664 if _GLIBCXX17_CONSTEXPR (_S_use_relocate())
│ │ │ +
665 {
│ │ │ +
666 __try
│ │ │ +
667 {
│ │ │ +
668 std::__uninitialized_default_n_a(__new_start + __size,
│ │ │ +
669 __n, _M_get_Tp_allocator());
│ │ │ +
670 }
│ │ │ +
671 __catch(...)
│ │ │ +
672 {
│ │ │ +
673 _M_deallocate(__new_start, __len);
│ │ │ +
674 __throw_exception_again;
│ │ │ +
675 }
│ │ │ +
676 _S_relocate(__old_start, __old_finish,
│ │ │ +
677 __new_start, _M_get_Tp_allocator());
│ │ │ +
678 }
│ │ │ +
679 else
│ │ │ +
680 {
│ │ │ +
681 pointer __destroy_from = pointer();
│ │ │ +
682 __try
│ │ │ +
683 {
│ │ │ +
684 std::__uninitialized_default_n_a(__new_start + __size,
│ │ │ +
685 __n, _M_get_Tp_allocator());
│ │ │ +
686 __destroy_from = __new_start + __size;
│ │ │ + │ │ │ +
688 __old_start, __old_finish,
│ │ │ +
689 __new_start, _M_get_Tp_allocator());
│ │ │ +
690 }
│ │ │ +
691 __catch(...)
│ │ │ +
692 {
│ │ │ +
693 if (__destroy_from)
│ │ │ +
694 std::_Destroy(__destroy_from, __destroy_from + __n,
│ │ │ +
695 _M_get_Tp_allocator());
│ │ │ +
696 _M_deallocate(__new_start, __len);
│ │ │ +
697 __throw_exception_again;
│ │ │ +
698 }
│ │ │ +
699 std::_Destroy(__old_start, __old_finish,
│ │ │ +
700 _M_get_Tp_allocator());
│ │ │ +
701 }
│ │ │ +
702 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ +
703 _M_deallocate(__old_start,
│ │ │ +
704 this->_M_impl._M_end_of_storage - __old_start);
│ │ │ +
705 this->_M_impl._M_start = __new_start;
│ │ │ +
706 this->_M_impl._M_finish = __new_start + __size + __n;
│ │ │ +
707 this->_M_impl._M_end_of_storage = __new_start + __len;
│ │ │ +
708 }
│ │ │ +
709 }
│ │ │ +
710 }
│ │ │ +
711
│ │ │ +
712 template<typename _Tp, typename _Alloc>
│ │ │ +
713 _GLIBCXX20_CONSTEXPR
│ │ │ +
714 bool
│ │ │ +
715 vector<_Tp, _Alloc>::
│ │ │ +
716 _M_shrink_to_fit()
│ │ │ +
717 {
│ │ │ +
718 if (capacity() == size())
│ │ │ +
719 return false;
│ │ │ +
720 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ + │ │ │ +
722 }
│ │ │ +
723#endif
│ │ │ +
724
│ │ │ +
725 template<typename _Tp, typename _Alloc>
│ │ │ +
726 template<typename _InputIterator>
│ │ │ +
727 _GLIBCXX20_CONSTEXPR
│ │ │ +
728 void
│ │ │ +
729 vector<_Tp, _Alloc>::
│ │ │ +
730 _M_range_insert(iterator __pos, _InputIterator __first,
│ │ │ +
731 _InputIterator __last, std::input_iterator_tag)
│ │ │ +
732 {
│ │ │ +
733 if (__pos == end())
│ │ │ +
734 {
│ │ │ +
735 for (; __first != __last; ++__first)
│ │ │ +
736 insert(end(), *__first);
│ │ │ +
737 }
│ │ │ +
738 else if (__first != __last)
│ │ │ +
739 {
│ │ │ +
740 vector __tmp(__first, __last, _M_get_Tp_allocator());
│ │ │ +
741 insert(__pos,
│ │ │ +
742 _GLIBCXX_MAKE_MOVE_ITERATOR(__tmp.begin()),
│ │ │ +
743 _GLIBCXX_MAKE_MOVE_ITERATOR(__tmp.end()));
│ │ │ +
744 }
│ │ │ +
745 }
│ │ │ +
746
│ │ │ +
747 template<typename _Tp, typename _Alloc>
│ │ │ +
748 template<typename _ForwardIterator>
│ │ │ +
749 _GLIBCXX20_CONSTEXPR
│ │ │ +
750 void
│ │ │ +
751 vector<_Tp, _Alloc>::
│ │ │ +
752 _M_range_insert(iterator __position, _ForwardIterator __first,
│ │ │ +
753 _ForwardIterator __last, std::forward_iterator_tag)
│ │ │ +
754 {
│ │ │ +
755 if (__first != __last)
│ │ │ +
756 {
│ │ │ +
757 const size_type __n = std::distance(__first, __last);
│ │ │ +
758 if (size_type(this->_M_impl._M_end_of_storage
│ │ │ +
759 - this->_M_impl._M_finish) >= __n)
│ │ │ +
760 {
│ │ │ +
761 const size_type __elems_after = end() - __position;
│ │ │ +
762 pointer __old_finish(this->_M_impl._M_finish);
│ │ │ +
763 if (__elems_after > __n)
│ │ │ +
764 {
│ │ │ +
765 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ +
766 std::__uninitialized_move_a(this->_M_impl._M_finish - __n,
│ │ │ +
767 this->_M_impl._M_finish,
│ │ │ +
768 this->_M_impl._M_finish,
│ │ │ +
769 _M_get_Tp_allocator());
│ │ │ +
770 this->_M_impl._M_finish += __n;
│ │ │ +
771 _GLIBCXX_ASAN_ANNOTATE_GREW(__n);
│ │ │ +
772 _GLIBCXX_MOVE_BACKWARD3(__position.base(),
│ │ │ +
773 __old_finish - __n, __old_finish);
│ │ │ +
774 std::copy(__first, __last, __position);
│ │ │ +
775 }
│ │ │ +
776 else
│ │ │ +
777 {
│ │ │ +
778 _ForwardIterator __mid = __first;
│ │ │ +
779 std::advance(__mid, __elems_after);
│ │ │ +
780 _GLIBCXX_ASAN_ANNOTATE_GROW(__n);
│ │ │ +
781 std::__uninitialized_copy_a(__mid, __last,
│ │ │ +
782 this->_M_impl._M_finish,
│ │ │ +
783 _M_get_Tp_allocator());
│ │ │ +
784 this->_M_impl._M_finish += __n - __elems_after;
│ │ │ +
785 _GLIBCXX_ASAN_ANNOTATE_GREW(__n - __elems_after);
│ │ │ +
786 std::__uninitialized_move_a(__position.base(),
│ │ │ +
787 __old_finish,
│ │ │ +
788 this->_M_impl._M_finish,
│ │ │ +
789 _M_get_Tp_allocator());
│ │ │ +
790 this->_M_impl._M_finish += __elems_after;
│ │ │ +
791 _GLIBCXX_ASAN_ANNOTATE_GREW(__elems_after);
│ │ │ +
792 std::copy(__first, __mid, __position);
│ │ │ +
793 }
│ │ │ +
794 }
│ │ │ +
795 else
│ │ │ +
796 {
│ │ │ +
797 // Make local copies of these members because the compiler
│ │ │ +
798 // thinks the allocator can alter them if 'this' is globally
│ │ │ +
799 // reachable.
│ │ │ +
800 pointer __old_start = this->_M_impl._M_start;
│ │ │ +
801 pointer __old_finish = this->_M_impl._M_finish;
│ │ │ +
802 if ((__old_finish - __old_start) < 0)
│ │ │ +
803 __builtin_unreachable();
│ │ │ +
804
│ │ │ +
805 const size_type __len =
│ │ │ +
806 _M_check_len(__n, "vector::_M_range_insert");
│ │ │ +
807 pointer __new_start(this->_M_allocate(__len));
│ │ │ +
808 pointer __new_finish(__new_start);
│ │ │ +
809 __try
│ │ │ +
810 {
│ │ │ +
811 __new_finish
│ │ │ + │ │ │ +
813 (__old_start, __position.base(),
│ │ │ +
814 __new_start, _M_get_Tp_allocator());
│ │ │ +
815 __new_finish
│ │ │ +
816 = std::__uninitialized_copy_a(__first, __last,
│ │ │ +
817 __new_finish,
│ │ │ +
818 _M_get_Tp_allocator());
│ │ │ +
819 __new_finish
│ │ │ + │ │ │ +
821 (__position.base(), __old_finish,
│ │ │ +
822 __new_finish, _M_get_Tp_allocator());
│ │ │ +
823 }
│ │ │ +
824 __catch(...)
│ │ │ +
825 {
│ │ │ +
826 std::_Destroy(__new_start, __new_finish,
│ │ │ +
827 _M_get_Tp_allocator());
│ │ │ +
828 _M_deallocate(__new_start, __len);
│ │ │ +
829 __throw_exception_again;
│ │ │ +
830 }
│ │ │ +
831 std::_Destroy(__old_start, __old_finish,
│ │ │ +
832 _M_get_Tp_allocator());
│ │ │ +
833 _GLIBCXX_ASAN_ANNOTATE_REINIT;
│ │ │ +
834 _M_deallocate(__old_start,
│ │ │ +
835 this->_M_impl._M_end_of_storage - __old_start);
│ │ │ +
836 this->_M_impl._M_start = __new_start;
│ │ │ +
837 this->_M_impl._M_finish = __new_finish;
│ │ │ +
838 this->_M_impl._M_end_of_storage = __new_start + __len;
│ │ │ +
839 }
│ │ │ +
840 }
│ │ │ +
841 }
│ │ │ +
842
│ │ │ +
843
│ │ │ +
844 // vector<bool>
│ │ │ +
845 template<typename _Alloc>
│ │ │ +
846 _GLIBCXX20_CONSTEXPR
│ │ │ +
847 void
│ │ │ +
848 vector<bool, _Alloc>::
│ │ │ +
849 _M_reallocate(size_type __n)
│ │ │ +
850 {
│ │ │ +
851 const iterator __begin = begin(), __end = end();
│ │ │ +
852 if (size_type(__end - __begin) > __n)
│ │ │ +
853 __builtin_unreachable();
│ │ │ +
854 _Bit_pointer __q = this->_M_allocate(__n);
│ │ │ +
855 iterator __start(std::__addressof(*__q), 0);
│ │ │ +
856 iterator __finish(_M_copy_aligned(__begin, __end, __start));
│ │ │ +
857 this->_M_deallocate();
│ │ │ +
858 this->_M_impl._M_start = __start;
│ │ │ +
859 this->_M_impl._M_finish = __finish;
│ │ │ +
860 this->_M_impl._M_end_of_storage = __q + _S_nword(__n);
│ │ │ +
861 }
│ │ │ +
862
│ │ │ +
863 template<typename _Alloc>
│ │ │ +
864 _GLIBCXX20_CONSTEXPR
│ │ │ +
865 void
│ │ │ +
866 vector<bool, _Alloc>::
│ │ │ +
867 _M_fill_insert(iterator __position, size_type __n, bool __x)
│ │ │ +
868 {
│ │ │ +
869 if (__n == 0)
│ │ │ +
870 return;
│ │ │ +
871 if (capacity() - size() >= __n)
│ │ │ +
872 {
│ │ │ +
873 std::copy_backward(__position, end(),
│ │ │ +
874 this->_M_impl._M_finish + difference_type(__n));
│ │ │ +
875 std::fill(__position, __position + difference_type(__n), __x);
│ │ │ +
876 this->_M_impl._M_finish += difference_type(__n);
│ │ │ +
877 }
│ │ │ +
878 else
│ │ │ +
879 {
│ │ │ +
880 const size_type __len =
│ │ │ +
881 _M_check_len(__n, "vector<bool>::_M_fill_insert");
│ │ │ +
882 iterator __begin = begin(), __end = end();
│ │ │ +
883 _Bit_pointer __q = this->_M_allocate(__len);
│ │ │ +
884 iterator __start(std::__addressof(*__q), 0);
│ │ │ +
885 iterator __i = _M_copy_aligned(__begin, __position, __start);
│ │ │ +
886 std::fill(__i, __i + difference_type(__n), __x);
│ │ │ +
887 iterator __finish = std::copy(__position, __end,
│ │ │ +
888 __i + difference_type(__n));
│ │ │ +
889 this->_M_deallocate();
│ │ │ +
890 this->_M_impl._M_end_of_storage = __q + _S_nword(__len);
│ │ │ +
891 this->_M_impl._M_start = __start;
│ │ │ +
892 this->_M_impl._M_finish = __finish;
│ │ │ +
893 }
│ │ │ +
894 }
│ │ │ +
895
│ │ │ +
896 template<typename _Alloc>
│ │ │ +
897 template<typename _ForwardIterator>
│ │ │ +
898 _GLIBCXX20_CONSTEXPR
│ │ │ +
899 void
│ │ │ +
900 vector<bool, _Alloc>::
│ │ │ +
901 _M_insert_range(iterator __position, _ForwardIterator __first,
│ │ │ +
902 _ForwardIterator __last, std::forward_iterator_tag)
│ │ │ +
903 {
│ │ │ +
904 if (__first != __last)
│ │ │ +
905 {
│ │ │ +
906 size_type __n = std::distance(__first, __last);
│ │ │ +
907 if (capacity() - size() >= __n)
│ │ │ +
908 {
│ │ │ +
909 std::copy_backward(__position, end(),
│ │ │ +
910 this->_M_impl._M_finish
│ │ │ +
911 + difference_type(__n));
│ │ │ +
912 std::copy(__first, __last, __position);
│ │ │ +
913 this->_M_impl._M_finish += difference_type(__n);
│ │ │ +
914 }
│ │ │ +
915 else
│ │ │ +
916 {
│ │ │ +
917 const size_type __len =
│ │ │ +
918 _M_check_len(__n, "vector<bool>::_M_insert_range");
│ │ │ +
919 const iterator __begin = begin(), __end = end();
│ │ │ +
920 _Bit_pointer __q = this->_M_allocate(__len);
│ │ │ +
921 iterator __start(std::__addressof(*__q), 0);
│ │ │ +
922 iterator __i = _M_copy_aligned(__begin, __position, __start);
│ │ │ +
923 __i = std::copy(__first, __last, __i);
│ │ │ +
924 iterator __finish = std::copy(__position, __end, __i);
│ │ │ +
925 this->_M_deallocate();
│ │ │ +
926 this->_M_impl._M_end_of_storage = __q + _S_nword(__len);
│ │ │ +
927 this->_M_impl._M_start = __start;
│ │ │ +
928 this->_M_impl._M_finish = __finish;
│ │ │ +
929 }
│ │ │ +
930 }
│ │ │ +
931 }
│ │ │ +
932
│ │ │ +
933 template<typename _Alloc>
│ │ │ +
934 _GLIBCXX20_CONSTEXPR
│ │ │ +
935 void
│ │ │ +
936 vector<bool, _Alloc>::
│ │ │ +
937 _M_insert_aux(iterator __position, bool __x)
│ │ │ +
938 {
│ │ │ +
939 if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr())
│ │ │ +
940 {
│ │ │ +
941 std::copy_backward(__position, this->_M_impl._M_finish,
│ │ │ +
942 this->_M_impl._M_finish + 1);
│ │ │ +
943 *__position = __x;
│ │ │ +
944 ++this->_M_impl._M_finish;
│ │ │ +
945 }
│ │ │ +
946 else
│ │ │ +
947 {
│ │ │ +
948 const size_type __len =
│ │ │ +
949 _M_check_len(size_type(1), "vector<bool>::_M_insert_aux");
│ │ │ +
950 _Bit_pointer __q = this->_M_allocate(__len);
│ │ │ +
951 iterator __start(std::__addressof(*__q), 0);
│ │ │ +
952 iterator __i = _M_copy_aligned(begin(), __position, __start);
│ │ │ +
953 *__i++ = __x;
│ │ │ +
954 iterator __finish = std::copy(__position, end(), __i);
│ │ │ +
955 this->_M_deallocate();
│ │ │ +
956 this->_M_impl._M_end_of_storage = __q + _S_nword(__len);
│ │ │ +
957 this->_M_impl._M_start = __start;
│ │ │ +
958 this->_M_impl._M_finish = __finish;
│ │ │ +
959 }
│ │ │ +
960 }
│ │ │ +
961
│ │ │ +
962 template<typename _Alloc>
│ │ │ +
963 _GLIBCXX20_CONSTEXPR
│ │ │ +
964 typename vector<bool, _Alloc>::iterator
│ │ │ +
965 vector<bool, _Alloc>::
│ │ │ +
966 _M_erase(iterator __position)
│ │ │ +
967 {
│ │ │ +
968 if (__position + 1 != end())
│ │ │ +
969 std::copy(__position + 1, end(), __position);
│ │ │ +
970 --this->_M_impl._M_finish;
│ │ │ +
971 return __position;
│ │ │ +
972 }
│ │ │ +
973
│ │ │ +
974 template<typename _Alloc>
│ │ │ +
975 _GLIBCXX20_CONSTEXPR
│ │ │ +
976 typename vector<bool, _Alloc>::iterator
│ │ │ +
977 vector<bool, _Alloc>::
│ │ │ +
978 _M_erase(iterator __first, iterator __last)
│ │ │ +
979 {
│ │ │ +
980 if (__first != __last)
│ │ │ +
981 _M_erase_at_end(std::copy(__last, end(), __first));
│ │ │ +
982 return __first;
│ │ │ +
983 }
│ │ │ +
984
│ │ │ +
985#if __cplusplus >= 201103L
│ │ │ +
986 template<typename _Alloc>
│ │ │ +
987 _GLIBCXX20_CONSTEXPR
│ │ │ +
988 bool
│ │ │ +
989 vector<bool, _Alloc>::
│ │ │ +
990 _M_shrink_to_fit()
│ │ │ +
991 {
│ │ │ +
992 if (capacity() - size() < int(_S_word_bit))
│ │ │ +
993 return false;
│ │ │ +
994 __try
│ │ │ +
995 {
│ │ │ +
996 if (size_type __n = size())
│ │ │ +
997 _M_reallocate(__n);
│ │ │ +
998 else
│ │ │ +
999 {
│ │ │ +
1000 this->_M_deallocate();
│ │ │ +
1001 this->_M_impl._M_reset();
│ │ │ +
1002 }
│ │ │ +
1003 return true;
│ │ │ +
1004 }
│ │ │ +
1005 __catch(...)
│ │ │ +
1006 { return false; }
│ │ │ +
1007 }
│ │ │ +
1008#endif
│ │ │ +
1009
│ │ │ +
1010_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ +
1011_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
1012} // namespace std
│ │ │ +
1013
│ │ │ +
1014#if __cplusplus >= 201103L
│ │ │ +
1015
│ │ │ +
1016namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
1017{
│ │ │ +
1018_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
1019
│ │ │ +
1020 template<typename _Alloc>
│ │ │ +
1021 size_t
│ │ │ +
1022 hash<_GLIBCXX_STD_C::vector<bool, _Alloc>>::
│ │ │ +
1023 operator()(const _GLIBCXX_STD_C::vector<bool, _Alloc>& __b) const noexcept
│ │ │ +
1024 {
│ │ │ +
1025 size_t __hash = 0;
│ │ │ +
1026 const size_t __words = __b.size() / _S_word_bit;
│ │ │ +
1027 if (__words)
│ │ │ +
1028 {
│ │ │ +
1029 const size_t __clength = __words * sizeof(_Bit_type);
│ │ │ +
1030 __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength);
│ │ │ +
1031 }
│ │ │ +
1032
│ │ │ +
1033 const size_t __extrabits = __b.size() % _S_word_bit;
│ │ │ +
1034 if (__extrabits)
│ │ │ +
1035 {
│ │ │ +
1036 _Bit_type __hiword = *__b._M_impl._M_finish._M_p;
│ │ │ +
1037 __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits);
│ │ │ +
1038
│ │ │ +
1039 const size_t __clength
│ │ │ +
1040 = (__extrabits + __CHAR_BIT__ - 1) / __CHAR_BIT__;
│ │ │ +
1041 if (__words)
│ │ │ +
1042 __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash);
│ │ │ +
1043 else
│ │ │ +
1044 __hash = std::_Hash_impl::hash(&__hiword, __clength);
│ │ │ +
1045 }
│ │ │ +
1046
│ │ │ +
1047 return __hash;
│ │ │ +
1048 }
│ │ │ +
1049
│ │ │ +
1050_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
1051} // namespace std
│ │ │ +
1052
│ │ │ +
1053#endif // C++11
│ │ │ +
1054
│ │ │ +
1055#undef _GLIBCXX_ASAN_ANNOTATE_REINIT
│ │ │ +
1056#undef _GLIBCXX_ASAN_ANNOTATE_GROW
│ │ │ +
1057#undef _GLIBCXX_ASAN_ANNOTATE_GREW
│ │ │ +
1058#undef _GLIBCXX_ASAN_ANNOTATE_SHRINK
│ │ │ +
1059
│ │ │ +
1060#endif /* _VECTOR_TCC */
│ │ │ +
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:97
│ │ │ +
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
Definition move.h:51
│ │ │ +
_Tp * end(valarray< _Tp > &__va) noexcept
Return an iterator pointing to one past the last element of the valarray.
Definition valarray:1249
│ │ │ +
_Tp * begin(valarray< _Tp > &__va) noexcept
Return an iterator pointing to the first element of the valarray.
Definition valarray:1227
│ │ │ +
constexpr iterator_traits< _Iter >::iterator_category __iterator_category(const _Iter &)
│ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ -
pair< _Tp *, ptrdiff_t > get_temporary_buffer(ptrdiff_t __len) noexcept
Allocates a temporary buffer.
│ │ │ -
void return_temporary_buffer(_Tp *__p)
The companion to get_temporary_buffer().
│ │ │ -
constexpr void _Construct(_Tp *__p, _Args &&... __args)
│ │ │ -
constexpr void _Destroy(_ForwardIterator __first, _ForwardIterator __last)
│ │ │ -
Traits class for iterators.
│ │ │ -
Common iterator class.
│ │ │ - │ │ │ -
iterator end()
As per Table mumble.
│ │ │ -
size_type requested_size() const
Returns the size requested by the constructor; may be >size().
│ │ │ -
size_type size() const
As per Table mumble.
│ │ │ -
iterator begin()
As per Table mumble.
│ │ │ -
_Temporary_buffer(_ForwardIterator __seed, size_type __original_len)
│ │ │ - │ │ │ - │ │ │ +
constexpr iterator_traits< _InputIterator >::difference_type distance(_InputIterator __first, _InputIterator __last)
A generalization of pointer arithmetic.
│ │ │ +
constexpr auto cend(const _Container &__cont) noexcept(noexcept(std::end(__cont))) -> decltype(std::end(__cont))
Return an iterator pointing to one past the last element of the const container.
│ │ │ +
constexpr auto size(const _Container &__cont) noexcept(noexcept(__cont.size())) -> decltype(__cont.size())
Return the size of a container.
│ │ │ +
constexpr void advance(_InputIterator &__i, _Distance __n)
A generalization of pointer arithmetic.
│ │ │ +
constexpr auto cbegin(const _Container &__cont) noexcept(noexcept(std::begin(__cont))) -> decltype(std::begin(__cont))
Return an iterator pointing to the first element of the const container.
│ │ │ +
constexpr void _Destroy(_ForwardIterator __first, _ForwardIterator __last)
│ │ │ +
Marking input iterators.
│ │ │ +
Forward iterators support a superset of input iterator operations.
│ │ │ +
Common iterator class.
│ │ │ +
A standard container which offers fixed time access to individual elements in any order.
Definition stl_vector.h:429
│ │ │ +
constexpr vector & operator=(const vector &__x)
Vector assignment operator.
│ │ │ +
constexpr void reserve(size_type __n)
Attempt to preallocate enough memory for specified number of elements.
Definition vector.tcc:68
│ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,11 +1,11 @@ │ │ │ │ libstdc++ │ │ │ │ -stl_tempbuf.h │ │ │ │ +vector.tcc │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// Temporary buffer implementation -*- C++ -*- │ │ │ │ +1// Vector implementation (out of line) -*- C++ -*- │ │ │ │ 2 │ │ │ │ 3// Copyright (C) 2001-2023 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) │ │ │ │ @@ -35,317 +35,1104 @@ │ │ │ │ 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 │ │ │ │ +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_tempbuf.h │ │ │ │ +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{memory} │ │ │ │ +53 * Do not attempt to use it directly. @headername{vector} │ │ │ │ 54 */ │ │ │ │ 55 │ │ │ │ -56#ifndef _STL_TEMPBUF_H │ │ │ │ -57#define _STL_TEMPBUF_H 1 │ │ │ │ +56#ifndef _VECTOR_TCC │ │ │ │ +57#define _VECTOR_TCC 1 │ │ │ │ 58 │ │ │ │ -59#include <_n_e_w> │ │ │ │ -60#include <_b_i_t_s_/_e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h> │ │ │ │ -61#include <_b_i_t_s_/_s_t_l___c_o_n_s_t_r_u_c_t_._h> │ │ │ │ -62#include <_b_i_t_s_/_s_t_l___p_a_i_r_._h> │ │ │ │ -63#include <_e_x_t_/_n_u_m_e_r_i_c___t_r_a_i_t_s_._h> │ │ │ │ -64 │ │ │ │ -65namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -66{ │ │ │ │ -67_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -68 │ │ │ │ -69 namespace __detail │ │ │ │ -70 { │ │ │ │ -71 template │ │ │ │ -72 inline void │ │ │ │ -73 __return_temporary_buffer(_Tp* __p, │ │ │ │ -74 size_t __len __attribute__((__unused__))) │ │ │ │ -75 { │ │ │ │ -76#if __cpp_sized_deallocation │ │ │ │ -77 ::operator delete(__p, __len * sizeof(_Tp)); │ │ │ │ -78#else │ │ │ │ -79 ::operator delete(__p); │ │ │ │ -80#endif │ │ │ │ -81 } │ │ │ │ +59namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +60{ │ │ │ │ +61_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +62_GLIBCXX_BEGIN_NAMESPACE_CONTAINER │ │ │ │ +63 │ │ │ │ +64 template │ │ │ │ +65 _GLIBCXX20_CONSTEXPR │ │ │ │ +66 void │ │ │ │ +_6_7 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +68_ _r_e_s_e_r_v_e(size_type __n) │ │ │ │ +69 { │ │ │ │ +70 if (__n > this->max_size()) │ │ │ │ +71 __throw_length_error(__N("vector::reserve")); │ │ │ │ +72 if (this->capacity() < __n) │ │ │ │ +73 { │ │ │ │ +74 const size_type _____o_l_d___s_i_z_e = _s_i_z_e(); │ │ │ │ +75 pointer _____t_m_p; │ │ │ │ +76#if __cplusplus >= 201103L │ │ │ │ +77 if ___G_L_I_B_C_X_X_1_7___C_O_N_S_T_E_X_P_R (_S_use_relocate()) │ │ │ │ +78 { │ │ │ │ +79 _____t_m_p = this->_M_allocate(__n); │ │ │ │ +80 _S_relocate(this->_M_impl._M_start, _t_h_i_s->_M_impl._M_finish, │ │ │ │ +81 _____t_m_p, _M_get_Tp_allocator()); │ │ │ │ 82 } │ │ │ │ -83 │ │ │ │ -84 /** │ │ │ │ -85 * @brief Allocates a temporary buffer. │ │ │ │ -86 * @param __len The number of objects of type Tp. │ │ │ │ -87 * @return See full description. │ │ │ │ -88 * │ │ │ │ -89 * Reinventing the wheel, but this time with prettier spokes! │ │ │ │ -90 * │ │ │ │ -91 * This function tries to obtain storage for @c __len adjacent Tp │ │ │ │ -92 * objects. The objects themselves are not constructed, of course. │ │ │ │ -93 * A pair<> is returned containing the buffer s address and │ │ │ │ -94 * capacity (in the units of sizeof(_Tp)), or a pair of 0 values if │ │ │ │ -95 * no storage can be obtained. Note that the capacity obtained │ │ │ │ -96 * may be less than that requested if the memory is unavailable; │ │ │ │ -97 * you should compare len with the .second return value. │ │ │ │ -98 * │ │ │ │ -99 * Provides the nothrow exception guarantee. │ │ │ │ -100 */ │ │ │ │ -101 template │ │ │ │ -102 _GLIBCXX17_DEPRECATED │ │ │ │ -103 pair<_Tp*, ptrdiff_t> │ │ │ │ -_1_0_4 _g_e_t___t_e_m_p_o_r_a_r_y___b_u_f_f_e_r(ptrdiff_t _____l_e_n) ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -105 { │ │ │ │ -106 const ptrdiff_t __max = │ │ │ │ -107 __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); │ │ │ │ -108 if (_____l_e_n > __max) │ │ │ │ -109 _____l_e_n = __max; │ │ │ │ -110 │ │ │ │ -111 while (_____l_e_n > 0) │ │ │ │ -112 { │ │ │ │ -113 _Tp* _____t_m_p = static_cast<_Tp*>(::operator new(_____l_e_n * sizeof(_Tp), │ │ │ │ -114 std::nothrow)); │ │ │ │ -115 if (_____t_m_p != 0) │ │ │ │ -116 return _s_t_d_:_:_p_a_i_r_<___T_p_*_,_ _p_t_r_d_i_f_f___t_>(_____t_m_p, _____l_e_n); │ │ │ │ -117 _____l_e_n = _____l_e_n == 1 ? 0 : ((_____l_e_n + 1) / 2); │ │ │ │ -118 } │ │ │ │ -119 return _s_t_d_:_:_p_a_i_r_<___T_p_*_,_ _p_t_r_d_i_f_f___t_>(static_cast<_Tp*>(0), 0); │ │ │ │ -120 } │ │ │ │ -121 │ │ │ │ -122 /** │ │ │ │ -123 * @brief The companion to get_temporary_buffer(). │ │ │ │ -124 * @param __p A buffer previously allocated by get_temporary_buffer. │ │ │ │ -125 * @return None. │ │ │ │ -126 * │ │ │ │ -127 * Frees the memory pointed to by __p. │ │ │ │ -128 */ │ │ │ │ -129 template │ │ │ │ -130 inline void │ │ │ │ -_1_3_1 _r_e_t_u_r_n___t_e_m_p_o_r_a_r_y___b_u_f_f_e_r(_Tp* __p) │ │ │ │ -132 { ::operator delete(__p); } │ │ │ │ -133 │ │ │ │ -134 /** │ │ │ │ -135 * This class is used in two places: stl_algo.h and ext/memory, │ │ │ │ -136 * where it is wrapped as the temporary_buffer class. See │ │ │ │ -137 * temporary_buffer docs for more notes. │ │ │ │ -138 */ │ │ │ │ -139 template │ │ │ │ -_1_4_0 class ___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r │ │ │ │ -141 { │ │ │ │ -142 // concept requirements │ │ │ │ -143 __glibcxx_class_requires(___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r, _ForwardIteratorConcept) │ │ │ │ -144 │ │ │ │ -145 public: │ │ │ │ -146 typedef _Tp value_type; │ │ │ │ -147 typedef value_type* pointer; │ │ │ │ -148 typedef pointer iterator; │ │ │ │ -149 typedef ptrdiff_t size_type; │ │ │ │ -150 │ │ │ │ -151 protected: │ │ │ │ -152 size_type _M_original_len; │ │ │ │ -153 size_type _M_len; │ │ │ │ -154 pointer _M_buffer; │ │ │ │ -155 │ │ │ │ -156 public: │ │ │ │ -157 /// As per Table mumble. │ │ │ │ -158 size_type │ │ │ │ -_1_5_9 _s_i_z_e() const │ │ │ │ -160 { return _M_len; } │ │ │ │ -161 │ │ │ │ -162 /// Returns the size requested by the constructor; may be >size(). │ │ │ │ -163 size_type │ │ │ │ -_1_6_4 _r_e_q_u_e_s_t_e_d___s_i_z_e() const │ │ │ │ -165 { return _M_original_len; } │ │ │ │ -166 │ │ │ │ -167 /// As per Table mumble. │ │ │ │ -168 _i_t_e_r_a_t_o_r │ │ │ │ -_1_6_9 _b_e_g_i_n() │ │ │ │ -170 { return _M_buffer; } │ │ │ │ -171 │ │ │ │ -172 /// As per Table mumble. │ │ │ │ -173 _i_t_e_r_a_t_o_r │ │ │ │ -_1_7_4 _e_n_d() │ │ │ │ -175 { return _M_buffer + _M_len; } │ │ │ │ -176 │ │ │ │ -177 /** │ │ │ │ -178 * Constructs a temporary buffer of a size somewhere between │ │ │ │ -179 * zero and the given length. │ │ │ │ -180 */ │ │ │ │ -_1_8_1 ___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r(___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r _____s_e_e_d, size_type _____o_r_i_g_i_n_a_l___l_e_n); │ │ │ │ -182 │ │ │ │ -183 _~___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r() │ │ │ │ -184 { │ │ │ │ -185 _s_t_d_:_:___D_e_s_t_r_o_y(_M_buffer, _M_buffer + _M_len); │ │ │ │ -186 std::__detail::__return_temporary_buffer(_M_buffer, _M_len); │ │ │ │ -187 } │ │ │ │ -188 │ │ │ │ -189 private: │ │ │ │ -190 // Disable copy constructor and assignment operator. │ │ │ │ -191 ___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r(const ___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r&); │ │ │ │ -192 │ │ │ │ -193 void │ │ │ │ -194 operator=(const ___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r&); │ │ │ │ -195 }; │ │ │ │ -196 │ │ │ │ -197 │ │ │ │ -198 template │ │ │ │ -199 struct __uninitialized_construct_buf_dispatch │ │ │ │ -200 { │ │ │ │ -201 template │ │ │ │ -202 static void │ │ │ │ -203 __ucr(_Pointer __first, _Pointer __last, │ │ │ │ -204 _ForwardIterator __seed) │ │ │ │ -205 { │ │ │ │ -206 if (__first == __last) │ │ │ │ -207 return; │ │ │ │ -208 │ │ │ │ -209 _Pointer __cur = __first; │ │ │ │ -210 __try │ │ │ │ -211 { │ │ │ │ -212 _s_t_d_:_:___C_o_n_s_t_r_u_c_t(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(*__first), │ │ │ │ -213 _GLIBCXX_MOVE(*__seed)); │ │ │ │ -214 _Pointer __prev = __cur; │ │ │ │ -215 ++__cur; │ │ │ │ -216 for(; __cur != __last; ++__cur, ++__prev) │ │ │ │ -217 _s_t_d_:_:___C_o_n_s_t_r_u_c_t(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(*__cur), │ │ │ │ -218 _GLIBCXX_MOVE(*__prev)); │ │ │ │ -219 *__seed = _GLIBCXX_MOVE(*__prev); │ │ │ │ -220 } │ │ │ │ -221 __catch(...) │ │ │ │ -222 { │ │ │ │ -223 _s_t_d_:_:___D_e_s_t_r_o_y(__first, __cur); │ │ │ │ -224 __throw_exception_again; │ │ │ │ -225 } │ │ │ │ -226 } │ │ │ │ -227 }; │ │ │ │ -228 │ │ │ │ -229 template<> │ │ │ │ -230 struct __uninitialized_construct_buf_dispatch │ │ │ │ -231 { │ │ │ │ -232 template │ │ │ │ -233 static void │ │ │ │ -234 __ucr(_Pointer, _Pointer, _ForwardIterator) { } │ │ │ │ -235 }; │ │ │ │ -236 │ │ │ │ -237 // Constructs objects in the range [first, last). │ │ │ │ -238 // Note that while these new objects will take valid values, │ │ │ │ -239 // their exact value is not defined. In particular they may │ │ │ │ -240 // be 'moved from'. │ │ │ │ -241 // │ │ │ │ -242 // While *__seed may be altered during this algorithm, it will have │ │ │ │ -243 // the same value when the algorithm finishes, unless one of the │ │ │ │ -244 // constructions throws. │ │ │ │ -245 // │ │ │ │ -246 // Requirements: _Pointer::value_type(_Tp&&) is valid. │ │ │ │ -247 template │ │ │ │ -248 inline void │ │ │ │ -249 __uninitialized_construct_buf(_Pointer __first, _Pointer __last, │ │ │ │ -250 _ForwardIterator __seed) │ │ │ │ -251 { │ │ │ │ -252 typedef typename _s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s_<___P_o_i_n_t_e_r_>_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ -253 _ValueType; │ │ │ │ -254 │ │ │ │ -255 std::__uninitialized_construct_buf_dispatch< │ │ │ │ -256 __has_trivial_constructor(_ValueType)>:: │ │ │ │ -257 __ucr(__first, __last, __seed); │ │ │ │ -258 } │ │ │ │ -259 │ │ │ │ -260#pragma GCC diagnostic push │ │ │ │ -261#pragma GCC diagnostic ignored "-Wdeprecated-declarations" │ │ │ │ -262 template │ │ │ │ -_2_6_3 ___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r_<___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r_,_ ___T_p_>_:_: │ │ │ │ -264_ ___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r(___F_o_r_w_a_r_d_I_t_e_r_a_t_o_r _____s_e_e_d, size_type _____o_r_i_g_i_n_a_l___l_e_n) │ │ │ │ -265 : _M_original_len(_____o_r_i_g_i_n_a_l___l_e_n), _M_len(0), _M_buffer(0) │ │ │ │ -266 { │ │ │ │ -267 _s_t_d_:_:_p_a_i_r_<_p_o_i_n_t_e_r_,_ _s_i_z_e___t_y_p_e_> __p( │ │ │ │ -268 _s_t_d_:_:_g_e_t___t_e_m_p_o_r_a_r_y___b_u_f_f_e_r_<_v_a_l_u_e___t_y_p_e_>(_M_original_len)); │ │ │ │ -269 │ │ │ │ -270 if (__p.first) │ │ │ │ -271 { │ │ │ │ -272 __try │ │ │ │ -273 { │ │ │ │ -274 std::__uninitialized_construct_buf(__p.first, __p.first + __p.second, │ │ │ │ -275 _____s_e_e_d); │ │ │ │ -276 _M_buffer = __p.first; │ │ │ │ -277 _M_len = __p.second; │ │ │ │ -278 } │ │ │ │ -279 __catch(...) │ │ │ │ -280 { │ │ │ │ -281 std::__detail::__return_temporary_buffer(__p.first, __p.second); │ │ │ │ -282 __throw_exception_again; │ │ │ │ -283 } │ │ │ │ -284 } │ │ │ │ -285 } │ │ │ │ -286#pragma GCC diagnostic pop │ │ │ │ -287 │ │ │ │ -288_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -289} // namespace │ │ │ │ -290 │ │ │ │ -291#endif /* _STL_TEMPBUF_H */ │ │ │ │ -_n_e_w │ │ │ │ -_e_x_c_e_p_t_i_o_n___d_e_f_i_n_e_s_._h │ │ │ │ -_s_t_l___p_a_i_r_._h │ │ │ │ -_s_t_l___c_o_n_s_t_r_u_c_t_._h │ │ │ │ +83 else │ │ │ │ +84#endif │ │ │ │ +85 { │ │ │ │ +86 _____t_m_p = _M_allocate_and_copy(__n, │ │ │ │ +87 _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_start), │ │ │ │ +88 _GLIBCXX_MAKE_MOVE_IF_NOEXCEPT_ITERATOR(this->_M_impl._M_finish)); │ │ │ │ +89 _s_t_d_:_:___D_e_s_t_r_o_y(this->_M_impl._M_start, _t_h_i_s->_M_impl._M_finish, │ │ │ │ +90 _M_get_Tp_allocator()); │ │ │ │ +91 } │ │ │ │ +92 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +93 _M_deallocate(this->_M_impl._M_start, │ │ │ │ +94 _t_h_i_s->_M_impl._M_end_of_storage │ │ │ │ +95 - _t_h_i_s->_M_impl._M_start); │ │ │ │ +96 this->_M_impl._M_start = _____t_m_p; │ │ │ │ +97 this->_M_impl._M_finish = _____t_m_p + _____o_l_d___s_i_z_e; │ │ │ │ +98 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; │ │ │ │ +99 } │ │ │ │ +100 } │ │ │ │ +101 │ │ │ │ +102#if __cplusplus >= 201103L │ │ │ │ +103 template │ │ │ │ +104 template │ │ │ │ +105#if __cplusplus > 201402L │ │ │ │ +106 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ +107 typename vector<_Tp, _Alloc>::reference │ │ │ │ +108#else │ │ │ │ +109 void │ │ │ │ +110#endif │ │ │ │ +111 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +112_ _e_m_p_l_a_c_e___b_a_c_k(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ +113 { │ │ │ │ +114 if (this->_M_impl._M_finish != _t_h_i_s->_M_impl._M_end_of_storage) │ │ │ │ +115 { │ │ │ │ +116 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ +117 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ +118 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ +119 ++this->_M_impl._M_finish; │ │ │ │ +120 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ +121 } │ │ │ │ +122 else │ │ │ │ +123 _M_realloc_insert(_e_n_d(), _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +124#if __cplusplus > 201402L │ │ │ │ +125 return back(); │ │ │ │ +126#endif │ │ │ │ +127 } │ │ │ │ +128#endif │ │ │ │ +129 │ │ │ │ +130 template │ │ │ │ +131 _GLIBCXX20_CONSTEXPR │ │ │ │ +132 typename vector<_Tp, _Alloc>::iterator │ │ │ │ +_1_3_3 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>:: │ │ │ │ +134#if __cplusplus >= 201103L │ │ │ │ +135 insert(const_iterator _____p_o_s_i_t_i_o_n, const value_type& __x) │ │ │ │ +136#else │ │ │ │ +137 insert(iterator _____p_o_s_i_t_i_o_n, const value_type& __x) │ │ │ │ +138#endif │ │ │ │ +139 { │ │ │ │ +140 const size_type __n = _____p_o_s_i_t_i_o_n - _b_e_g_i_n(); │ │ │ │ +141 if (this->_M_impl._M_finish != _t_h_i_s->_M_impl._M_end_of_storage) │ │ │ │ +142 { │ │ │ │ +143 __glibcxx_assert(_____p_o_s_i_t_i_o_n != const_iterator()); │ │ │ │ +144 if (!(_____p_o_s_i_t_i_o_n != const_iterator())) │ │ │ │ +145 _____b_u_i_l_t_i_n___u_n_r_e_a_c_h_a_b_l_e(); // PR 106434 │ │ │ │ +146 │ │ │ │ +147 if (_____p_o_s_i_t_i_o_n == _e_n_d()) │ │ │ │ +148 { │ │ │ │ +149 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ +150 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ +151 __x); │ │ │ │ +152 ++this->_M_impl._M_finish; │ │ │ │ +153 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ +154 } │ │ │ │ +155 else │ │ │ │ +156 { │ │ │ │ +157#if __cplusplus >= 201103L │ │ │ │ +158 const auto _____p_o_s = _b_e_g_i_n() + (_____p_o_s_i_t_i_o_n - _c_b_e_g_i_n()); │ │ │ │ +159 // __x could be an existing element of this vector, so make a │ │ │ │ +160 // copy of it before _M_insert_aux moves elements around. │ │ │ │ +161 _Temporary_value _____x___c_o_p_y(this, __x); │ │ │ │ +162 _M_insert_aux(_____p_o_s, _s_t_d_:_:_m_o_v_e(_____x___c_o_p_y._M_val())); │ │ │ │ +163#else │ │ │ │ +164 _M_insert_aux(_____p_o_s_i_t_i_o_n, __x); │ │ │ │ +165#endif │ │ │ │ +166 } │ │ │ │ +167 } │ │ │ │ +168 else │ │ │ │ +169#if __cplusplus >= 201103L │ │ │ │ +170 _M_realloc_insert(_b_e_g_i_n() + (_____p_o_s_i_t_i_o_n - _c_b_e_g_i_n()), __x); │ │ │ │ +171#else │ │ │ │ +172 _M_realloc_insert(_____p_o_s_i_t_i_o_n, __x); │ │ │ │ +173#endif │ │ │ │ +174 │ │ │ │ +175 return iterator(this->_M_impl._M_start + __n); │ │ │ │ +176 } │ │ │ │ +177 │ │ │ │ +178 template │ │ │ │ +179 ___G_L_I_B_C_X_X_2_0___C_O_N_S_T_E_X_P_R │ │ │ │ +180 typename vector<_Tp, _Alloc>::iterator │ │ │ │ +181 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +182_ ___M___e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ +183 { │ │ │ │ +184 if (_____p_o_s_i_t_i_o_n + 1 != _e_n_d()) │ │ │ │ +185 _GLIBCXX_MOVE3(_____p_o_s_i_t_i_o_n + 1, _e_n_d(), _____p_o_s_i_t_i_o_n); │ │ │ │ +186 --this->_M_impl._M_finish; │ │ │ │ +187 _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); │ │ │ │ +188 _GLIBCXX_ASAN_ANNOTATE_SHRINK(1); │ │ │ │ +189 return _____p_o_s_i_t_i_o_n; │ │ │ │ +190 } │ │ │ │ +191 │ │ │ │ +192 template │ │ │ │ +193 _GLIBCXX20_CONSTEXPR │ │ │ │ +194 typename vector<_Tp, _Alloc>::iterator │ │ │ │ +195 vector<_Tp, _Alloc>:: │ │ │ │ +196 _M_erase(iterator __first, iterator __last) │ │ │ │ +197 { │ │ │ │ +198 if (__first != __last) │ │ │ │ +199 { │ │ │ │ +200 if (__last != _e_n_d()) │ │ │ │ +201 _GLIBCXX_MOVE3(__last, _e_n_d(), __first); │ │ │ │ +202 _M_erase_at_end(__first.base() + (_e_n_d() - __last)); │ │ │ │ +203 } │ │ │ │ +204 return __first; │ │ │ │ +205 } │ │ │ │ +206 │ │ │ │ +207 template │ │ │ │ +208 _GLIBCXX20_CONSTEXPR │ │ │ │ +209 vector<_Tp, _Alloc>& │ │ │ │ +210 _v_e_c_t_o_r_<___T_p_,_ ___A_l_l_o_c_>_:_: │ │ │ │ +211_ _o_p_e_r_a_t_o_r_=(const vector<_Tp, _Alloc>& __x) │ │ │ │ +212 { │ │ │ │ +213 if (_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(__x) != this) │ │ │ │ +214 { │ │ │ │ +215 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +216#if __cplusplus >= 201103L │ │ │ │ +217 if (_Alloc_traits::_S_propagate_on_copy_assign()) │ │ │ │ +218 { │ │ │ │ +219 if (!_Alloc_traits::_S_always_equal() │ │ │ │ +220 && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) │ │ │ │ +221 { │ │ │ │ +222 // replacement allocator cannot free existing storage │ │ │ │ +223 this->clear(); │ │ │ │ +224 _M_deallocate(this->_M_impl._M_start, │ │ │ │ +225 this->_M_impl._M_end_of_storage │ │ │ │ +226 - this->_M_impl._M_start); │ │ │ │ +227 this->_M_impl._M_start = nullptr; │ │ │ │ +228 this->_M_impl._M_finish = nullptr; │ │ │ │ +229 this->_M_impl._M_end_of_storage = nullptr; │ │ │ │ +230 } │ │ │ │ +231 _s_t_d_:_:_____a_l_l_o_c___o_n___c_o_p_y(_M_get_Tp_allocator(), │ │ │ │ +232 __x._M_get_Tp_allocator()); │ │ │ │ +233 } │ │ │ │ +234#endif │ │ │ │ +235 const size_type __xlen = __x.size(); │ │ │ │ +236 if (__xlen > capacity()) │ │ │ │ +237 { │ │ │ │ +238 pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), │ │ │ │ +239 __x.end()); │ │ │ │ +240 _s_t_d_:_:___D_e_s_t_r_o_y(this->_M_impl._M_start, this->_M_impl._M_finish, │ │ │ │ +241 _M_get_Tp_allocator()); │ │ │ │ +242 _M_deallocate(this->_M_impl._M_start, │ │ │ │ +243 this->_M_impl._M_end_of_storage │ │ │ │ +244 - this->_M_impl._M_start); │ │ │ │ +245 this->_M_impl._M_start = __tmp; │ │ │ │ +246 this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; │ │ │ │ +247 } │ │ │ │ +248 else if (_s_i_z_e() >= __xlen) │ │ │ │ +249 { │ │ │ │ +250 _s_t_d_:_:___D_e_s_t_r_o_y(std::copy(__x.begin(), __x.end(), _b_e_g_i_n()), │ │ │ │ +251 _e_n_d(), _M_get_Tp_allocator()); │ │ │ │ +252 } │ │ │ │ +253 else │ │ │ │ +254 { │ │ │ │ +255 std::copy(__x._M_impl._M_start, __x._M_impl._M_start + _s_i_z_e(), │ │ │ │ +256 this->_M_impl._M_start); │ │ │ │ +257 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_p_y___a(__x._M_impl._M_start + _s_i_z_e(), │ │ │ │ +258 __x._M_impl._M_finish, │ │ │ │ +259 this->_M_impl._M_finish, │ │ │ │ +260 _M_get_Tp_allocator()); │ │ │ │ +261 } │ │ │ │ +262 this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; │ │ │ │ +263 } │ │ │ │ +264 return *this; │ │ │ │ +265 } │ │ │ │ +266 │ │ │ │ +267 template │ │ │ │ +268 _GLIBCXX20_CONSTEXPR │ │ │ │ +269 void │ │ │ │ +270 vector<_Tp, _Alloc>:: │ │ │ │ +271 _M_fill_assign(size_t __n, const value_type& __val) │ │ │ │ +272 { │ │ │ │ +273 if (__n > capacity()) │ │ │ │ +274 { │ │ │ │ +275 vector __tmp(__n, __val, _M_get_Tp_allocator()); │ │ │ │ +276 __tmp._M_impl._M_swap_data(this->_M_impl); │ │ │ │ +277 } │ │ │ │ +278 else if (__n > _s_i_z_e()) │ │ │ │ +279 { │ │ │ │ +280 std::fill(_b_e_g_i_n(), _e_n_d(), __val); │ │ │ │ +281 const size_type __add = __n - _s_i_z_e(); │ │ │ │ +282 _GLIBCXX_ASAN_ANNOTATE_GROW(__add); │ │ │ │ +283 this->_M_impl._M_finish = │ │ │ │ +284 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___f_i_l_l___n___a(this->_M_impl._M_finish, │ │ │ │ +285 __add, __val, _M_get_Tp_allocator()); │ │ │ │ +286 _GLIBCXX_ASAN_ANNOTATE_GREW(__add); │ │ │ │ +287 } │ │ │ │ +288 else │ │ │ │ +289 _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); │ │ │ │ +290 } │ │ │ │ +291 │ │ │ │ +292 template │ │ │ │ +293 template │ │ │ │ +294 _GLIBCXX20_CONSTEXPR │ │ │ │ +295 void │ │ │ │ +296 vector<_Tp, _Alloc>:: │ │ │ │ +297 _M_assign_aux(_InputIterator __first, _InputIterator __last, │ │ │ │ +298 _s_t_d_:_:_i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g) │ │ │ │ +299 { │ │ │ │ +300 pointer __cur(this->_M_impl._M_start); │ │ │ │ +301 for (; __first != __last && __cur != this->_M_impl._M_finish; │ │ │ │ +302 ++__cur, (void)++__first) │ │ │ │ +303 *__cur = *__first; │ │ │ │ +304 if (__first == __last) │ │ │ │ +305 _M_erase_at_end(__cur); │ │ │ │ +306 else │ │ │ │ +307 _M_range_insert(_e_n_d(), __first, __last, │ │ │ │ +308 _s_t_d_:_:_____i_t_e_r_a_t_o_r___c_a_t_e_g_o_r_y(__first)); │ │ │ │ +309 } │ │ │ │ +310 │ │ │ │ +311 template │ │ │ │ +312 template │ │ │ │ +313 _GLIBCXX20_CONSTEXPR │ │ │ │ +314 void │ │ │ │ +315 vector<_Tp, _Alloc>:: │ │ │ │ +316 _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, │ │ │ │ +317 _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g) │ │ │ │ +318 { │ │ │ │ +319 const size_type __len = _s_t_d_:_:_d_i_s_t_a_n_c_e(__first, __last); │ │ │ │ +320 │ │ │ │ +321 if (__len > capacity()) │ │ │ │ +322 { │ │ │ │ +323 _S_check_init_len(__len, _M_get_Tp_allocator()); │ │ │ │ +324 pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); │ │ │ │ +325 _s_t_d_:_:___D_e_s_t_r_o_y(this->_M_impl._M_start, this->_M_impl._M_finish, │ │ │ │ +326 _M_get_Tp_allocator()); │ │ │ │ +327 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +328 _M_deallocate(this->_M_impl._M_start, │ │ │ │ +329 this->_M_impl._M_end_of_storage │ │ │ │ +330 - this->_M_impl._M_start); │ │ │ │ +331 this->_M_impl._M_start = __tmp; │ │ │ │ +332 this->_M_impl._M_finish = this->_M_impl._M_start + __len; │ │ │ │ +333 this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; │ │ │ │ +334 } │ │ │ │ +335 else if (_s_i_z_e() >= __len) │ │ │ │ +336 _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); │ │ │ │ +337 else │ │ │ │ +338 { │ │ │ │ +339 _ForwardIterator __mid = __first; │ │ │ │ +340 _s_t_d_:_:_a_d_v_a_n_c_e(__mid, _s_i_z_e()); │ │ │ │ +341 std::copy(__first, __mid, this->_M_impl._M_start); │ │ │ │ +342 const size_type __attribute__((__unused__)) __n = __len - _s_i_z_e(); │ │ │ │ +343 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ +344 this->_M_impl._M_finish = │ │ │ │ +345 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_p_y___a(__mid, __last, │ │ │ │ +346 this->_M_impl._M_finish, │ │ │ │ +347 _M_get_Tp_allocator()); │ │ │ │ +348 _GLIBCXX_ASAN_ANNOTATE_GREW(__n); │ │ │ │ +349 } │ │ │ │ +350 } │ │ │ │ +351 │ │ │ │ +352#if __cplusplus >= 201103L │ │ │ │ +353 template │ │ │ │ +354 _GLIBCXX20_CONSTEXPR │ │ │ │ +355 auto │ │ │ │ +356 vector<_Tp, _Alloc>:: │ │ │ │ +357 _M_insert_rval(const_iterator __position, value_type&& __v) -> iterator │ │ │ │ +358 { │ │ │ │ +359 const auto __n = __position - _c_b_e_g_i_n(); │ │ │ │ +360 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) │ │ │ │ +361 if (__position == _c_e_n_d()) │ │ │ │ +362 { │ │ │ │ +363 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ +364 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ +365 _s_t_d_:_:_m_o_v_e(__v)); │ │ │ │ +366 ++this->_M_impl._M_finish; │ │ │ │ +367 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ +368 } │ │ │ │ +369 else │ │ │ │ +370 _M_insert_aux(_b_e_g_i_n() + __n, _s_t_d_:_:_m_o_v_e(__v)); │ │ │ │ +371 else │ │ │ │ +372 _M_realloc_insert(_b_e_g_i_n() + __n, _s_t_d_:_:_m_o_v_e(__v)); │ │ │ │ +373 │ │ │ │ +374 return iterator(this->_M_impl._M_start + __n); │ │ │ │ +375 } │ │ │ │ +376 │ │ │ │ +377 template │ │ │ │ +378 template │ │ │ │ +379 _GLIBCXX20_CONSTEXPR │ │ │ │ +380 auto │ │ │ │ +381 vector<_Tp, _Alloc>:: │ │ │ │ +382 _M_emplace_aux(const_iterator __position, _Args&&... __args) │ │ │ │ +383 -> iterator │ │ │ │ +384 { │ │ │ │ +385 const auto __n = __position - _c_b_e_g_i_n(); │ │ │ │ +386 if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) │ │ │ │ +387 if (__position == _c_e_n_d()) │ │ │ │ +388 { │ │ │ │ +389 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ +390 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ +391 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +392 ++this->_M_impl._M_finish; │ │ │ │ +393 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ +394 } │ │ │ │ +395 else │ │ │ │ +396 { │ │ │ │ +397 // We need to construct a temporary because something in __args... │ │ │ │ +398 // could alias one of the elements of the container and so we │ │ │ │ +399 // need to use it before _M_insert_aux moves elements around. │ │ │ │ +400 _Temporary_value __tmp(this, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +401 _M_insert_aux(_b_e_g_i_n() + __n, _s_t_d_:_:_m_o_v_e(__tmp._M_val())); │ │ │ │ +402 } │ │ │ │ +403 else │ │ │ │ +404 _M_realloc_insert(_b_e_g_i_n() + __n, _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +405 │ │ │ │ +406 return iterator(this->_M_impl._M_start + __n); │ │ │ │ +407 } │ │ │ │ +408 │ │ │ │ +409 template │ │ │ │ +410 template │ │ │ │ +411 _GLIBCXX20_CONSTEXPR │ │ │ │ +412 void │ │ │ │ +413 vector<_Tp, _Alloc>:: │ │ │ │ +414 _M_insert_aux(iterator __position, _Arg&& __arg) │ │ │ │ +415#else │ │ │ │ +416 template │ │ │ │ +417 void │ │ │ │ +418 vector<_Tp, _Alloc>:: │ │ │ │ +419 _M_insert_aux(iterator __position, const _Tp& __x) │ │ │ │ +420#endif │ │ │ │ +421 { │ │ │ │ +422 _GLIBCXX_ASAN_ANNOTATE_GROW(1); │ │ │ │ +423 _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, │ │ │ │ +424 _GLIBCXX_MOVE(*(this->_M_impl._M_finish - 1))); │ │ │ │ +425 ++this->_M_impl._M_finish; │ │ │ │ +426 _GLIBCXX_ASAN_ANNOTATE_GREW(1); │ │ │ │ +427#if __cplusplus < 201103L │ │ │ │ +428 _Tp __x_copy = __x; │ │ │ │ +429#endif │ │ │ │ +430 _GLIBCXX_MOVE_BACKWARD3(__position.base(), │ │ │ │ +431 this->_M_impl._M_finish - 2, │ │ │ │ +432 this->_M_impl._M_finish - 1); │ │ │ │ +433#if __cplusplus < 201103L │ │ │ │ +434 *__position = __x_copy; │ │ │ │ +435#else │ │ │ │ +436 *__position = _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_>(__arg); │ │ │ │ +437#endif │ │ │ │ +438 } │ │ │ │ +439 │ │ │ │ +440#if __cplusplus >= 201103L │ │ │ │ +441 template │ │ │ │ +442 template │ │ │ │ +443 _GLIBCXX20_CONSTEXPR │ │ │ │ +444 void │ │ │ │ +445 vector<_Tp, _Alloc>:: │ │ │ │ +446 _M_realloc_insert(iterator __position, _Args&&... __args) │ │ │ │ +447#else │ │ │ │ +448 template │ │ │ │ +449 void │ │ │ │ +450 vector<_Tp, _Alloc>:: │ │ │ │ +451 _M_realloc_insert(iterator __position, const _Tp& __x) │ │ │ │ +452#endif │ │ │ │ +453 { │ │ │ │ +454 const size_type __len = │ │ │ │ +455 _M_check_len(size_type(1), "vector::_M_realloc_insert"); │ │ │ │ +456 pointer __old_start = this->_M_impl._M_start; │ │ │ │ +457 pointer __old_finish = this->_M_impl._M_finish; │ │ │ │ +458 const size_type __elems_before = __position - _b_e_g_i_n(); │ │ │ │ +459 pointer __new_start(this->_M_allocate(__len)); │ │ │ │ +460 pointer __new_finish(__new_start); │ │ │ │ +461 __try │ │ │ │ +462 { │ │ │ │ +463 // The order of the three operations is dictated by the C++11 │ │ │ │ +464 // case, where the moves could alter a new element belonging │ │ │ │ +465 // to the existing vector. This is an issue only for callers │ │ │ │ +466 // taking the element by lvalue ref (see last bullet of C++11 │ │ │ │ +467 // [res.on.arguments]). │ │ │ │ +468 _Alloc_traits::construct(this->_M_impl, │ │ │ │ +469 __new_start + __elems_before, │ │ │ │ +470#if __cplusplus >= 201103L │ │ │ │ +471 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); │ │ │ │ +472#else │ │ │ │ +473 __x); │ │ │ │ +474#endif │ │ │ │ +475 __new_finish = pointer(); │ │ │ │ +476 │ │ │ │ +477#if __cplusplus >= 201103L │ │ │ │ +478 if _GLIBCXX17_CONSTEXPR (_S_use_relocate()) │ │ │ │ +479 { │ │ │ │ +480 __new_finish = _S_relocate(__old_start, __position.base(), │ │ │ │ +481 __new_start, _M_get_Tp_allocator()); │ │ │ │ +482 │ │ │ │ +483 ++__new_finish; │ │ │ │ +484 │ │ │ │ +485 __new_finish = _S_relocate(__position.base(), __old_finish, │ │ │ │ +486 __new_finish, _M_get_Tp_allocator()); │ │ │ │ +487 } │ │ │ │ +488 else │ │ │ │ +489#endif │ │ │ │ +490 { │ │ │ │ +491 __new_finish │ │ │ │ +492 = _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___i_f___n_o_e_x_c_e_p_t___a │ │ │ │ +493 (__old_start, __position.base(), │ │ │ │ +494 __new_start, _M_get_Tp_allocator()); │ │ │ │ +495 │ │ │ │ +496 ++__new_finish; │ │ │ │ +497 │ │ │ │ +498 __new_finish │ │ │ │ +499 = _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___i_f___n_o_e_x_c_e_p_t___a │ │ │ │ +500 (__position.base(), __old_finish, │ │ │ │ +501 __new_finish, _M_get_Tp_allocator()); │ │ │ │ +502 } │ │ │ │ +503 } │ │ │ │ +504 __catch(...) │ │ │ │ +505 { │ │ │ │ +506 if (!__new_finish) │ │ │ │ +507 _Alloc_traits::destroy(this->_M_impl, │ │ │ │ +508 __new_start + __elems_before); │ │ │ │ +509 else │ │ │ │ +510 _s_t_d_:_:___D_e_s_t_r_o_y(__new_start, __new_finish, _M_get_Tp_allocator()); │ │ │ │ +511 _M_deallocate(__new_start, __len); │ │ │ │ +512 __throw_exception_again; │ │ │ │ +513 } │ │ │ │ +514#if __cplusplus >= 201103L │ │ │ │ +515 if _GLIBCXX17_CONSTEXPR (!_S_use_relocate()) │ │ │ │ +516#endif │ │ │ │ +517 _s_t_d_:_:___D_e_s_t_r_o_y(__old_start, __old_finish, _M_get_Tp_allocator()); │ │ │ │ +518 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +519 _M_deallocate(__old_start, │ │ │ │ +520 this->_M_impl._M_end_of_storage - __old_start); │ │ │ │ +521 this->_M_impl._M_start = __new_start; │ │ │ │ +522 this->_M_impl._M_finish = __new_finish; │ │ │ │ +523 this->_M_impl._M_end_of_storage = __new_start + __len; │ │ │ │ +524 } │ │ │ │ +525 │ │ │ │ +526 template │ │ │ │ +527 _GLIBCXX20_CONSTEXPR │ │ │ │ +528 void │ │ │ │ +529 vector<_Tp, _Alloc>:: │ │ │ │ +530 _M_fill_insert(iterator __position, size_type __n, const value_type& __x) │ │ │ │ +531 { │ │ │ │ +532 if (__n != 0) │ │ │ │ +533 { │ │ │ │ +534 if (size_type(this->_M_impl._M_end_of_storage │ │ │ │ +535 - this->_M_impl._M_finish) >= __n) │ │ │ │ +536 { │ │ │ │ +537#if __cplusplus < 201103L │ │ │ │ +538 value_type __x_copy = __x; │ │ │ │ +539#else │ │ │ │ +540 _Temporary_value __tmp(this, __x); │ │ │ │ +541 value_type& __x_copy = __tmp._M_val(); │ │ │ │ +542#endif │ │ │ │ +543 const size_type __elems_after = _e_n_d() - __position; │ │ │ │ +544 pointer __old_finish(this->_M_impl._M_finish); │ │ │ │ +545 if (__elems_after > __n) │ │ │ │ +546 { │ │ │ │ +547 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ +548 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___a(__old_finish - __n, │ │ │ │ +549 __old_finish, │ │ │ │ +550 __old_finish, │ │ │ │ +551 _M_get_Tp_allocator()); │ │ │ │ +552 this->_M_impl._M_finish += __n; │ │ │ │ +553 _GLIBCXX_ASAN_ANNOTATE_GREW(__n); │ │ │ │ +554 _GLIBCXX_MOVE_BACKWARD3(__position.base(), │ │ │ │ +555 __old_finish - __n, __old_finish); │ │ │ │ +556 std::fill(__position.base(), __position.base() + __n, │ │ │ │ +557 __x_copy); │ │ │ │ +558 } │ │ │ │ +559 else │ │ │ │ +560 { │ │ │ │ +561 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ +562 this->_M_impl._M_finish = │ │ │ │ +563 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___f_i_l_l___n___a(__old_finish, │ │ │ │ +564 __n - __elems_after, │ │ │ │ +565 __x_copy, │ │ │ │ +566 _M_get_Tp_allocator()); │ │ │ │ +567 _GLIBCXX_ASAN_ANNOTATE_GREW(__n - __elems_after); │ │ │ │ +568 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___a(__position.base(), __old_finish, │ │ │ │ +569 this->_M_impl._M_finish, │ │ │ │ +570 _M_get_Tp_allocator()); │ │ │ │ +571 this->_M_impl._M_finish += __elems_after; │ │ │ │ +572 _GLIBCXX_ASAN_ANNOTATE_GREW(__elems_after); │ │ │ │ +573 std::fill(__position.base(), __old_finish, __x_copy); │ │ │ │ +574 } │ │ │ │ +575 } │ │ │ │ +576 else │ │ │ │ +577 { │ │ │ │ +578 // Make local copies of these members because the compiler thinks │ │ │ │ +579 // the allocator can alter them if 'this' is globally reachable. │ │ │ │ +580 pointer __old_start = this->_M_impl._M_start; │ │ │ │ +581 pointer __old_finish = this->_M_impl._M_finish; │ │ │ │ +582 const pointer __pos = __position.base(); │ │ │ │ +583 │ │ │ │ +584 const size_type __len = │ │ │ │ +585 _M_check_len(__n, "vector::_M_fill_insert"); │ │ │ │ +586 const size_type __elems_before = __pos - __old_start; │ │ │ │ +587 pointer __new_start(this->_M_allocate(__len)); │ │ │ │ +588 pointer __new_finish(__new_start); │ │ │ │ +589 __try │ │ │ │ +590 { │ │ │ │ +591 // See _M_realloc_insert above. │ │ │ │ +592 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___f_i_l_l___n___a(__new_start + __elems_before, │ │ │ │ +593 __n, __x, │ │ │ │ +594 _M_get_Tp_allocator()); │ │ │ │ +595 __new_finish = pointer(); │ │ │ │ +596 │ │ │ │ +597 __new_finish │ │ │ │ +598 = _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___i_f___n_o_e_x_c_e_p_t___a │ │ │ │ +599 (__old_start, __pos, __new_start, _M_get_Tp_allocator()); │ │ │ │ +600 │ │ │ │ +601 __new_finish += __n; │ │ │ │ +602 │ │ │ │ +603 __new_finish │ │ │ │ +604 = _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___i_f___n_o_e_x_c_e_p_t___a │ │ │ │ +605 (__pos, __old_finish, __new_finish, _M_get_Tp_allocator()); │ │ │ │ +606 } │ │ │ │ +607 __catch(...) │ │ │ │ +608 { │ │ │ │ +609 if (!__new_finish) │ │ │ │ +610 _s_t_d_:_:___D_e_s_t_r_o_y(__new_start + __elems_before, │ │ │ │ +611 __new_start + __elems_before + __n, │ │ │ │ +612 _M_get_Tp_allocator()); │ │ │ │ +613 else │ │ │ │ +614 _s_t_d_:_:___D_e_s_t_r_o_y(__new_start, __new_finish, │ │ │ │ +615 _M_get_Tp_allocator()); │ │ │ │ +616 _M_deallocate(__new_start, __len); │ │ │ │ +617 __throw_exception_again; │ │ │ │ +618 } │ │ │ │ +619 _s_t_d_:_:___D_e_s_t_r_o_y(__old_start, __old_finish, _M_get_Tp_allocator()); │ │ │ │ +620 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +621 _M_deallocate(__old_start, │ │ │ │ +622 this->_M_impl._M_end_of_storage - __old_start); │ │ │ │ +623 this->_M_impl._M_start = __new_start; │ │ │ │ +624 this->_M_impl._M_finish = __new_finish; │ │ │ │ +625 this->_M_impl._M_end_of_storage = __new_start + __len; │ │ │ │ +626 } │ │ │ │ +627 } │ │ │ │ +628 } │ │ │ │ +629 │ │ │ │ +630#if __cplusplus >= 201103L │ │ │ │ +631 template │ │ │ │ +632 _GLIBCXX20_CONSTEXPR │ │ │ │ +633 void │ │ │ │ +634 vector<_Tp, _Alloc>:: │ │ │ │ +635 _M_default_append(size_type __n) │ │ │ │ +636 { │ │ │ │ +637 if (__n != 0) │ │ │ │ +638 { │ │ │ │ +639 const size_type __size = _s_i_z_e(); │ │ │ │ +640 size_type __navail = size_type(this->_M_impl._M_end_of_storage │ │ │ │ +641 - this->_M_impl._M_finish); │ │ │ │ +642 │ │ │ │ +643 if (__size > max_size() || __navail > max_size() - __size) │ │ │ │ +644 __builtin_unreachable(); │ │ │ │ +645 │ │ │ │ +646 if (__navail >= __n) │ │ │ │ +647 { │ │ │ │ +648 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ +649 this->_M_impl._M_finish = │ │ │ │ +650 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___d_e_f_a_u_l_t___n___a(this->_M_impl._M_finish, │ │ │ │ +651 __n, _M_get_Tp_allocator()); │ │ │ │ +652 _GLIBCXX_ASAN_ANNOTATE_GREW(__n); │ │ │ │ +653 } │ │ │ │ +654 else │ │ │ │ +655 { │ │ │ │ +656 // Make local copies of these members because the compiler thinks │ │ │ │ +657 // the allocator can alter them if 'this' is globally reachable. │ │ │ │ +658 pointer __old_start = this->_M_impl._M_start; │ │ │ │ +659 pointer __old_finish = this->_M_impl._M_finish; │ │ │ │ +660 │ │ │ │ +661 const size_type __len = │ │ │ │ +662 _M_check_len(__n, "vector::_M_default_append"); │ │ │ │ +663 pointer __new_start(this->_M_allocate(__len)); │ │ │ │ +664 if _GLIBCXX17_CONSTEXPR (_S_use_relocate()) │ │ │ │ +665 { │ │ │ │ +666 __try │ │ │ │ +667 { │ │ │ │ +668 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___d_e_f_a_u_l_t___n___a(__new_start + __size, │ │ │ │ +669 __n, _M_get_Tp_allocator()); │ │ │ │ +670 } │ │ │ │ +671 __catch(...) │ │ │ │ +672 { │ │ │ │ +673 _M_deallocate(__new_start, __len); │ │ │ │ +674 __throw_exception_again; │ │ │ │ +675 } │ │ │ │ +676 _S_relocate(__old_start, __old_finish, │ │ │ │ +677 __new_start, _M_get_Tp_allocator()); │ │ │ │ +678 } │ │ │ │ +679 else │ │ │ │ +680 { │ │ │ │ +681 pointer __destroy_from = pointer(); │ │ │ │ +682 __try │ │ │ │ +683 { │ │ │ │ +684 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___d_e_f_a_u_l_t___n___a(__new_start + __size, │ │ │ │ +685 __n, _M_get_Tp_allocator()); │ │ │ │ +686 __destroy_from = __new_start + __size; │ │ │ │ +687 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___i_f___n_o_e_x_c_e_p_t___a( │ │ │ │ +688 __old_start, __old_finish, │ │ │ │ +689 __new_start, _M_get_Tp_allocator()); │ │ │ │ +690 } │ │ │ │ +691 __catch(...) │ │ │ │ +692 { │ │ │ │ +693 if (__destroy_from) │ │ │ │ +694 _s_t_d_:_:___D_e_s_t_r_o_y(__destroy_from, __destroy_from + __n, │ │ │ │ +695 _M_get_Tp_allocator()); │ │ │ │ +696 _M_deallocate(__new_start, __len); │ │ │ │ +697 __throw_exception_again; │ │ │ │ +698 } │ │ │ │ +699 _s_t_d_:_:___D_e_s_t_r_o_y(__old_start, __old_finish, │ │ │ │ +700 _M_get_Tp_allocator()); │ │ │ │ +701 } │ │ │ │ +702 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +703 _M_deallocate(__old_start, │ │ │ │ +704 this->_M_impl._M_end_of_storage - __old_start); │ │ │ │ +705 this->_M_impl._M_start = __new_start; │ │ │ │ +706 this->_M_impl._M_finish = __new_start + __size + __n; │ │ │ │ +707 this->_M_impl._M_end_of_storage = __new_start + __len; │ │ │ │ +708 } │ │ │ │ +709 } │ │ │ │ +710 } │ │ │ │ +711 │ │ │ │ +712 template │ │ │ │ +713 _GLIBCXX20_CONSTEXPR │ │ │ │ +714 bool │ │ │ │ +715 vector<_Tp, _Alloc>:: │ │ │ │ +716 _M_shrink_to_fit() │ │ │ │ +717 { │ │ │ │ +718 if (capacity() == _s_i_z_e()) │ │ │ │ +719 return false; │ │ │ │ +720 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +721 return _s_t_d_:_:_____s_h_r_i_n_k___t_o___f_i_t___a_u_x_<_v_e_c_t_o_r_>_:_:___S___d_o___i_t(*this); │ │ │ │ +722 } │ │ │ │ +723#endif │ │ │ │ +724 │ │ │ │ +725 template │ │ │ │ +726 template │ │ │ │ +727 _GLIBCXX20_CONSTEXPR │ │ │ │ +728 void │ │ │ │ +729 vector<_Tp, _Alloc>:: │ │ │ │ +730 _M_range_insert(iterator __pos, _InputIterator __first, │ │ │ │ +731 _InputIterator __last, _s_t_d_:_:_i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g) │ │ │ │ +732 { │ │ │ │ +733 if (__pos == _e_n_d()) │ │ │ │ +734 { │ │ │ │ +735 for (; __first != __last; ++__first) │ │ │ │ +736 insert(_e_n_d(), *__first); │ │ │ │ +737 } │ │ │ │ +738 else if (__first != __last) │ │ │ │ +739 { │ │ │ │ +740 vector __tmp(__first, __last, _M_get_Tp_allocator()); │ │ │ │ +741 insert(__pos, │ │ │ │ +742 _GLIBCXX_MAKE_MOVE_ITERATOR(__tmp.begin()), │ │ │ │ +743 _GLIBCXX_MAKE_MOVE_ITERATOR(__tmp.end())); │ │ │ │ +744 } │ │ │ │ +745 } │ │ │ │ +746 │ │ │ │ +747 template │ │ │ │ +748 template │ │ │ │ +749 _GLIBCXX20_CONSTEXPR │ │ │ │ +750 void │ │ │ │ +751 vector<_Tp, _Alloc>:: │ │ │ │ +752 _M_range_insert(iterator __position, _ForwardIterator __first, │ │ │ │ +753 _ForwardIterator __last, _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g) │ │ │ │ +754 { │ │ │ │ +755 if (__first != __last) │ │ │ │ +756 { │ │ │ │ +757 const size_type __n = _s_t_d_:_:_d_i_s_t_a_n_c_e(__first, __last); │ │ │ │ +758 if (size_type(this->_M_impl._M_end_of_storage │ │ │ │ +759 - this->_M_impl._M_finish) >= __n) │ │ │ │ +760 { │ │ │ │ +761 const size_type __elems_after = _e_n_d() - __position; │ │ │ │ +762 pointer __old_finish(this->_M_impl._M_finish); │ │ │ │ +763 if (__elems_after > __n) │ │ │ │ +764 { │ │ │ │ +765 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ +766 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___a(this->_M_impl._M_finish - __n, │ │ │ │ +767 this->_M_impl._M_finish, │ │ │ │ +768 this->_M_impl._M_finish, │ │ │ │ +769 _M_get_Tp_allocator()); │ │ │ │ +770 this->_M_impl._M_finish += __n; │ │ │ │ +771 _GLIBCXX_ASAN_ANNOTATE_GREW(__n); │ │ │ │ +772 _GLIBCXX_MOVE_BACKWARD3(__position.base(), │ │ │ │ +773 __old_finish - __n, __old_finish); │ │ │ │ +774 std::copy(__first, __last, __position); │ │ │ │ +775 } │ │ │ │ +776 else │ │ │ │ +777 { │ │ │ │ +778 _ForwardIterator __mid = __first; │ │ │ │ +779 _s_t_d_:_:_a_d_v_a_n_c_e(__mid, __elems_after); │ │ │ │ +780 _GLIBCXX_ASAN_ANNOTATE_GROW(__n); │ │ │ │ +781 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_p_y___a(__mid, __last, │ │ │ │ +782 this->_M_impl._M_finish, │ │ │ │ +783 _M_get_Tp_allocator()); │ │ │ │ +784 this->_M_impl._M_finish += __n - __elems_after; │ │ │ │ +785 _GLIBCXX_ASAN_ANNOTATE_GREW(__n - __elems_after); │ │ │ │ +786 _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___a(__position.base(), │ │ │ │ +787 __old_finish, │ │ │ │ +788 this->_M_impl._M_finish, │ │ │ │ +789 _M_get_Tp_allocator()); │ │ │ │ +790 this->_M_impl._M_finish += __elems_after; │ │ │ │ +791 _GLIBCXX_ASAN_ANNOTATE_GREW(__elems_after); │ │ │ │ +792 std::copy(__first, __mid, __position); │ │ │ │ +793 } │ │ │ │ +794 } │ │ │ │ +795 else │ │ │ │ +796 { │ │ │ │ +797 // Make local copies of these members because the compiler │ │ │ │ +798 // thinks the allocator can alter them if 'this' is globally │ │ │ │ +799 // reachable. │ │ │ │ +800 pointer __old_start = this->_M_impl._M_start; │ │ │ │ +801 pointer __old_finish = this->_M_impl._M_finish; │ │ │ │ +802 if ((__old_finish - __old_start) < 0) │ │ │ │ +803 __builtin_unreachable(); │ │ │ │ +804 │ │ │ │ +805 const size_type __len = │ │ │ │ +806 _M_check_len(__n, "vector::_M_range_insert"); │ │ │ │ +807 pointer __new_start(this->_M_allocate(__len)); │ │ │ │ +808 pointer __new_finish(__new_start); │ │ │ │ +809 __try │ │ │ │ +810 { │ │ │ │ +811 __new_finish │ │ │ │ +812 = _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___i_f___n_o_e_x_c_e_p_t___a │ │ │ │ +813 (__old_start, __position.base(), │ │ │ │ +814 __new_start, _M_get_Tp_allocator()); │ │ │ │ +815 __new_finish │ │ │ │ +816 = _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___c_o_p_y___a(__first, __last, │ │ │ │ +817 __new_finish, │ │ │ │ +818 _M_get_Tp_allocator()); │ │ │ │ +819 __new_finish │ │ │ │ +820 = _s_t_d_:_:_____u_n_i_n_i_t_i_a_l_i_z_e_d___m_o_v_e___i_f___n_o_e_x_c_e_p_t___a │ │ │ │ +821 (__position.base(), __old_finish, │ │ │ │ +822 __new_finish, _M_get_Tp_allocator()); │ │ │ │ +823 } │ │ │ │ +824 __catch(...) │ │ │ │ +825 { │ │ │ │ +826 _s_t_d_:_:___D_e_s_t_r_o_y(__new_start, __new_finish, │ │ │ │ +827 _M_get_Tp_allocator()); │ │ │ │ +828 _M_deallocate(__new_start, __len); │ │ │ │ +829 __throw_exception_again; │ │ │ │ +830 } │ │ │ │ +831 _s_t_d_:_:___D_e_s_t_r_o_y(__old_start, __old_finish, │ │ │ │ +832 _M_get_Tp_allocator()); │ │ │ │ +833 _GLIBCXX_ASAN_ANNOTATE_REINIT; │ │ │ │ +834 _M_deallocate(__old_start, │ │ │ │ +835 this->_M_impl._M_end_of_storage - __old_start); │ │ │ │ +836 this->_M_impl._M_start = __new_start; │ │ │ │ +837 this->_M_impl._M_finish = __new_finish; │ │ │ │ +838 this->_M_impl._M_end_of_storage = __new_start + __len; │ │ │ │ +839 } │ │ │ │ +840 } │ │ │ │ +841 } │ │ │ │ +842 │ │ │ │ +843 │ │ │ │ +844 // vector │ │ │ │ +845 template │ │ │ │ +846 _GLIBCXX20_CONSTEXPR │ │ │ │ +847 void │ │ │ │ +848 vector:: │ │ │ │ +849 _M_reallocate(size_type __n) │ │ │ │ +850 { │ │ │ │ +851 const iterator __begin = _b_e_g_i_n(), __end = _e_n_d(); │ │ │ │ +852 if (size_type(__end - __begin) > __n) │ │ │ │ +853 __builtin_unreachable(); │ │ │ │ +854 _Bit_pointer __q = this->_M_allocate(__n); │ │ │ │ +855 iterator __start(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(*__q), 0); │ │ │ │ +856 iterator __finish(_M_copy_aligned(__begin, __end, __start)); │ │ │ │ +857 this->_M_deallocate(); │ │ │ │ +858 this->_M_impl._M_start = __start; │ │ │ │ +859 this->_M_impl._M_finish = __finish; │ │ │ │ +860 this->_M_impl._M_end_of_storage = __q + _S_nword(__n); │ │ │ │ +861 } │ │ │ │ +862 │ │ │ │ +863 template │ │ │ │ +864 _GLIBCXX20_CONSTEXPR │ │ │ │ +865 void │ │ │ │ +866 vector:: │ │ │ │ +867 _M_fill_insert(iterator __position, size_type __n, bool __x) │ │ │ │ +868 { │ │ │ │ +869 if (__n == 0) │ │ │ │ +870 return; │ │ │ │ +871 if (capacity() - _s_i_z_e() >= __n) │ │ │ │ +872 { │ │ │ │ +873 std::copy_backward(__position, _e_n_d(), │ │ │ │ +874 this->_M_impl._M_finish + difference_type(__n)); │ │ │ │ +875 std::fill(__position, __position + difference_type(__n), __x); │ │ │ │ +876 this->_M_impl._M_finish += difference_type(__n); │ │ │ │ +877 } │ │ │ │ +878 else │ │ │ │ +879 { │ │ │ │ +880 const size_type __len = │ │ │ │ +881 _M_check_len(__n, "vector::_M_fill_insert"); │ │ │ │ +882 iterator __begin = _b_e_g_i_n(), __end = _e_n_d(); │ │ │ │ +883 _Bit_pointer __q = this->_M_allocate(__len); │ │ │ │ +884 iterator __start(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(*__q), 0); │ │ │ │ +885 iterator __i = _M_copy_aligned(__begin, __position, __start); │ │ │ │ +886 std::fill(__i, __i + difference_type(__n), __x); │ │ │ │ +887 iterator __finish = std::copy(__position, __end, │ │ │ │ +888 __i + difference_type(__n)); │ │ │ │ +889 this->_M_deallocate(); │ │ │ │ +890 this->_M_impl._M_end_of_storage = __q + _S_nword(__len); │ │ │ │ +891 this->_M_impl._M_start = __start; │ │ │ │ +892 this->_M_impl._M_finish = __finish; │ │ │ │ +893 } │ │ │ │ +894 } │ │ │ │ +895 │ │ │ │ +896 template │ │ │ │ +897 template │ │ │ │ +898 _GLIBCXX20_CONSTEXPR │ │ │ │ +899 void │ │ │ │ +900 vector:: │ │ │ │ +901 _M_insert_range(iterator __position, _ForwardIterator __first, │ │ │ │ +902 _ForwardIterator __last, _s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g) │ │ │ │ +903 { │ │ │ │ +904 if (__first != __last) │ │ │ │ +905 { │ │ │ │ +906 size_type __n = _s_t_d_:_:_d_i_s_t_a_n_c_e(__first, __last); │ │ │ │ +907 if (capacity() - _s_i_z_e() >= __n) │ │ │ │ +908 { │ │ │ │ +909 std::copy_backward(__position, _e_n_d(), │ │ │ │ +910 this->_M_impl._M_finish │ │ │ │ +911 + difference_type(__n)); │ │ │ │ +912 std::copy(__first, __last, __position); │ │ │ │ +913 this->_M_impl._M_finish += difference_type(__n); │ │ │ │ +914 } │ │ │ │ +915 else │ │ │ │ +916 { │ │ │ │ +917 const size_type __len = │ │ │ │ +918 _M_check_len(__n, "vector::_M_insert_range"); │ │ │ │ +919 const iterator __begin = _b_e_g_i_n(), __end = _e_n_d(); │ │ │ │ +920 _Bit_pointer __q = this->_M_allocate(__len); │ │ │ │ +921 iterator __start(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(*__q), 0); │ │ │ │ +922 iterator __i = _M_copy_aligned(__begin, __position, __start); │ │ │ │ +923 __i = std::copy(__first, __last, __i); │ │ │ │ +924 iterator __finish = std::copy(__position, __end, __i); │ │ │ │ +925 this->_M_deallocate(); │ │ │ │ +926 this->_M_impl._M_end_of_storage = __q + _S_nword(__len); │ │ │ │ +927 this->_M_impl._M_start = __start; │ │ │ │ +928 this->_M_impl._M_finish = __finish; │ │ │ │ +929 } │ │ │ │ +930 } │ │ │ │ +931 } │ │ │ │ +932 │ │ │ │ +933 template │ │ │ │ +934 _GLIBCXX20_CONSTEXPR │ │ │ │ +935 void │ │ │ │ +936 vector:: │ │ │ │ +937 _M_insert_aux(iterator __position, bool __x) │ │ │ │ +938 { │ │ │ │ +939 if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_addr()) │ │ │ │ +940 { │ │ │ │ +941 std::copy_backward(__position, this->_M_impl._M_finish, │ │ │ │ +942 this->_M_impl._M_finish + 1); │ │ │ │ +943 *__position = __x; │ │ │ │ +944 ++this->_M_impl._M_finish; │ │ │ │ +945 } │ │ │ │ +946 else │ │ │ │ +947 { │ │ │ │ +948 const size_type __len = │ │ │ │ +949 _M_check_len(size_type(1), "vector::_M_insert_aux"); │ │ │ │ +950 _Bit_pointer __q = this->_M_allocate(__len); │ │ │ │ +951 iterator __start(_s_t_d_:_:_____a_d_d_r_e_s_s_o_f(*__q), 0); │ │ │ │ +952 iterator __i = _M_copy_aligned(_b_e_g_i_n(), __position, __start); │ │ │ │ +953 *__i++ = __x; │ │ │ │ +954 iterator __finish = std::copy(__position, _e_n_d(), __i); │ │ │ │ +955 this->_M_deallocate(); │ │ │ │ +956 this->_M_impl._M_end_of_storage = __q + _S_nword(__len); │ │ │ │ +957 this->_M_impl._M_start = __start; │ │ │ │ +958 this->_M_impl._M_finish = __finish; │ │ │ │ +959 } │ │ │ │ +960 } │ │ │ │ +961 │ │ │ │ +962 template │ │ │ │ +963 _GLIBCXX20_CONSTEXPR │ │ │ │ +964 typename vector::iterator │ │ │ │ +965 vector:: │ │ │ │ +966 _M_erase(iterator __position) │ │ │ │ +967 { │ │ │ │ +968 if (__position + 1 != _e_n_d()) │ │ │ │ +969 std::copy(__position + 1, _e_n_d(), __position); │ │ │ │ +970 --this->_M_impl._M_finish; │ │ │ │ +971 return __position; │ │ │ │ +972 } │ │ │ │ +973 │ │ │ │ +974 template │ │ │ │ +975 _GLIBCXX20_CONSTEXPR │ │ │ │ +976 typename vector::iterator │ │ │ │ +977 vector:: │ │ │ │ +978 _M_erase(iterator __first, iterator __last) │ │ │ │ +979 { │ │ │ │ +980 if (__first != __last) │ │ │ │ +981 _M_erase_at_end(std::copy(__last, _e_n_d(), __first)); │ │ │ │ +982 return __first; │ │ │ │ +983 } │ │ │ │ +984 │ │ │ │ +985#if __cplusplus >= 201103L │ │ │ │ +986 template │ │ │ │ +987 _GLIBCXX20_CONSTEXPR │ │ │ │ +988 bool │ │ │ │ +989 vector:: │ │ │ │ +990 _M_shrink_to_fit() │ │ │ │ +991 { │ │ │ │ +992 if (capacity() - _s_i_z_e() < int(_S_word_bit)) │ │ │ │ +993 return false; │ │ │ │ +994 __try │ │ │ │ +995 { │ │ │ │ +996 if (size_type __n = _s_i_z_e()) │ │ │ │ +997 _M_reallocate(__n); │ │ │ │ +998 else │ │ │ │ +999 { │ │ │ │ +1000 this->_M_deallocate(); │ │ │ │ +1001 this->_M_impl._M_reset(); │ │ │ │ +1002 } │ │ │ │ +1003 return true; │ │ │ │ +1004 } │ │ │ │ +1005 __catch(...) │ │ │ │ +1006 { return false; } │ │ │ │ +1007 } │ │ │ │ +1008#endif │ │ │ │ +1009 │ │ │ │ +1010_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ +1011_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +1012} // namespace std │ │ │ │ +1013 │ │ │ │ +1014#if __cplusplus >= 201103L │ │ │ │ +1015 │ │ │ │ +1016namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +1017{ │ │ │ │ +1018_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +1019 │ │ │ │ +1020 template │ │ │ │ +1021 size_t │ │ │ │ +1022 hash<_GLIBCXX_STD_C::vector>:: │ │ │ │ +1023 operator()(const _GLIBCXX_STD_C::vector& __b) const noexcept │ │ │ │ +1024 { │ │ │ │ +1025 size_t __hash = 0; │ │ │ │ +1026 const size_t __words = __b.size() / _S_word_bit; │ │ │ │ +1027 if (__words) │ │ │ │ +1028 { │ │ │ │ +1029 const size_t __clength = __words * sizeof(_Bit_type); │ │ │ │ +1030 __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength); │ │ │ │ +1031 } │ │ │ │ +1032 │ │ │ │ +1033 const size_t __extrabits = __b.size() % _S_word_bit; │ │ │ │ +1034 if (__extrabits) │ │ │ │ +1035 { │ │ │ │ +1036 _Bit_type __hiword = *__b._M_impl._M_finish._M_p; │ │ │ │ +1037 __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits); │ │ │ │ +1038 │ │ │ │ +1039 const size_t __clength │ │ │ │ +1040 = (__extrabits + __CHAR_BIT__ - 1) / __CHAR_BIT__; │ │ │ │ +1041 if (__words) │ │ │ │ +1042 __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash); │ │ │ │ +1043 else │ │ │ │ +1044 __hash = std::_Hash_impl::hash(&__hiword, __clength); │ │ │ │ +1045 } │ │ │ │ +1046 │ │ │ │ +1047 return __hash; │ │ │ │ +1048 } │ │ │ │ +1049 │ │ │ │ +1050_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +1051} // namespace std │ │ │ │ +1052 │ │ │ │ +1053#endif // C++11 │ │ │ │ +1054 │ │ │ │ +1055#undef _GLIBCXX_ASAN_ANNOTATE_REINIT │ │ │ │ +1056#undef _GLIBCXX_ASAN_ANNOTATE_GROW │ │ │ │ +1057#undef _GLIBCXX_ASAN_ANNOTATE_GREW │ │ │ │ +1058#undef _GLIBCXX_ASAN_ANNOTATE_SHRINK │ │ │ │ +1059 │ │ │ │ +1060#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_:_9_7 │ │ │ │ _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_:_5_1 │ │ │ │ +_s_t_d_:_:_e_n_d │ │ │ │ +_Tp * end(valarray< _Tp > &__va) noexcept │ │ │ │ +Return an iterator pointing to one past the last element of the valarray. │ │ │ │ +DDeeffiinniittiioonn _v_a_l_a_r_r_a_y_:_1_2_4_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_2_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_9 │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_g_e_t___t_e_m_p_o_r_a_r_y___b_u_f_f_e_r │ │ │ │ -pair< _Tp *, ptrdiff_t > get_temporary_buffer(ptrdiff_t __len) noexcept │ │ │ │ -Allocates a temporary buffer. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___t_e_m_p_b_u_f_._h_:_1_0_4 │ │ │ │ -_s_t_d_:_:_r_e_t_u_r_n___t_e_m_p_o_r_a_r_y___b_u_f_f_e_r │ │ │ │ -void return_temporary_buffer(_Tp *__p) │ │ │ │ -The companion to get_temporary_buffer(). │ │ │ │ -DDeeffiinniittiioonn _s_t_l___t_e_m_p_b_u_f_._h_:_1_3_1 │ │ │ │ -_s_t_d_:_:___C_o_n_s_t_r_u_c_t │ │ │ │ -constexpr void _Construct(_Tp *__p, _Args &&... __args) │ │ │ │ -DDeeffiinniittiioonn _s_t_l___c_o_n_s_t_r_u_c_t_._h_:_1_0_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_4_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_8 │ │ │ │ +_s_t_d_:_:_s_i_z_e │ │ │ │ +constexpr auto size(const _Container &__cont) noexcept(noexcept(__cont.size())) │ │ │ │ +-> decltype(__cont.size()) │ │ │ │ +Return the size of a container. │ │ │ │ +DDeeffiinniittiioonn _r_a_n_g_e___a_c_c_e_s_s_._h_:_2_6_4 │ │ │ │ +_s_t_d_:_:_a_d_v_a_n_c_e │ │ │ │ +constexpr void advance(_InputIterator &__i, _Distance __n) │ │ │ │ +A generalization of pointer arithmetic. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___f_u_n_c_s_._h_:_2_2_0 │ │ │ │ +_s_t_d_:_:_c_b_e_g_i_n │ │ │ │ +constexpr auto cbegin(const _Container &__cont) noexcept(noexcept(std::begin │ │ │ │ +(__cont))) -> decltype(std::begin(__cont)) │ │ │ │ +Return an iterator pointing to the first element of the const container. │ │ │ │ +DDeeffiinniittiioonn _r_a_n_g_e___a_c_c_e_s_s_._h_:_1_2_6 │ │ │ │ _s_t_d_:_:___D_e_s_t_r_o_y │ │ │ │ constexpr void _Destroy(_ForwardIterator __first, _ForwardIterator __last) │ │ │ │ DDeeffiinniittiioonn _s_t_l___c_o_n_s_t_r_u_c_t_._h_:_1_8_2 │ │ │ │ -_s_t_d_:_:_i_t_e_r_a_t_o_r___t_r_a_i_t_s │ │ │ │ -Traits class for iterators. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_1_7_8 │ │ │ │ +_s_t_d_:_:_i_n_p_u_t___i_t_e_r_a_t_o_r___t_a_g │ │ │ │ +Marking input iterators. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_9_3 │ │ │ │ +_s_t_d_:_:_f_o_r_w_a_r_d___i_t_e_r_a_t_o_r___t_a_g │ │ │ │ +Forward iterators support a superset of input iterator operations. │ │ │ │ +DDeeffiinniittiioonn _s_t_l___i_t_e_r_a_t_o_r___b_a_s_e___t_y_p_e_s_._h_:_9_9 │ │ │ │ _s_t_d_:_:_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_:_:___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r │ │ │ │ -DDeeffiinniittiioonn _s_t_l___t_e_m_p_b_u_f_._h_:_1_4_1 │ │ │ │ -_s_t_d_:_:___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r_:_:_e_n_d │ │ │ │ -iterator end() │ │ │ │ -As per Table mumble. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___t_e_m_p_b_u_f_._h_:_1_7_4 │ │ │ │ -_s_t_d_:_:___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r_:_:_r_e_q_u_e_s_t_e_d___s_i_z_e │ │ │ │ -size_type requested_size() const │ │ │ │ -Returns the size requested by the constructor; may be >size(). │ │ │ │ -DDeeffiinniittiioonn _s_t_l___t_e_m_p_b_u_f_._h_:_1_6_4 │ │ │ │ -_s_t_d_:_:___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r_:_:_s_i_z_e │ │ │ │ -size_type size() const │ │ │ │ -As per Table mumble. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___t_e_m_p_b_u_f_._h_:_1_5_9 │ │ │ │ -_s_t_d_:_:___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r_:_:_b_e_g_i_n │ │ │ │ -iterator begin() │ │ │ │ -As per Table mumble. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___t_e_m_p_b_u_f_._h_:_1_6_9 │ │ │ │ -_s_t_d_:_:___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r_:_:___T_e_m_p_o_r_a_r_y___b_u_f_f_e_r │ │ │ │ -_Temporary_buffer(_ForwardIterator __seed, size_type __original_len) │ │ │ │ -DDeeffiinniittiioonn _s_t_l___t_e_m_p_b_u_f_._h_:_2_6_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_:_4_2_9 │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ +constexpr vector & operator=(const vector &__x) │ │ │ │ +Vector assignment operator. │ │ │ │ +_s_t_d_:_:_v_e_c_t_o_r_:_:_r_e_s_e_r_v_e │ │ │ │ +constexpr void reserve(size_type __n) │ │ │ │ +Attempt to preallocate enough memory for specified number of elements. │ │ │ │ +DDeeffiinniittiioonn _v_e_c_t_o_r_._t_c_c_:_6_8 │ │ │ │ _s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ -_n_u_m_e_r_i_c___t_r_a_i_t_s_._h │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_l___t_e_m_p_b_u_f_._h │ │ │ │ + * _v_e_c_t_o_r_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00395.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stl_stack.h File Reference │ │ │ +libstdc++: atomic_wait.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,73 +46,110 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00395.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Functions
│ │ │ -
stl_stack.h File Reference
│ │ │ +Macros | │ │ │ +Typedefs | │ │ │ +Functions | │ │ │ +Variables
│ │ │ +
atomic_wait.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Classes

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

│ │ │ Namespaces

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

│ │ │ +Macros

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

│ │ │ +Typedefs

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

│ │ │ Functions

template<typename _Tp , typename _Seq >
bool std::operator!= (const stack< _Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator< (const stack< _Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator<= (const stack< _Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator== (const stack< _Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator> (const stack< _Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
 
template<typename _Tp , typename _Seq >
bool std::operator>= (const stack< _Tp, _Seq > &__x, const stack< _Tp, _Seq > &__y)
 
│ │ │ -template<typename _Container , typename = _RequireNotAllocator<_Container>>
 std::stack (_Container) -> stack< typename _Container::value_type, _Container >
 
│ │ │ -template<typename _Container , typename _Allocator , typename = _RequireNotAllocator<_Container>>
 std::stack (_Container, _Allocator) -> stack< typename _Container::value_type, _Container >
 
template<typename _Tp , typename _Seq >
enable_if< __is_swappable< _Seq >::value >::type std::swap (stack< _Tp, _Seq > &__x, stack< _Tp, _Seq > &__y) noexcept(noexcept(__x.swap(__y)))
 
template<typename _Tp >
bool std::__detail::__atomic_compare (const _Tp &__a, const _Tp &__b)
 
template<typename _Tp >
void std::__atomic_notify_address (const _Tp *__addr, bool __all) noexcept
 
void std::__atomic_notify_address_bare (const __detail::__platform_wait_t *__addr, bool __all) noexcept
 
template<typename _Pred , typename _Spin = __default_spin_policy>
bool std::__detail::__atomic_spin (_Pred &__pred, _Spin __spin=_Spin{ }) noexcept
 
template<typename _Tp , typename _Pred >
void std::__atomic_wait_address (const _Tp *__addr, _Pred __pred) noexcept
 
template<typename _Pred >
void std::__atomic_wait_address_bare (const __detail::__platform_wait_t *__addr, _Pred __pred) noexcept
 
template<typename _Tp , typename _ValFn >
void std::__atomic_wait_address_v (const _Tp *__addr, _Tp __old, _ValFn __vfn) noexcept
 
void std::__detail::__thread_relax () noexcept
 
void std::__detail::__thread_yield () noexcept
 
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ +Variables

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

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file stl_stack.h.

│ │ │ -
│ │ │ +

Definition in file atomic_wait.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ __cpp_lib_atomic_wait

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

Definition at line 52 of file atomic_wait.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,58 +1,69 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -stl_stack.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s | _T_y_p_e_d_e_f_s | _F_u_n_c_t_i_o_n_s | _V_a_r_i_a_b_l_e_s │ │ │ │ +atomic_wait.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -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 │ │ │ │   │ │ │ │ +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 │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____b_a_r_e___w_a_i_t = __waiter< _s_t_d_:_:_f_a_l_s_e___t_y_p_e > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____e_n_t_e_r_s___w_a_i_t = __waiter< _s_t_d_:_:_t_r_u_e___t_y_p_e > │ │ │ │ +  │ │ │ │ +_u_s_i_n_g  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____p_l_a_t_f_o_r_m___w_a_i_t___t = unsigned int │ │ │ │ +  │ │ │ │ FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_t_a_c_k< _Tp, ___S_e_q │ │ │ │ - > &__x, const _s_t_a_c_k< _Tp, ___S_e_q > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _s_t_a_c_k< _Tp, ___S_e_q > │ │ │ │ - &__x, const _s_t_a_c_k< _Tp, ___S_e_q > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _s_t_a_c_k< _Tp, ___S_e_q │ │ │ │ - > &__x, const _s_t_a_c_k< _Tp, ___S_e_q > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _s_t_a_c_k< _Tp, ___S_e_q │ │ │ │ - > &__x, const _s_t_a_c_k< _Tp, ___S_e_q > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _s_t_a_c_k< _Tp, ___S_e_q > │ │ │ │ - &__x, const _s_t_a_c_k< _Tp, ___S_e_q > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _s_t_a_c_k< _Tp, ___S_e_q │ │ │ │ - > &__x, const _s_t_a_c_k< _Tp, ___S_e_q > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Container , _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Container>> │ │ │ │ -   ssttdd::::ssttaacckk (_Container) -> _s_t_a_c_k< │ │ │ │ - _t_y_p_e_n_a_m_e _Container::value_type, │ │ │ │ - _Container > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Container , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocator<_Container>> │ │ │ │ -   ssttdd::::ssttaacckk (_Container, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _s_t_a_c_k< _t_y_p_e_n_a_m_e _Container:: │ │ │ │ - value_type, _Container > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ -_e_n_a_b_l_e___i_f< _____i_s___s_w_a_p_p_a_b_l_e< ___S_e_q >:: _s_t_d_:_:_s_w_a_p (_s_t_a_c_k< _Tp, ___S_e_q > &__x, │ │ │ │ - value >::type  _s_t_a_c_k< _Tp, ___S_e_q > &__y) noexcept │ │ │ │ - (noexcept(__x.swap(__y))) │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ +bool  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____a_t_o_m_i_c___c_o_m_p_a_r_e (const _Tp &__a, const _Tp &__b) │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____a_t_o_m_i_c___n_o_t_i_f_y___a_d_d_r_e_s_s (const _Tp *_____a_d_d_r, bool _____a_l_l) noexcept │ │ │ │ +  │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____a_t_o_m_i_c___n_o_t_i_f_y___a_d_d_r_e_s_s___b_a_r_e (const _____d_e_t_a_i_l_:_:_____p_l_a_t_f_o_r_m___w_a_i_t___t │ │ │ │ + *_____a_d_d_r, bool _____a_l_l) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___P_r_e_d , _t_y_p_e_n_a_m_e ___S_p_i_n = __default_spin_policy> │ │ │ │ +bool  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____a_t_o_m_i_c___s_p_i_n (___P_r_e_d &_____p_r_e_d, ___S_p_i_n _____s_p_i_n=___S_p_i_n{ }) │ │ │ │ + noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___P_r_e_d > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____a_t_o_m_i_c___w_a_i_t___a_d_d_r_e_s_s (const _Tp *_____a_d_d_r, ___P_r_e_d _____p_r_e_d) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e ___P_r_e_d > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____a_t_o_m_i_c___w_a_i_t___a_d_d_r_e_s_s___b_a_r_e (const _____d_e_t_a_i_l_:_:_____p_l_a_t_f_o_r_m___w_a_i_t___t │ │ │ │ + *_____a_d_d_r, ___P_r_e_d _____p_r_e_d) noexcept │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___V_a_l_F_n > │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____a_t_o_m_i_c___w_a_i_t___a_d_d_r_e_s_s___v (const _Tp *_____a_d_d_r, _Tp _____o_l_d, ___V_a_l_F_n _____v_f_n) │ │ │ │ + noexcept │ │ │ │ +  │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____t_h_r_e_a_d___r_e_l_a_x () noexcept │ │ │ │ +  │ │ │ │ +_v_o_i_d  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____t_h_r_e_a_d___y_i_e_l_d () noexcept │ │ │ │ +  │ │ │ │ +VVaarriiaabblleess │ │ │ │ + constexpr _a_u_t_o  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____a_t_o_m_i_c___s_p_i_n___c_o_u_n_t │ │ │ │ +  │ │ │ │ + constexpr _a_u_t_o  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____a_t_o_m_i_c___s_p_i_n___c_o_u_n_t___r_e_l_a_x │ │ │ │ +  │ │ │ │ +constexpr size_t  _s_t_d_:_:_____d_e_t_a_i_l_:_:_____p_l_a_t_f_o_r_m___w_a_i_t___a_l_i_g_n_m_e_n_t │ │ │ │ +  │ │ │ │ +template<_t_y_p_e_n_a_m_e _Tp > │ │ │ │ + constexpr bool  _s_t_d_:_:_____p_l_a_t_f_o_r_m___w_a_i_t___u_s_e_s___t_y_p_e │ │ │ │   │ │ │ │ ********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ This is an internal header file, included by other library headers. Do not │ │ │ │ -attempt to use it directly. Instead, include . │ │ │ │ -Definition in file _s_t_l___s_t_a_c_k_._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_2 of file _a_t_o_m_i_c___w_a_i_t_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_l___s_t_a_c_k_._h │ │ │ │ + * _a_t_o_m_i_c___w_a_i_t_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00395_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stl_stack.h Source File │ │ │ +libstdc++: atomic_wait.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stl_stack.h
│ │ │ +
atomic_wait.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Stack implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// -*- C++ -*- header.
│ │ │
2
│ │ │ -
3// Copyright (C) 2001-2023 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 2020-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -71,473 +71,484 @@ │ │ │
17// permissions described in the GCC Runtime Library Exception, version
│ │ │
18// 3.1, as published by the Free Software Foundation.
│ │ │
19
│ │ │
20// You should have received a copy of the GNU General Public License and
│ │ │
21// a copy of the GCC Runtime Library Exception along with this program;
│ │ │
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
│ │ │
23// <http://www.gnu.org/licenses/>.
│ │ │ -
24
│ │ │ -
25/*
│ │ │ -
26 *
│ │ │ -
27 * Copyright (c) 1994
│ │ │ -
28 * Hewlett-Packard Company
│ │ │ -
29 *
│ │ │ -
30 * Permission to use, copy, modify, distribute and sell this software
│ │ │ -
31 * and its documentation for any purpose is hereby granted without fee,
│ │ │ -
32 * provided that the above copyright notice appear in all copies and
│ │ │ -
33 * that both that copyright notice and this permission notice appear
│ │ │ -
34 * in supporting documentation. Hewlett-Packard Company makes no
│ │ │ -
35 * representations about the suitability of this software for any
│ │ │ -
36 * purpose. It is provided "as is" without express or implied warranty.
│ │ │ -
37 *
│ │ │ -
38 *
│ │ │ -
39 * Copyright (c) 1996,1997
│ │ │ -
40 * Silicon Graphics Computer Systems, Inc.
│ │ │ -
41 *
│ │ │ -
42 * Permission to use, copy, modify, distribute and sell this software
│ │ │ -
43 * and its documentation for any purpose is hereby granted without fee,
│ │ │ -
44 * provided that the above copyright notice appear in all copies and
│ │ │ -
45 * that both that copyright notice and this permission notice appear
│ │ │ -
46 * in supporting documentation. Silicon Graphics makes no
│ │ │ -
47 * representations about the suitability of this software for any
│ │ │ -
48 * purpose. It is provided "as is" without express or implied warranty.
│ │ │ -
49 */
│ │ │ -
50
│ │ │ -
51/** @file bits/stl_stack.h
│ │ │ -
52 * This is an internal header file, included by other library headers.
│ │ │ -
53 * Do not attempt to use it directly. @headername{stack}
│ │ │ -
54 */
│ │ │ -
55
│ │ │ -
56#ifndef _STL_STACK_H
│ │ │ -
57#define _STL_STACK_H 1
│ │ │ -
58
│ │ │ -
59#include <bits/concept_check.h>
│ │ │ -
60#include <debug/debug.h>
│ │ │ -
61#if __cplusplus >= 201103L
│ │ │ -
62# include <bits/uses_allocator.h>
│ │ │ -
63#endif
│ │ │ -
64
│ │ │ -
65namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
66{
│ │ │ -
67_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
68
│ │ │ -
69 /**
│ │ │ -
70 * @brief A standard container giving FILO behavior.
│ │ │ -
71 *
│ │ │ -
72 * @ingroup sequences
│ │ │ -
73 *
│ │ │ -
74 * @tparam _Tp Type of element.
│ │ │ -
75 * @tparam _Sequence Type of underlying sequence, defaults to deque<_Tp>.
│ │ │ -
76 *
│ │ │ -
77 * Meets many of the requirements of a
│ │ │ -
78 * <a href="tables.html#65">container</a>,
│ │ │ -
79 * but does not define anything to do with iterators. Very few of the
│ │ │ -
80 * other standard container interfaces are defined.
│ │ │ -
81 *
│ │ │ -
82 * This is not a true container, but an @e adaptor. It holds
│ │ │ -
83 * another container, and provides a wrapper interface to that
│ │ │ -
84 * container. The wrapper is what enforces strict
│ │ │ -
85 * first-in-last-out %stack behavior.
│ │ │ -
86 *
│ │ │ -
87 * The second template parameter defines the type of the underlying
│ │ │ -
88 * sequence/container. It defaults to std::deque, but it can be
│ │ │ -
89 * any type that supports @c back, @c push_back, and @c pop_back,
│ │ │ -
90 * such as std::list, std::vector, or an appropriate user-defined
│ │ │ -
91 * type.
│ │ │ -
92 *
│ │ │ -
93 * Members not found in @a normal containers are @c container_type,
│ │ │ -
94 * which is a typedef for the second Sequence parameter, and @c
│ │ │ -
95 * push, @c pop, and @c top, which are standard %stack/FILO
│ │ │ -
96 * operations.
│ │ │ -
97 */
│ │ │ -
98 template<typename _Tp, typename _Sequence = deque<_Tp> >
│ │ │ -
│ │ │ -
99 class stack
│ │ │ -
100 {
│ │ │ -
101#ifdef _GLIBCXX_CONCEPT_CHECKS
│ │ │ -
102 // concept requirements
│ │ │ -
103 typedef typename _Sequence::value_type _Sequence_value_type;
│ │ │ -
104# if __cplusplus < 201103L
│ │ │ -
105 __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
│ │ │ -
106 __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept)
│ │ │ -
107# endif
│ │ │ -
108 __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
│ │ │ -
109#endif
│ │ │ -
110
│ │ │ -
111 template<typename _Tp1, typename _Seq1>
│ │ │ -
112 friend bool
│ │ │ -
113 operator==(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&);
│ │ │ -
114
│ │ │ -
115 template<typename _Tp1, typename _Seq1>
│ │ │ -
116 friend bool
│ │ │ -
117 operator<(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&);
│ │ │ -
118
│ │ │ -
119#if __cpp_lib_three_way_comparison
│ │ │ -
120 template<typename _Tp1, three_way_comparable _Seq1>
│ │ │ - │ │ │ -
122 operator<=>(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&);
│ │ │ -
123#endif
│ │ │ -
124
│ │ │ -
125#if __cplusplus >= 201103L
│ │ │ -
126 template<typename _Alloc>
│ │ │ -
127 using _Uses = typename
│ │ │ - │ │ │ -
129
│ │ │ -
130#if __cplusplus >= 201703L
│ │ │ -
131 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
132 // 2566. Requirements on the first template parameter of container
│ │ │ -
133 // adaptors
│ │ │ - │ │ │ -
135 "value_type must be the same as the underlying container");
│ │ │ -
136#endif // C++17
│ │ │ -
137#endif // C++11
│ │ │ -
138
│ │ │ -
139 public:
│ │ │ -
140 typedef typename _Sequence::value_type value_type;
│ │ │ -
141 typedef typename _Sequence::reference reference;
│ │ │ -
142 typedef typename _Sequence::const_reference const_reference;
│ │ │ -
143 typedef typename _Sequence::size_type size_type;
│ │ │ -
144 typedef _Sequence container_type;
│ │ │ -
145
│ │ │ -
146 protected:
│ │ │ -
147 // See queue::c for notes on this name.
│ │ │ -
148 _Sequence c;
│ │ │ +
24
│ │ │ +
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{atomic}
│ │ │ +
28 */
│ │ │ +
29
│ │ │ +
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
│ │ │ +
37#include <cstdint>
│ │ │ + │ │ │ +
39#include <bits/gthr.h>
│ │ │ +
40#include <ext/numeric_traits.h>
│ │ │ +
41
│ │ │ +
42#ifdef _GLIBCXX_HAVE_LINUX_FUTEX
│ │ │ +
43# include <cerrno>
│ │ │ +
44# include <climits>
│ │ │ +
45# include <unistd.h>
│ │ │ +
46# include <syscall.h>
│ │ │ +
47# include <bits/functexcept.h>
│ │ │ +
48#endif
│ │ │ +
49
│ │ │ +
50# include <bits/std_mutex.h> // std::mutex, std::__condvar
│ │ │ +
51
│ │ │ +
52#define __cpp_lib_atomic_wait 201907L
│ │ │ +
53
│ │ │ +
54namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ +
55{
│ │ │ +
56_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ +
57 namespace __detail
│ │ │ +
58 {
│ │ │ +
59#ifdef _GLIBCXX_HAVE_LINUX_FUTEX
│ │ │ +
60#define _GLIBCXX_HAVE_PLATFORM_WAIT 1
│ │ │ +
61 using __platform_wait_t = int;
│ │ │ +
62 inline constexpr size_t __platform_wait_alignment = 4;
│ │ │ +
63#else
│ │ │ +
64// define _GLIBCX_HAVE_PLATFORM_WAIT and implement __platform_wait()
│ │ │ +
65// and __platform_notify() if there is a more efficient primitive supported
│ │ │ +
66// by the platform (e.g. __ulock_wait()/__ulock_wake()) which is better than
│ │ │ +
67// a mutex/condvar based wait.
│ │ │ +
68# if ATOMIC_LONG_LOCK_FREE == 2
│ │ │ +
69 using __platform_wait_t = unsigned long;
│ │ │ +
70# else
│ │ │ +
71 using __platform_wait_t = unsigned int;
│ │ │ +
72# endif
│ │ │ +
73 inline constexpr size_t __platform_wait_alignment
│ │ │ +
74 = __alignof__(__platform_wait_t);
│ │ │ +
75#endif
│ │ │ +
76 } // namespace __detail
│ │ │ +
77
│ │ │ +
78 template<typename _Tp>
│ │ │ +
79 inline constexpr bool __platform_wait_uses_type
│ │ │ +
80#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
81 = is_scalar_v<_Tp>
│ │ │ +
82 && ((sizeof(_Tp) == sizeof(__detail::__platform_wait_t))
│ │ │ +
83 && (alignof(_Tp*) >= __detail::__platform_wait_alignment));
│ │ │ +
84#else
│ │ │ +
85 = false;
│ │ │ +
86#endif
│ │ │ +
87
│ │ │ +
88 namespace __detail
│ │ │ +
89 {
│ │ │ +
90#ifdef _GLIBCXX_HAVE_LINUX_FUTEX
│ │ │ +
91 enum class __futex_wait_flags : int
│ │ │ +
92 {
│ │ │ +
93#ifdef _GLIBCXX_HAVE_LINUX_FUTEX_PRIVATE
│ │ │ +
94 __private_flag = 128,
│ │ │ +
95#else
│ │ │ +
96 __private_flag = 0,
│ │ │ +
97#endif
│ │ │ +
98 __wait = 0,
│ │ │ +
99 __wake = 1,
│ │ │ +
100 __wait_bitset = 9,
│ │ │ +
101 __wake_bitset = 10,
│ │ │ +
102 __wait_private = __wait | __private_flag,
│ │ │ +
103 __wake_private = __wake | __private_flag,
│ │ │ +
104 __wait_bitset_private = __wait_bitset | __private_flag,
│ │ │ +
105 __wake_bitset_private = __wake_bitset | __private_flag,
│ │ │ +
106 __bitset_match_any = -1
│ │ │ +
107 };
│ │ │ +
108
│ │ │ +
109 template<typename _Tp>
│ │ │ +
110 void
│ │ │ +
111 __platform_wait(const _Tp* __addr, __platform_wait_t __val) noexcept
│ │ │ +
112 {
│ │ │ +
113 auto __e = syscall (SYS_futex, static_cast<const void*>(__addr),
│ │ │ +
114 static_cast<int>(__futex_wait_flags::__wait_private),
│ │ │ +
115 __val, nullptr);
│ │ │ +
116 if (!__e || errno == EAGAIN)
│ │ │ +
117 return;
│ │ │ +
118 if (errno != EINTR)
│ │ │ +
119 __throw_system_error(errno);
│ │ │ +
120 }
│ │ │ +
121
│ │ │ +
122 template<typename _Tp>
│ │ │ +
123 void
│ │ │ +
124 __platform_notify(const _Tp* __addr, bool __all) noexcept
│ │ │ +
125 {
│ │ │ +
126 syscall (SYS_futex, static_cast<const void*>(__addr),
│ │ │ +
127 static_cast<int>(__futex_wait_flags::__wake_private),
│ │ │ +
128 __all ? INT_MAX : 1);
│ │ │ +
129 }
│ │ │ +
130#endif
│ │ │ +
131
│ │ │ +
132 inline void
│ │ │ +
133 __thread_yield() noexcept
│ │ │ +
134 {
│ │ │ +
135#if defined _GLIBCXX_HAS_GTHREADS && defined _GLIBCXX_USE_SCHED_YIELD
│ │ │ +
136 __gthread_yield();
│ │ │ +
137#endif
│ │ │ +
138 }
│ │ │ +
139
│ │ │ +
140 inline void
│ │ │ +
141 __thread_relax() noexcept
│ │ │ +
142 {
│ │ │ +
143#if defined __i386__ || defined __x86_64__
│ │ │ +
144 __builtin_ia32_pause();
│ │ │ +
145#else
│ │ │ +
146 __thread_yield();
│ │ │ +
147#endif
│ │ │ +
148 }
│ │ │
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#if __cplusplus > 202002L
│ │ │ -
174#define __cpp_lib_adaptor_iterator_pair_constructor 202106L
│ │ │ +
150 inline constexpr auto __atomic_spin_count_relax = 12;
│ │ │ +
151 inline constexpr auto __atomic_spin_count = 16;
│ │ │ +
152
│ │ │ +
153 struct __default_spin_policy
│ │ │ +
154 {
│ │ │ +
155 bool
│ │ │ +
156 operator()() const noexcept
│ │ │ +
157 { return false; }
│ │ │ +
158 };
│ │ │ +
159
│ │ │ +
160 template<typename _Pred,
│ │ │ +
161 typename _Spin = __default_spin_policy>
│ │ │ +
162 bool
│ │ │ +
163 __atomic_spin(_Pred& __pred, _Spin __spin = _Spin{ }) noexcept
│ │ │ +
164 {
│ │ │ +
165 for (auto __i = 0; __i < __atomic_spin_count; ++__i)
│ │ │ +
166 {
│ │ │ +
167 if (__pred())
│ │ │ +
168 return true;
│ │ │ +
169
│ │ │ +
170 if (__i < __atomic_spin_count_relax)
│ │ │ +
171 __detail::__thread_relax();
│ │ │ +
172 else
│ │ │ +
173 __detail::__thread_yield();
│ │ │ +
174 }
│ │ │
175
│ │ │ -
176 template<typename _InputIterator,
│ │ │ -
177 typename = _RequireInputIter<_InputIterator>>
│ │ │ -
178 stack(_InputIterator __first, _InputIterator __last)
│ │ │ -
179 : c(__first, __last) { }
│ │ │ -
180#endif
│ │ │ +
176 while (__spin())
│ │ │ +
177 {
│ │ │ +
178 if (__pred())
│ │ │ +
179 return true;
│ │ │ +
180 }
│ │ │
181
│ │ │ -
182
│ │ │ -
183 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ -
184 explicit
│ │ │ -
185 stack(const _Alloc& __a)
│ │ │ -
186 : c(__a) { }
│ │ │ -
187
│ │ │ -
188 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ -
189 stack(const _Sequence& __c, const _Alloc& __a)
│ │ │ -
190 : c(__c, __a) { }
│ │ │ -
191
│ │ │ -
192 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ -
193 stack(_Sequence&& __c, const _Alloc& __a)
│ │ │ -
194 : c(std::move(__c), __a) { }
│ │ │ -
195
│ │ │ -
196 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ -
197 stack(const stack& __q, const _Alloc& __a)
│ │ │ -
198 : c(__q.c, __a) { }
│ │ │ -
199
│ │ │ -
200 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ -
201 stack(stack&& __q, const _Alloc& __a)
│ │ │ -
202 : c(std::move(__q.c), __a) { }
│ │ │ -
203
│ │ │ -
204#if __cplusplus > 202002L
│ │ │ -
205 template<typename _InputIterator, typename _Alloc,
│ │ │ -
206 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
207 typename = _Uses<_Alloc>>
│ │ │ -
208 stack(_InputIterator __first, _InputIterator __last, const _Alloc& __a)
│ │ │ -
209 : c(__first, __last, __a) { }
│ │ │ -
210#endif
│ │ │ -
211#endif
│ │ │ -
212
│ │ │ -
213 /**
│ │ │ -
214 * Returns true if the %stack is empty.
│ │ │ -
215 */
│ │ │ -
216 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
217 empty() const
│ │ │ -
218 { return c.empty(); }
│ │ │ -
│ │ │ -
219
│ │ │ -
220 /** Returns the number of elements in the %stack. */
│ │ │ -
221 _GLIBCXX_NODISCARD
│ │ │ -
222 size_type
│ │ │ -
│ │ │ -
223 size() const
│ │ │ -
224 { return c.size(); }
│ │ │ -
│ │ │ -
225
│ │ │ -
226 /**
│ │ │ -
227 * Returns a read/write reference to the data at the first
│ │ │ -
228 * element of the %stack.
│ │ │ -
229 */
│ │ │ -
230 _GLIBCXX_NODISCARD
│ │ │ -
231 reference
│ │ │ -
│ │ │ - │ │ │ -
233 {
│ │ │ -
234 __glibcxx_requires_nonempty();
│ │ │ -
235 return c.back();
│ │ │ -
236 }
│ │ │ -
│ │ │ -
237
│ │ │ -
238 /**
│ │ │ -
239 * Returns a read-only (constant) reference to the data at the first
│ │ │ -
240 * element of the %stack.
│ │ │ -
241 */
│ │ │ -
242 _GLIBCXX_NODISCARD
│ │ │ -
243 const_reference
│ │ │ -
│ │ │ -
244 top() const
│ │ │ -
245 {
│ │ │ -
246 __glibcxx_requires_nonempty();
│ │ │ -
247 return c.back();
│ │ │ -
248 }
│ │ │ -
│ │ │ -
249
│ │ │ -
250 /**
│ │ │ -
251 * @brief Add data to the top of the %stack.
│ │ │ -
252 * @param __x Data to be added.
│ │ │ -
253 *
│ │ │ -
254 * This is a typical %stack operation. The function creates an
│ │ │ -
255 * element at the top of the %stack and assigns the given data
│ │ │ -
256 * to it. The time complexity of the operation depends on the
│ │ │ -
257 * underlying sequence.
│ │ │ -
258 */
│ │ │ -
259 void
│ │ │ -
│ │ │ -
260 push(const value_type& __x)
│ │ │ -
261 { c.push_back(__x); }
│ │ │ -
│ │ │ -
262
│ │ │ -
263#if __cplusplus >= 201103L
│ │ │ -
264 void
│ │ │ -
265 push(value_type&& __x)
│ │ │ -
266 { c.push_back(std::move(__x)); }
│ │ │ -
267
│ │ │ -
268#if __cplusplus > 201402L
│ │ │ -
269 template<typename... _Args>
│ │ │ -
270 decltype(auto)
│ │ │ -
271 emplace(_Args&&... __args)
│ │ │ -
272 { return c.emplace_back(std::forward<_Args>(__args)...); }
│ │ │ -
273#else
│ │ │ -
274 template<typename... _Args>
│ │ │ -
275 void
│ │ │ -
276 emplace(_Args&&... __args)
│ │ │ -
277 { c.emplace_back(std::forward<_Args>(__args)...); }
│ │ │ -
278#endif
│ │ │ -
279#endif
│ │ │ -
280
│ │ │ -
281 /**
│ │ │ -
282 * @brief Removes first element.
│ │ │ -
283 *
│ │ │ -
284 * This is a typical %stack operation. It shrinks the %stack
│ │ │ -
285 * by one. The time complexity of the operation depends on the
│ │ │ -
286 * underlying sequence.
│ │ │ -
287 *
│ │ │ -
288 * Note that no data is returned, and if the first element's
│ │ │ -
289 * data is needed, it should be retrieved before pop() is
│ │ │ -
290 * called.
│ │ │ -
291 */
│ │ │ -
292 void
│ │ │ -
│ │ │ - │ │ │ -
294 {
│ │ │ -
295 __glibcxx_requires_nonempty();
│ │ │ -
296 c.pop_back();
│ │ │ -
297 }
│ │ │ -
│ │ │ -
298
│ │ │ -
299#if __cplusplus >= 201103L
│ │ │ -
300 void
│ │ │ -
301 swap(stack& __s)
│ │ │ -
302#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ - │ │ │ -
304#else
│ │ │ - │ │ │ -
306#endif
│ │ │ -
307 {
│ │ │ -
308 using std::swap;
│ │ │ -
309 swap(c, __s.c);
│ │ │ -
310 }
│ │ │ -
311#endif // __cplusplus >= 201103L
│ │ │ -
312 };
│ │ │ -
│ │ │ +
182 return false;
│ │ │ +
183 }
│ │ │ +
184
│ │ │ +
185 // return true if equal
│ │ │ +
186 template<typename _Tp>
│ │ │ +
187 bool __atomic_compare(const _Tp& __a, const _Tp& __b)
│ │ │ +
188 {
│ │ │ +
189 // TODO make this do the correct padding bit ignoring comparison
│ │ │ +
190 return __builtin_memcmp(&__a, &__b, sizeof(_Tp)) == 0;
│ │ │ +
191 }
│ │ │ +
192
│ │ │ +
193 struct __waiter_pool_base
│ │ │ +
194 {
│ │ │ +
195 // Don't use std::hardware_destructive_interference_size here because we
│ │ │ +
196 // don't want the layout of library types to depend on compiler options.
│ │ │ +
197 static constexpr auto _S_align = 64;
│ │ │ +
198
│ │ │ +
199 alignas(_S_align) __platform_wait_t _M_wait = 0;
│ │ │ +
200
│ │ │ +
201#ifndef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
202 mutex _M_mtx;
│ │ │ +
203#endif
│ │ │ +
204
│ │ │ +
205 alignas(_S_align) __platform_wait_t _M_ver = 0;
│ │ │ +
206
│ │ │ +
207#ifndef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
208 __condvar _M_cv;
│ │ │ +
209#endif
│ │ │ +
210 __waiter_pool_base() = default;
│ │ │ +
211
│ │ │ +
212 void
│ │ │ +
213 _M_enter_wait() noexcept
│ │ │ +
214 { __atomic_fetch_add(&_M_wait, 1, __ATOMIC_SEQ_CST); }
│ │ │ +
215
│ │ │ +
216 void
│ │ │ +
217 _M_leave_wait() noexcept
│ │ │ +
218 { __atomic_fetch_sub(&_M_wait, 1, __ATOMIC_RELEASE); }
│ │ │ +
219
│ │ │ +
220 bool
│ │ │ +
221 _M_waiting() const noexcept
│ │ │ +
222 {
│ │ │ +
223 __platform_wait_t __res;
│ │ │ +
224 __atomic_load(&_M_wait, &__res, __ATOMIC_SEQ_CST);
│ │ │ +
225 return __res != 0;
│ │ │ +
226 }
│ │ │ +
227
│ │ │ +
228 void
│ │ │ +
229 _M_notify(__platform_wait_t* __addr, [[maybe_unused]] bool __all,
│ │ │ +
230 bool __bare) noexcept
│ │ │ +
231 {
│ │ │ +
232#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
233 if (__addr == &_M_ver)
│ │ │ +
234 {
│ │ │ +
235 __atomic_fetch_add(__addr, 1, __ATOMIC_SEQ_CST);
│ │ │ +
236 __all = true;
│ │ │ +
237 }
│ │ │ +
238
│ │ │ +
239 if (__bare || _M_waiting())
│ │ │ +
240 __platform_notify(__addr, __all);
│ │ │ +
241#else
│ │ │ +
242 {
│ │ │ +
243 lock_guard<mutex> __l(_M_mtx);
│ │ │ +
244 __atomic_fetch_add(__addr, 1, __ATOMIC_RELAXED);
│ │ │ +
245 }
│ │ │ +
246 if (__bare || _M_waiting())
│ │ │ +
247 _M_cv.notify_all();
│ │ │ +
248#endif
│ │ │ +
249 }
│ │ │ +
250
│ │ │ +
251 static __waiter_pool_base&
│ │ │ +
252 _S_for(const void* __addr) noexcept
│ │ │ +
253 {
│ │ │ +
254 constexpr uintptr_t __ct = 16;
│ │ │ +
255 static __waiter_pool_base __w[__ct];
│ │ │ +
256 auto __key = (uintptr_t(__addr) >> 2) % __ct;
│ │ │ +
257 return __w[__key];
│ │ │ +
258 }
│ │ │ +
259 };
│ │ │ +
260
│ │ │ +
261 struct __waiter_pool : __waiter_pool_base
│ │ │ +
262 {
│ │ │ +
263 void
│ │ │ +
264 _M_do_wait(const __platform_wait_t* __addr, __platform_wait_t __old) noexcept
│ │ │ +
265 {
│ │ │ +
266#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
267 __platform_wait(__addr, __old);
│ │ │ +
268#else
│ │ │ +
269 __platform_wait_t __val;
│ │ │ +
270 __atomic_load(__addr, &__val, __ATOMIC_SEQ_CST);
│ │ │ +
271 if (__val == __old)
│ │ │ +
272 {
│ │ │ +
273 lock_guard<mutex> __l(_M_mtx);
│ │ │ +
274 __atomic_load(__addr, &__val, __ATOMIC_RELAXED);
│ │ │ +
275 if (__val == __old)
│ │ │ +
276 _M_cv.wait(_M_mtx);
│ │ │ +
277 }
│ │ │ +
278#endif // __GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
279 }
│ │ │ +
280 };
│ │ │ +
281
│ │ │ +
282 template<typename _Tp>
│ │ │ +
283 struct __waiter_base
│ │ │ +
284 {
│ │ │ +
285 using __waiter_type = _Tp;
│ │ │ +
286
│ │ │ +
287 __waiter_type& _M_w;
│ │ │ +
288 __platform_wait_t* _M_addr;
│ │ │ +
289
│ │ │ +
290 template<typename _Up>
│ │ │ +
291 static __platform_wait_t*
│ │ │ +
292 _S_wait_addr(const _Up* __a, __platform_wait_t* __b)
│ │ │ +
293 {
│ │ │ +
294 if constexpr (__platform_wait_uses_type<_Up>)
│ │ │ +
295 return reinterpret_cast<__platform_wait_t*>(const_cast<_Up*>(__a));
│ │ │ +
296 else
│ │ │ +
297 return __b;
│ │ │ +
298 }
│ │ │ +
299
│ │ │ +
300 static __waiter_type&
│ │ │ +
301 _S_for(const void* __addr) noexcept
│ │ │ +
302 {
│ │ │ +
303 static_assert(sizeof(__waiter_type) == sizeof(__waiter_pool_base));
│ │ │ +
304 auto& res = __waiter_pool_base::_S_for(__addr);
│ │ │ +
305 return reinterpret_cast<__waiter_type&>(res);
│ │ │ +
306 }
│ │ │ +
307
│ │ │ +
308 template<typename _Up>
│ │ │ +
309 explicit __waiter_base(const _Up* __addr) noexcept
│ │ │ +
310 : _M_w(_S_for(__addr))
│ │ │ +
311 , _M_addr(_S_wait_addr(__addr, &_M_w._M_ver))
│ │ │ +
312 { }
│ │ │
313
│ │ │ -
314#if __cpp_deduction_guides >= 201606
│ │ │ -
315 template<typename _Container,
│ │ │ -
316 typename = _RequireNotAllocator<_Container>>
│ │ │ -
317 stack(_Container) -> stack<typename _Container::value_type, _Container>;
│ │ │ -
318
│ │ │ -
319 template<typename _Container, typename _Allocator,
│ │ │ -
320 typename = _RequireNotAllocator<_Container>>
│ │ │ -
321 stack(_Container, _Allocator)
│ │ │ -
322 -> stack<typename _Container::value_type, _Container>;
│ │ │ -
323
│ │ │ -
324#ifdef __cpp_lib_adaptor_iterator_pair_constructor
│ │ │ -
325 template<typename _InputIterator,
│ │ │ -
326 typename _ValT
│ │ │ -
327 = typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
328 typename = _RequireInputIter<_InputIterator>>
│ │ │ -
329 stack(_InputIterator, _InputIterator) -> stack<_ValT>;
│ │ │ -
330
│ │ │ -
331 template<typename _InputIterator, typename _Allocator,
│ │ │ -
332 typename _ValT
│ │ │ -
333 = typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
334 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
335 typename = _RequireAllocator<_Allocator>>
│ │ │ -
336 stack(_InputIterator, _InputIterator, _Allocator)
│ │ │ -
337 -> stack<_ValT, deque<_ValT, _Allocator>>;
│ │ │ -
338#endif
│ │ │ -
339#endif
│ │ │ -
340
│ │ │ -
341 /**
│ │ │ -
342 * @brief Stack equality comparison.
│ │ │ -
343 * @param __x A %stack.
│ │ │ -
344 * @param __y A %stack of the same type as @a __x.
│ │ │ -
345 * @return True iff the size and elements of the stacks are equal.
│ │ │ -
346 *
│ │ │ -
347 * This is an equivalence relation. Complexity and semantics
│ │ │ -
348 * depend on the underlying sequence type, but the expected rules
│ │ │ -
349 * are: this relation is linear in the size of the sequences, and
│ │ │ -
350 * stacks are considered equivalent if their sequences compare
│ │ │ -
351 * equal.
│ │ │ -
352 */
│ │ │ -
353 template<typename _Tp, typename _Seq>
│ │ │ -
354 _GLIBCXX_NODISCARD
│ │ │ -
355 inline bool
│ │ │ -
│ │ │ -
356 operator==(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ -
357 { return __x.c == __y.c; }
│ │ │ -
│ │ │ -
358
│ │ │ -
359 /**
│ │ │ -
360 * @brief Stack ordering relation.
│ │ │ -
361 * @param __x A %stack.
│ │ │ -
362 * @param __y A %stack of the same type as @a x.
│ │ │ -
363 * @return True iff @a x is lexicographically less than @a __y.
│ │ │ -
364 *
│ │ │ -
365 * This is an total ordering relation. Complexity and semantics
│ │ │ -
366 * depend on the underlying sequence type, but the expected rules
│ │ │ -
367 * are: this relation is linear in the size of the sequences, the
│ │ │ -
368 * elements must be comparable with @c <, and
│ │ │ -
369 * std::lexicographical_compare() is usually used to make the
│ │ │ -
370 * determination.
│ │ │ -
371 */
│ │ │ -
372 template<typename _Tp, typename _Seq>
│ │ │ -
373 _GLIBCXX_NODISCARD
│ │ │ -
│ │ │ -
374 inline bool
│ │ │ -
375 operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ -
376 { return __x.c < __y.c; }
│ │ │ -
│ │ │ -
377
│ │ │ -
378 /// Based on operator==
│ │ │ -
379 template<typename _Tp, typename _Seq>
│ │ │ -
380 _GLIBCXX_NODISCARD
│ │ │ -
381 inline bool
│ │ │ -
│ │ │ -
382 operator!=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ -
383 { return !(__x == __y); }
│ │ │ -
│ │ │ -
384
│ │ │ -
385 /// Based on operator<
│ │ │ -
386 template<typename _Tp, typename _Seq>
│ │ │ -
387 _GLIBCXX_NODISCARD
│ │ │ -
388 inline bool
│ │ │ -
│ │ │ -
389 operator>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ -
390 { return __y < __x; }
│ │ │ -
│ │ │ -
391
│ │ │ -
392 /// Based on operator<
│ │ │ -
393 template<typename _Tp, typename _Seq>
│ │ │ -
394 _GLIBCXX_NODISCARD
│ │ │ -
│ │ │ -
395 inline bool
│ │ │ -
396 operator<=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ -
397 { return !(__y < __x); }
│ │ │ -
│ │ │ -
398
│ │ │ -
399 /// Based on operator<
│ │ │ -
400 template<typename _Tp, typename _Seq>
│ │ │ -
401 _GLIBCXX_NODISCARD
│ │ │ -
402 inline bool
│ │ │ -
│ │ │ -
403 operator>=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ -
404 { return !(__x < __y); }
│ │ │ -
│ │ │ -
405
│ │ │ -
406#if __cpp_lib_three_way_comparison
│ │ │ -
407 template<typename _Tp, three_way_comparable _Seq>
│ │ │ -
408 [[nodiscard]]
│ │ │ -
409 inline compare_three_way_result_t<_Seq>
│ │ │ -
410 operator<=>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
│ │ │ -
411 { return __x.c <=> __y.c; }
│ │ │ -
412#endif
│ │ │ -
413
│ │ │ -
414#if __cplusplus >= 201103L
│ │ │ -
415 template<typename _Tp, typename _Seq>
│ │ │ -
416 inline
│ │ │ -
417#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ -
418 // Constrained free swap overload, see p0185r1
│ │ │ -
419 typename enable_if<__is_swappable<_Seq>::value>::type
│ │ │ -
420#else
│ │ │ +
314 void
│ │ │ +
315 _M_notify(bool __all, bool __bare = false) noexcept
│ │ │ +
316 { _M_w._M_notify(_M_addr, __all, __bare); }
│ │ │ +
317
│ │ │ +
318 template<typename _Up, typename _ValFn,
│ │ │ +
319 typename _Spin = __default_spin_policy>
│ │ │ +
320 static bool
│ │ │ +
321 _S_do_spin_v(__platform_wait_t* __addr,
│ │ │ +
322 const _Up& __old, _ValFn __vfn,
│ │ │ +
323 __platform_wait_t& __val,
│ │ │ +
324 _Spin __spin = _Spin{ })
│ │ │ +
325 {
│ │ │ +
326 auto const __pred = [=]
│ │ │ +
327 { return !__detail::__atomic_compare(__old, __vfn()); };
│ │ │ +
328
│ │ │ +
329 if constexpr (__platform_wait_uses_type<_Up>)
│ │ │ +
330 {
│ │ │ +
331 __builtin_memcpy(&__val, &__old, sizeof(__val));
│ │ │ +
332 }
│ │ │ +
333 else
│ │ │ +
334 {
│ │ │ +
335 __atomic_load(__addr, &__val, __ATOMIC_ACQUIRE);
│ │ │ +
336 }
│ │ │ +
337 return __atomic_spin(__pred, __spin);
│ │ │ +
338 }
│ │ │ +
339
│ │ │ +
340 template<typename _Up, typename _ValFn,
│ │ │ +
341 typename _Spin = __default_spin_policy>
│ │ │ +
342 bool
│ │ │ +
343 _M_do_spin_v(const _Up& __old, _ValFn __vfn,
│ │ │ +
344 __platform_wait_t& __val,
│ │ │ +
345 _Spin __spin = _Spin{ })
│ │ │ +
346 { return _S_do_spin_v(_M_addr, __old, __vfn, __val, __spin); }
│ │ │ +
347
│ │ │ +
348 template<typename _Pred,
│ │ │ +
349 typename _Spin = __default_spin_policy>
│ │ │ +
350 static bool
│ │ │ +
351 _S_do_spin(const __platform_wait_t* __addr,
│ │ │ +
352 _Pred __pred,
│ │ │ +
353 __platform_wait_t& __val,
│ │ │ +
354 _Spin __spin = _Spin{ })
│ │ │ +
355 {
│ │ │ +
356 __atomic_load(__addr, &__val, __ATOMIC_ACQUIRE);
│ │ │ +
357 return __atomic_spin(__pred, __spin);
│ │ │ +
358 }
│ │ │ +
359
│ │ │ +
360 template<typename _Pred,
│ │ │ +
361 typename _Spin = __default_spin_policy>
│ │ │ +
362 bool
│ │ │ +
363 _M_do_spin(_Pred __pred, __platform_wait_t& __val,
│ │ │ +
364 _Spin __spin = _Spin{ })
│ │ │ +
365 { return _S_do_spin(_M_addr, __pred, __val, __spin); }
│ │ │ +
366 };
│ │ │ +
367
│ │ │ +
368 template<typename _EntersWait>
│ │ │ +
369 struct __waiter : __waiter_base<__waiter_pool>
│ │ │ +
370 {
│ │ │ +
371 using __base_type = __waiter_base<__waiter_pool>;
│ │ │ +
372
│ │ │ +
373 template<typename _Tp>
│ │ │ +
374 explicit __waiter(const _Tp* __addr) noexcept
│ │ │ +
375 : __base_type(__addr)
│ │ │ +
376 {
│ │ │ +
377 if constexpr (_EntersWait::value)
│ │ │ +
378 _M_w._M_enter_wait();
│ │ │ +
379 }
│ │ │ +
380
│ │ │ +
381 ~__waiter()
│ │ │ +
382 {
│ │ │ +
383 if constexpr (_EntersWait::value)
│ │ │ +
384 _M_w._M_leave_wait();
│ │ │ +
385 }
│ │ │ +
386
│ │ │ +
387 template<typename _Tp, typename _ValFn>
│ │ │ +
388 void
│ │ │ +
389 _M_do_wait_v(_Tp __old, _ValFn __vfn)
│ │ │ +
390 {
│ │ │ +
391 do
│ │ │ +
392 {
│ │ │ +
393 __platform_wait_t __val;
│ │ │ +
394 if (__base_type::_M_do_spin_v(__old, __vfn, __val))
│ │ │ +
395 return;
│ │ │ +
396 __base_type::_M_w._M_do_wait(__base_type::_M_addr, __val);
│ │ │ +
397 }
│ │ │ +
398 while (__detail::__atomic_compare(__old, __vfn()));
│ │ │ +
399 }
│ │ │ +
400
│ │ │ +
401 template<typename _Pred>
│ │ │ +
402 void
│ │ │ +
403 _M_do_wait(_Pred __pred) noexcept
│ │ │ +
404 {
│ │ │ +
405 do
│ │ │ +
406 {
│ │ │ +
407 __platform_wait_t __val;
│ │ │ +
408 if (__base_type::_M_do_spin(__pred, __val))
│ │ │ +
409 return;
│ │ │ +
410 __base_type::_M_w._M_do_wait(__base_type::_M_addr, __val);
│ │ │ +
411 }
│ │ │ +
412 while (!__pred());
│ │ │ +
413 }
│ │ │ +
414 };
│ │ │ +
415
│ │ │ +
416 using __enters_wait = __waiter<std::true_type>;
│ │ │ +
417 using __bare_wait = __waiter<std::false_type>;
│ │ │ +
418 } // namespace __detail
│ │ │ +
419
│ │ │ +
420 template<typename _Tp, typename _ValFn>
│ │ │
421 void
│ │ │ -
422#endif
│ │ │ -
423 swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y)
│ │ │ -
424 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
425 { __x.swap(__y); }
│ │ │ -
426
│ │ │ -
427 template<typename _Tp, typename _Seq, typename _Alloc>
│ │ │ -
428 struct uses_allocator<stack<_Tp, _Seq>, _Alloc>
│ │ │ -
429 : public uses_allocator<_Seq, _Alloc>::type { };
│ │ │ -
430#endif // __cplusplus >= 201103L
│ │ │ -
431
│ │ │ -
432_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
433} // namespace
│ │ │ -
434
│ │ │ -
435#endif /* _STL_STACK_H */
│ │ │ - │ │ │ - │ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:97
│ │ │ -
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ +
422 __atomic_wait_address_v(const _Tp* __addr, _Tp __old,
│ │ │ +
423 _ValFn __vfn) noexcept
│ │ │ +
424 {
│ │ │ +
425 __detail::__enters_wait __w(__addr);
│ │ │ +
426 __w._M_do_wait_v(__old, __vfn);
│ │ │ +
427 }
│ │ │ +
428
│ │ │ +
429 template<typename _Tp, typename _Pred>
│ │ │ +
430 void
│ │ │ +
431 __atomic_wait_address(const _Tp* __addr, _Pred __pred) noexcept
│ │ │ +
432 {
│ │ │ +
433 __detail::__enters_wait __w(__addr);
│ │ │ +
434 __w._M_do_wait(__pred);
│ │ │ +
435 }
│ │ │ +
436
│ │ │ +
437 // This call is to be used by atomic types which track contention externally
│ │ │ +
438 template<typename _Pred>
│ │ │ +
439 void
│ │ │ +
440 __atomic_wait_address_bare(const __detail::__platform_wait_t* __addr,
│ │ │ +
441 _Pred __pred) noexcept
│ │ │ +
442 {
│ │ │ +
443#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
444 do
│ │ │ +
445 {
│ │ │ +
446 __detail::__platform_wait_t __val;
│ │ │ +
447 if (__detail::__bare_wait::_S_do_spin(__addr, __pred, __val))
│ │ │ +
448 return;
│ │ │ +
449 __detail::__platform_wait(__addr, __val);
│ │ │ +
450 }
│ │ │ +
451 while (!__pred());
│ │ │ +
452#else // !_GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
453 __detail::__bare_wait __w(__addr);
│ │ │ +
454 __w._M_do_wait(__pred);
│ │ │ +
455#endif
│ │ │ +
456 }
│ │ │ +
457
│ │ │ +
458 template<typename _Tp>
│ │ │ +
459 void
│ │ │ +
460 __atomic_notify_address(const _Tp* __addr, bool __all) noexcept
│ │ │ +
461 {
│ │ │ +
462 __detail::__bare_wait __w(__addr);
│ │ │ +
463 __w._M_notify(__all);
│ │ │ +
464 }
│ │ │ +
465
│ │ │ +
466 // This call is to be used by atomic types which track contention externally
│ │ │ +
467 inline void
│ │ │ +
468 __atomic_notify_address_bare(const __detail::__platform_wait_t* __addr,
│ │ │ +
469 bool __all) noexcept
│ │ │ +
470 {
│ │ │ +
471#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT
│ │ │ +
472 __detail::__platform_notify(__addr, __all);
│ │ │ +
473#else
│ │ │ +
474 __detail::__bare_wait __w(__addr);
│ │ │ +
475 __w._M_notify(__all, true);
│ │ │ +
476#endif
│ │ │ +
477 }
│ │ │ +
478_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ +
479} // namespace std
│ │ │ +
480#endif // GTHREADS || LINUX_FUTEX
│ │ │ +
481#endif // _GLIBCXX_ATOMIC_WAIT_H
│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │
ISO C++ entities toplevel namespace is std.
│ │ │ - │ │ │ -
A standard container giving FILO behavior.
Definition stl_stack.h:100
│ │ │ -
void pop()
Removes first element.
Definition stl_stack.h:293
│ │ │ -
size_type size() const
Definition stl_stack.h:223
│ │ │ -
void push(const value_type &__x)
Add data to the top of the stack.
Definition stl_stack.h:260
│ │ │ -
bool empty() const
Definition stl_stack.h:217
│ │ │ -
const_reference top() const
Definition stl_stack.h:244
│ │ │ -
stack()
Default constructor creates no elements.
Definition stl_stack.h:162
│ │ │ -
reference top()
Definition stl_stack.h:232
│ │ │ - │ │ │ + │ │ │ + │ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ libstdc++ │ │ │ │ -stl_stack.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// Stack implementation -*- C++ -*- │ │ │ │ +1// -*- C++ -*- header. │ │ │ │ 2 │ │ │ │ -3// Copyright (C) 2001-2023 Free Software Foundation, Inc. │ │ │ │ +3// Copyright (C) 2020-2023 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,465 +21,479 @@ │ │ │ │ 18// 3.1, as published by the Free Software Foundation. │ │ │ │ 19 │ │ │ │ 20// You should have received a copy of the GNU General Public License and │ │ │ │ 21// a copy of the GCC Runtime Library Exception along with this program; │ │ │ │ 22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see │ │ │ │ 23// . │ │ │ │ 24 │ │ │ │ -25/* │ │ │ │ -26 * │ │ │ │ -27 * Copyright (c) 1994 │ │ │ │ -28 * Hewlett-Packard Company │ │ │ │ -29 * │ │ │ │ -30 * Permission to use, copy, modify, distribute and sell this software │ │ │ │ -31 * and its documentation for any purpose is hereby granted without fee, │ │ │ │ -32 * provided that the above copyright notice appear in all copies and │ │ │ │ -33 * that both that copyright notice and this permission notice appear │ │ │ │ -34 * in supporting documentation. Hewlett-Packard Company makes no │ │ │ │ -35 * representations about the suitability of this software for any │ │ │ │ -36 * purpose. It is provided "as is" without express or implied warranty. │ │ │ │ -37 * │ │ │ │ -38 * │ │ │ │ -39 * Copyright (c) 1996,1997 │ │ │ │ -40 * Silicon Graphics Computer Systems, Inc. │ │ │ │ -41 * │ │ │ │ -42 * Permission to use, copy, modify, distribute and sell this software │ │ │ │ -43 * and its documentation for any purpose is hereby granted without fee, │ │ │ │ -44 * provided that the above copyright notice appear in all copies and │ │ │ │ -45 * that both that copyright notice and this permission notice appear │ │ │ │ -46 * in supporting documentation. Silicon Graphics makes no │ │ │ │ -47 * representations about the suitability of this software for any │ │ │ │ -48 * purpose. It is provided "as is" without express or implied warranty. │ │ │ │ -49 */ │ │ │ │ -50 │ │ │ │ -51/** @file bits/stl_stack.h │ │ │ │ -52 * This is an internal header file, included by other library headers. │ │ │ │ -53 * Do not attempt to use it directly. @headername{stack} │ │ │ │ -54 */ │ │ │ │ -55 │ │ │ │ -56#ifndef _STL_STACK_H │ │ │ │ -57#define _STL_STACK_H 1 │ │ │ │ -58 │ │ │ │ -59#include <_b_i_t_s_/_c_o_n_c_e_p_t___c_h_e_c_k_._h> │ │ │ │ -60#include <_d_e_b_u_g_/_d_e_b_u_g_._h> │ │ │ │ -61#if __cplusplus >= 201103L │ │ │ │ -62# include │ │ │ │ -63#endif │ │ │ │ -64 │ │ │ │ -65namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -66{ │ │ │ │ -67_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -68 │ │ │ │ -69 /** │ │ │ │ -70 * @brief A standard container giving FILO behavior. │ │ │ │ -71 * │ │ │ │ -72 * @ingroup sequences │ │ │ │ -73 * │ │ │ │ -74 * @tparam _Tp Type of element. │ │ │ │ -75 * @tparam _Sequence Type of underlying sequence, defaults to deque<_Tp>. │ │ │ │ -76 * │ │ │ │ -77 * Meets many of the requirements of a │ │ │ │ -78 * container, │ │ │ │ -79 * but does not define anything to do with iterators. Very few of the │ │ │ │ -80 * other standard container interfaces are defined. │ │ │ │ -81 * │ │ │ │ -82 * This is not a true container, but an @e adaptor. It holds │ │ │ │ -83 * another container, and provides a wrapper interface to that │ │ │ │ -84 * container. The wrapper is what enforces strict │ │ │ │ -85 * first-in-last-out %stack behavior. │ │ │ │ -86 * │ │ │ │ -87 * The second template parameter defines the type of the underlying │ │ │ │ -88 * sequence/container. It defaults to std::deque, but it can be │ │ │ │ -89 * any type that supports @c back, @c push_back, and @c pop_back, │ │ │ │ -90 * such as std::list, std::vector, or an appropriate user-defined │ │ │ │ -91 * type. │ │ │ │ -92 * │ │ │ │ -93 * Members not found in @a normal containers are @c container_type, │ │ │ │ -94 * which is a typedef for the second Sequence parameter, and @c │ │ │ │ -95 * push, @c pop, and @c top, which are standard %stack/FILO │ │ │ │ -96 * operations. │ │ │ │ -97 */ │ │ │ │ -98 template > │ │ │ │ -_9_9 class _s_t_a_c_k │ │ │ │ -100 { │ │ │ │ -101#ifdef _GLIBCXX_CONCEPT_CHECKS │ │ │ │ -102 // concept requirements │ │ │ │ -103 typedef typename _Sequence::value_type ___S_e_q_u_e_n_c_e___v_a_l_u_e___t_y_p_e; │ │ │ │ -104# if __cplusplus < 201103L │ │ │ │ -105 __glibcxx_class_requires(_Tp, _SGIAssignableConcept) │ │ │ │ -106 __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept) │ │ │ │ -107# endif │ │ │ │ -108 __glibcxx_class_requires2(_Tp, ___S_e_q_u_e_n_c_e___v_a_l_u_e___t_y_p_e, _SameTypeConcept) │ │ │ │ -109#endif │ │ │ │ -110 │ │ │ │ -111 template │ │ │ │ -112 friend bool │ │ │ │ -113 operator==(const _s_t_a_c_k_<___T_p_1_,_ ___S_e_q_1_>&, const _s_t_a_c_k_<___T_p_1_,_ ___S_e_q_1_>&); │ │ │ │ -114 │ │ │ │ -115 template │ │ │ │ -116 friend bool │ │ │ │ -117 operator<(const _s_t_a_c_k_<___T_p_1_,_ ___S_e_q_1_>&, const _s_t_a_c_k_<___T_p_1_,_ ___S_e_q_1_>&); │ │ │ │ -118 │ │ │ │ -119#if __cpp_lib_three_way_comparison │ │ │ │ -120 template │ │ │ │ -121 friend _c_o_m_p_a_r_e___t_h_r_e_e___w_a_y___r_e_s_u_l_t___t_<___S_e_q_1_> │ │ │ │ -122 operator<=>(const _s_t_a_c_k_<___T_p_1_,_ ___S_e_q_1_>&, const _s_t_a_c_k_<___T_p_1_,_ ___S_e_q_1_>&); │ │ │ │ -123#endif │ │ │ │ -124 │ │ │ │ -125#if __cplusplus >= 201103L │ │ │ │ -126 template │ │ │ │ -127 using _Uses = typename │ │ │ │ -128 _e_n_a_b_l_e___i_f_<_u_s_e_s___a_l_l_o_c_a_t_o_r_<___S_e_q_u_e_n_c_e_,_ ___A_l_l_o_c_>_:_:_v_a_l_u_e>::type; │ │ │ │ -129 │ │ │ │ -130#if __cplusplus >= 201703L │ │ │ │ -131 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -132 // 2566. Requirements on the first template parameter of container │ │ │ │ -133 // adaptors │ │ │ │ -134 static_assert(_i_s___s_a_m_e_<___T_p_,_ _t_y_p_e_n_a_m_e_ ___S_e_q_u_e_n_c_e_:_:_v_a_l_u_e___t_y_p_e_>_:_:_v_a_l_u_e, │ │ │ │ -135 "value_type must be the same as the underlying container"); │ │ │ │ -136#endif // C++17 │ │ │ │ -137#endif // C++11 │ │ │ │ -138 │ │ │ │ -139 public: │ │ │ │ -140 typedef typename _Sequence::value_type value_type; │ │ │ │ -141 typedef typename _Sequence::reference reference; │ │ │ │ -142 typedef typename _Sequence::const_reference const_reference; │ │ │ │ -143 typedef typename _Sequence::size_type size_type; │ │ │ │ -144 typedef _Sequence container_type; │ │ │ │ -145 │ │ │ │ -146 protected: │ │ │ │ -147 // See queue::c for notes on this name. │ │ │ │ -148 _Sequence c; │ │ │ │ +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{atomic} │ │ │ │ +28 */ │ │ │ │ +29 │ │ │ │ +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 <_c_s_t_d_i_n_t> │ │ │ │ +38#include <_b_i_t_s_/_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h> │ │ │ │ +39#include │ │ │ │ +40#include <_e_x_t_/_n_u_m_e_r_i_c___t_r_a_i_t_s_._h> │ │ │ │ +41 │ │ │ │ +42#ifdef _GLIBCXX_HAVE_LINUX_FUTEX │ │ │ │ +43# include <_c_e_r_r_n_o> │ │ │ │ +44# include │ │ │ │ +45# include │ │ │ │ +46# include │ │ │ │ +47# include <_b_i_t_s_/_f_u_n_c_t_e_x_c_e_p_t_._h> │ │ │ │ +48#endif │ │ │ │ +49 │ │ │ │ +50# include <_b_i_t_s_/_s_t_d___m_u_t_e_x_._h> // std::mutex, std::__condvar │ │ │ │ +51 │ │ │ │ +52#define __cpp_lib_atomic_wait 201907L │ │ │ │ +53 │ │ │ │ +54namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ +55{ │ │ │ │ +56_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ +57 namespace __detail │ │ │ │ +58 { │ │ │ │ +59#ifdef _GLIBCXX_HAVE_LINUX_FUTEX │ │ │ │ +60#define _GLIBCXX_HAVE_PLATFORM_WAIT 1 │ │ │ │ +61 using __platform_wait_t = int; │ │ │ │ +62 inline constexpr size_t __platform_wait_alignment = 4; │ │ │ │ +63#else │ │ │ │ +64// define _GLIBCX_HAVE_PLATFORM_WAIT and implement __platform_wait() │ │ │ │ +65// and __platform_notify() if there is a more efficient primitive supported │ │ │ │ +66// by the platform (e.g. __ulock_wait()/__ulock_wake()) which is better than │ │ │ │ +67// a mutex/condvar based wait. │ │ │ │ +68# if ATOMIC_LONG_LOCK_FREE == 2 │ │ │ │ +69 using __platform_wait_t = unsigned long; │ │ │ │ +70# else │ │ │ │ +71 using __platform_wait_t = unsigned int; │ │ │ │ +72# endif │ │ │ │ +73 inline constexpr size_t __platform_wait_alignment │ │ │ │ +74 = __alignof__(__platform_wait_t); │ │ │ │ +75#endif │ │ │ │ +76 } // namespace __detail │ │ │ │ +77 │ │ │ │ +78 template │ │ │ │ +79 inline constexpr bool __platform_wait_uses_type │ │ │ │ +80#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +81 = is_scalar_v<_Tp> │ │ │ │ +82 && ((sizeof(_Tp) == sizeof(__detail::__platform_wait_t)) │ │ │ │ +83 && (alignof(_Tp*) >= __detail::__platform_wait_alignment)); │ │ │ │ +84#else │ │ │ │ +85 = false; │ │ │ │ +86#endif │ │ │ │ +87 │ │ │ │ +88 namespace __detail │ │ │ │ +89 { │ │ │ │ +90#ifdef _GLIBCXX_HAVE_LINUX_FUTEX │ │ │ │ +91 enum class __futex_wait_flags : int │ │ │ │ +92 { │ │ │ │ +93#ifdef _GLIBCXX_HAVE_LINUX_FUTEX_PRIVATE │ │ │ │ +94 __private_flag = 128, │ │ │ │ +95#else │ │ │ │ +96 __private_flag = 0, │ │ │ │ +97#endif │ │ │ │ +98 __wait = 0, │ │ │ │ +99 __wake = 1, │ │ │ │ +100 __wait_bitset = 9, │ │ │ │ +101 __wake_bitset = 10, │ │ │ │ +102 __wait_private = __wait | __private_flag, │ │ │ │ +103 __wake_private = __wake | __private_flag, │ │ │ │ +104 __wait_bitset_private = __wait_bitset | __private_flag, │ │ │ │ +105 __wake_bitset_private = __wake_bitset | __private_flag, │ │ │ │ +106 __bitset_match_any = -1 │ │ │ │ +107 }; │ │ │ │ +108 │ │ │ │ +109 template │ │ │ │ +110 void │ │ │ │ +111 __platform_wait(const _Tp* __addr, __platform_wait_t __val) noexcept │ │ │ │ +112 { │ │ │ │ +113 auto __e = syscall (SYS_futex, static_cast(__addr), │ │ │ │ +114 static_cast(__futex_wait_flags::__wait_private), │ │ │ │ +115 __val, nullptr); │ │ │ │ +116 if (!__e || errno == EAGAIN) │ │ │ │ +117 return; │ │ │ │ +118 if (errno != EINTR) │ │ │ │ +119 __throw_system_error(errno); │ │ │ │ +120 } │ │ │ │ +121 │ │ │ │ +122 template │ │ │ │ +123 void │ │ │ │ +124 __platform_notify(const _Tp* __addr, bool __all) noexcept │ │ │ │ +125 { │ │ │ │ +126 syscall (SYS_futex, static_cast(__addr), │ │ │ │ +127 static_cast(__futex_wait_flags::__wake_private), │ │ │ │ +128 __all ? INT_MAX : 1); │ │ │ │ +129 } │ │ │ │ +130#endif │ │ │ │ +131 │ │ │ │ +132 inline void │ │ │ │ +133 __thread_yield() noexcept │ │ │ │ +134 { │ │ │ │ +135#if defined _GLIBCXX_HAS_GTHREADS && defined _GLIBCXX_USE_SCHED_YIELD │ │ │ │ +136 __gthread_yield(); │ │ │ │ +137#endif │ │ │ │ +138 } │ │ │ │ +139 │ │ │ │ +140 inline void │ │ │ │ +141 __thread_relax() noexcept │ │ │ │ +142 { │ │ │ │ +143#if defined __i386__ || defined __x86_64__ │ │ │ │ +144 __builtin_ia32_pause(); │ │ │ │ +145#else │ │ │ │ +146 __thread_yield(); │ │ │ │ +147#endif │ │ │ │ +148 } │ │ │ │ 149 │ │ │ │ -150 public: │ │ │ │ -151 // XXX removed old def ctor, added def arg to this one to match 14882 │ │ │ │ -152 /** │ │ │ │ -153 * @brief Default constructor creates no elements. │ │ │ │ -154 */ │ │ │ │ -155#if __cplusplus < 201103L │ │ │ │ -156 explicit │ │ │ │ -157 _s_t_a_c_k(const _Sequence& __c = _Sequence()) │ │ │ │ -158 : c(__c) { } │ │ │ │ -159#else │ │ │ │ -160 template_:_:_v_a_l_u_e>::type> │ │ │ │ -_1_6_2 _s_t_a_c_k() │ │ │ │ -163 : c() { } │ │ │ │ -164 │ │ │ │ -165 explicit │ │ │ │ -166 _s_t_a_c_k(const _Sequence& __c) │ │ │ │ -167 : c(__c) { } │ │ │ │ -168 │ │ │ │ -169 explicit │ │ │ │ -170 _s_t_a_c_k(_Sequence&& __c) │ │ │ │ -171 : c(_s_t_d::_m_o_v_e(__c)) { } │ │ │ │ -172 │ │ │ │ -173#if __cplusplus > 202002L │ │ │ │ -174#define __cpp_lib_adaptor_iterator_pair_constructor 202106L │ │ │ │ +150 inline constexpr auto __atomic_spin_count_relax = 12; │ │ │ │ +151 inline constexpr auto __atomic_spin_count = 16; │ │ │ │ +152 │ │ │ │ +153 struct __default_spin_policy │ │ │ │ +154 { │ │ │ │ +155 bool │ │ │ │ +156 operator()() const noexcept │ │ │ │ +157 { return false; } │ │ │ │ +158 }; │ │ │ │ +159 │ │ │ │ +160 template │ │ │ │ +162 bool │ │ │ │ +163 __atomic_spin(_Pred& __pred, _Spin __spin = _Spin{ }) noexcept │ │ │ │ +164 { │ │ │ │ +165 for (auto __i = 0; __i < __atomic_spin_count; ++__i) │ │ │ │ +166 { │ │ │ │ +167 if (__pred()) │ │ │ │ +168 return true; │ │ │ │ +169 │ │ │ │ +170 if (__i < __atomic_spin_count_relax) │ │ │ │ +171 __detail::__thread_relax(); │ │ │ │ +172 else │ │ │ │ +173 __detail::__thread_yield(); │ │ │ │ +174 } │ │ │ │ 175 │ │ │ │ -176 template> │ │ │ │ -178 _s_t_a_c_k(_InputIterator __first, _InputIterator __last) │ │ │ │ -179 : c(__first, __last) { } │ │ │ │ -180#endif │ │ │ │ +176 while (__spin()) │ │ │ │ +177 { │ │ │ │ +178 if (__pred()) │ │ │ │ +179 return true; │ │ │ │ +180 } │ │ │ │ 181 │ │ │ │ -182 │ │ │ │ -183 template> │ │ │ │ -184 explicit │ │ │ │ -185 _s_t_a_c_k(const _Alloc& __a) │ │ │ │ -186 : c(__a) { } │ │ │ │ -187 │ │ │ │ -188 template> │ │ │ │ -189 _s_t_a_c_k(const _Sequence& __c, const _Alloc& __a) │ │ │ │ -190 : c(__c, __a) { } │ │ │ │ -191 │ │ │ │ -192 template> │ │ │ │ -193 _s_t_a_c_k(_Sequence&& __c, const _Alloc& __a) │ │ │ │ -194 : c(_s_t_d::_m_o_v_e(__c), __a) { } │ │ │ │ -195 │ │ │ │ -196 template> │ │ │ │ -197 _s_t_a_c_k(const _s_t_a_c_k& __q, const _Alloc& __a) │ │ │ │ -198 : c(__q.c, __a) { } │ │ │ │ -199 │ │ │ │ -200 template> │ │ │ │ -201 _s_t_a_c_k(_s_t_a_c_k&& __q, const _Alloc& __a) │ │ │ │ -202 : c(_s_t_d::_m_o_v_e(__q.c), __a) { } │ │ │ │ -203 │ │ │ │ -204#if __cplusplus > 202002L │ │ │ │ -205 template, │ │ │ │ -207 typename = _Uses<_Alloc>> │ │ │ │ -208 _s_t_a_c_k(_InputIterator __first, _InputIterator __last, const _Alloc& __a) │ │ │ │ -209 : c(__first, __last, __a) { } │ │ │ │ -210#endif │ │ │ │ -211#endif │ │ │ │ -212 │ │ │ │ -213 /** │ │ │ │ -214 * Returns true if the %stack is empty. │ │ │ │ -215 */ │ │ │ │ -216 _GLIBCXX_NODISCARD bool │ │ │ │ -_2_1_7 _e_m_p_t_y() const │ │ │ │ -218 { return c.empty(); } │ │ │ │ +182 return false; │ │ │ │ +183 } │ │ │ │ +184 │ │ │ │ +185 // return true if equal │ │ │ │ +186 template │ │ │ │ +187 bool __atomic_compare(const _Tp& __a, const _Tp& __b) │ │ │ │ +188 { │ │ │ │ +189 // TODO make this do the correct padding bit ignoring comparison │ │ │ │ +190 return __builtin_memcmp(&__a, &__b, sizeof(_Tp)) == 0; │ │ │ │ +191 } │ │ │ │ +192 │ │ │ │ +193 struct __waiter_pool_base │ │ │ │ +194 { │ │ │ │ +195 // Don't use std::hardware_destructive_interference_size here because we │ │ │ │ +196 // don't want the layout of library types to depend on compiler options. │ │ │ │ +197 static constexpr auto _S_align = 64; │ │ │ │ +198 │ │ │ │ +199 alignas(_S_align) __platform_wait_t _M_wait = 0; │ │ │ │ +200 │ │ │ │ +201#ifndef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +202 mutex _M_mtx; │ │ │ │ +203#endif │ │ │ │ +204 │ │ │ │ +205 alignas(_S_align) __platform_wait_t _M_ver = 0; │ │ │ │ +206 │ │ │ │ +207#ifndef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +208 __condvar _M_cv; │ │ │ │ +209#endif │ │ │ │ +210 __waiter_pool_base() = default; │ │ │ │ +211 │ │ │ │ +212 void │ │ │ │ +213 _M_enter_wait() noexcept │ │ │ │ +214 { __atomic_fetch_add(&_M_wait, 1, __ATOMIC_SEQ_CST); } │ │ │ │ +215 │ │ │ │ +216 void │ │ │ │ +217 _M_leave_wait() noexcept │ │ │ │ +218 { __atomic_fetch_sub(&_M_wait, 1, __ATOMIC_RELEASE); } │ │ │ │ 219 │ │ │ │ -220 /** Returns the number of elements in the %stack. */ │ │ │ │ -221 _GLIBCXX_NODISCARD │ │ │ │ -222 size_type │ │ │ │ -_2_2_3 _s_i_z_e() const │ │ │ │ -224 { return c.size(); } │ │ │ │ -225 │ │ │ │ -226 /** │ │ │ │ -227 * Returns a read/write reference to the data at the first │ │ │ │ -228 * element of the %stack. │ │ │ │ -229 */ │ │ │ │ -230 _GLIBCXX_NODISCARD │ │ │ │ -231 reference │ │ │ │ -_2_3_2 _t_o_p() │ │ │ │ -233 { │ │ │ │ -234 __glibcxx_requires_nonempty(); │ │ │ │ -235 return c.back(); │ │ │ │ -236 } │ │ │ │ -237 │ │ │ │ -238 /** │ │ │ │ -239 * Returns a read-only (constant) reference to the data at the first │ │ │ │ -240 * element of the %stack. │ │ │ │ -241 */ │ │ │ │ -242 _GLIBCXX_NODISCARD │ │ │ │ -243 const_reference │ │ │ │ -_2_4_4 _t_o_p() const │ │ │ │ -245 { │ │ │ │ -246 __glibcxx_requires_nonempty(); │ │ │ │ -247 return c.back(); │ │ │ │ -248 } │ │ │ │ -249 │ │ │ │ -250 /** │ │ │ │ -251 * @brief Add data to the top of the %stack. │ │ │ │ -252 * @param __x Data to be added. │ │ │ │ -253 * │ │ │ │ -254 * This is a typical %stack operation. The function creates an │ │ │ │ -255 * element at the top of the %stack and assigns the given data │ │ │ │ -256 * to it. The time complexity of the operation depends on the │ │ │ │ -257 * underlying sequence. │ │ │ │ -258 */ │ │ │ │ -259 void │ │ │ │ -_2_6_0 _p_u_s_h(const value_type& __x) │ │ │ │ -261 { c.push_back(__x); } │ │ │ │ -262 │ │ │ │ -263#if __cplusplus >= 201103L │ │ │ │ -264 void │ │ │ │ -265 _p_u_s_h(value_type&& __x) │ │ │ │ -266 { c.push_back(_s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -267 │ │ │ │ -268#if __cplusplus > 201402L │ │ │ │ -269 template │ │ │ │ -270 decltype(auto) │ │ │ │ -271 emplace(_Args&&... __args) │ │ │ │ -272 { return c.emplace_back(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ -273#else │ │ │ │ -274 template │ │ │ │ -275 void │ │ │ │ -276 emplace(_Args&&... __args) │ │ │ │ -277 { c.emplace_back(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(__args)...); } │ │ │ │ -278#endif │ │ │ │ -279#endif │ │ │ │ -280 │ │ │ │ -281 /** │ │ │ │ -282 * @brief Removes first element. │ │ │ │ -283 * │ │ │ │ -284 * This is a typical %stack operation. It shrinks the %stack │ │ │ │ -285 * by one. The time complexity of the operation depends on the │ │ │ │ -286 * underlying sequence. │ │ │ │ -287 * │ │ │ │ -288 * Note that no data is returned, and if the first element's │ │ │ │ -289 * data is needed, it should be retrieved before pop() is │ │ │ │ -290 * called. │ │ │ │ -291 */ │ │ │ │ -292 void │ │ │ │ -_2_9_3 _p_o_p() │ │ │ │ -294 { │ │ │ │ -295 __glibcxx_requires_nonempty(); │ │ │ │ -296 c.pop_back(); │ │ │ │ -297 } │ │ │ │ -298 │ │ │ │ -299#if __cplusplus >= 201103L │ │ │ │ -300 void │ │ │ │ -301 swap(_s_t_a_c_k& _____s) │ │ │ │ -302#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ -303 noexcept(_____i_s___n_o_t_h_r_o_w___s_w_a_p_p_a_b_l_e_<___S_e_q_u_e_n_c_e_>_:_:_v_a_l_u_e) │ │ │ │ -304#else │ │ │ │ -305 noexcept(_____i_s___n_o_t_h_r_o_w___s_w_a_p_p_a_b_l_e_<___T_p_>_:_:_v_a_l_u_e) │ │ │ │ -306#endif │ │ │ │ -307 { │ │ │ │ -308 using _s_t_d_:_:_s_w_a_p; │ │ │ │ -309 swap(c, _____s.c); │ │ │ │ -310 } │ │ │ │ -311#endif // __cplusplus >= 201103L │ │ │ │ -312 }; │ │ │ │ +220 bool │ │ │ │ +221 _M_waiting() const noexcept │ │ │ │ +222 { │ │ │ │ +223 __platform_wait_t __res; │ │ │ │ +224 __atomic_load(&_M_wait, &__res, __ATOMIC_SEQ_CST); │ │ │ │ +225 return __res != 0; │ │ │ │ +226 } │ │ │ │ +227 │ │ │ │ +228 void │ │ │ │ +229 _M_notify(__platform_wait_t* __addr, [[maybe_unused]] bool __all, │ │ │ │ +230 bool __bare) noexcept │ │ │ │ +231 { │ │ │ │ +232#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +233 if (__addr == &_M_ver) │ │ │ │ +234 { │ │ │ │ +235 __atomic_fetch_add(__addr, 1, __ATOMIC_SEQ_CST); │ │ │ │ +236 __all = true; │ │ │ │ +237 } │ │ │ │ +238 │ │ │ │ +239 if (__bare || _M_waiting()) │ │ │ │ +240 __platform_notify(__addr, __all); │ │ │ │ +241#else │ │ │ │ +242 { │ │ │ │ +243 lock_guard __l(_M_mtx); │ │ │ │ +244 __atomic_fetch_add(__addr, 1, __ATOMIC_RELAXED); │ │ │ │ +245 } │ │ │ │ +246 if (__bare || _M_waiting()) │ │ │ │ +247 _M_cv.notify_all(); │ │ │ │ +248#endif │ │ │ │ +249 } │ │ │ │ +250 │ │ │ │ +251 static __waiter_pool_base& │ │ │ │ +252 _S_for(const void* __addr) noexcept │ │ │ │ +253 { │ │ │ │ +254 constexpr uintptr_t __ct = 16; │ │ │ │ +255 static __waiter_pool_base __w[__ct]; │ │ │ │ +256 auto __key = (uintptr_t(__addr) >> 2) % __ct; │ │ │ │ +257 return __w[__key]; │ │ │ │ +258 } │ │ │ │ +259 }; │ │ │ │ +260 │ │ │ │ +261 struct __waiter_pool : __waiter_pool_base │ │ │ │ +262 { │ │ │ │ +263 void │ │ │ │ +264 _M_do_wait(const __platform_wait_t* __addr, __platform_wait_t __old) │ │ │ │ +noexcept │ │ │ │ +265 { │ │ │ │ +266#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +267 __platform_wait(__addr, __old); │ │ │ │ +268#else │ │ │ │ +269 __platform_wait_t __val; │ │ │ │ +270 __atomic_load(__addr, &__val, __ATOMIC_SEQ_CST); │ │ │ │ +271 if (__val == __old) │ │ │ │ +272 { │ │ │ │ +273 lock_guard __l(_M_mtx); │ │ │ │ +274 __atomic_load(__addr, &__val, __ATOMIC_RELAXED); │ │ │ │ +275 if (__val == __old) │ │ │ │ +276 _M_cv.wait(_M_mtx); │ │ │ │ +277 } │ │ │ │ +278#endif // __GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +279 } │ │ │ │ +280 }; │ │ │ │ +281 │ │ │ │ +282 template │ │ │ │ +283 struct __waiter_base │ │ │ │ +284 { │ │ │ │ +285 using __waiter_type = _Tp; │ │ │ │ +286 │ │ │ │ +287 __waiter_type& _M_w; │ │ │ │ +288 __platform_wait_t* _M_addr; │ │ │ │ +289 │ │ │ │ +290 template │ │ │ │ +291 static __platform_wait_t* │ │ │ │ +292 _S_wait_addr(const _Up* __a, __platform_wait_t* __b) │ │ │ │ +293 { │ │ │ │ +294 if constexpr (__platform_wait_uses_type<_Up>) │ │ │ │ +295 return reinterpret_cast<__platform_wait_t*>(const_cast<_Up*>(__a)); │ │ │ │ +296 else │ │ │ │ +297 return __b; │ │ │ │ +298 } │ │ │ │ +299 │ │ │ │ +300 static __waiter_type& │ │ │ │ +301 _S_for(const void* __addr) noexcept │ │ │ │ +302 { │ │ │ │ +303 static_assert(sizeof(__waiter_type) == sizeof(__waiter_pool_base)); │ │ │ │ +304 auto& res = __waiter_pool_base::_S_for(__addr); │ │ │ │ +305 return reinterpret_cast<__waiter_type&>(res); │ │ │ │ +306 } │ │ │ │ +307 │ │ │ │ +308 template │ │ │ │ +309 explicit __waiter_base(const _Up* __addr) noexcept │ │ │ │ +310 : _M_w(_S_for(__addr)) │ │ │ │ +311 , _M_addr(_S_wait_addr(__addr, &_M_w._M_ver)) │ │ │ │ +312 { } │ │ │ │ 313 │ │ │ │ -314#if __cpp_deduction_guides >= 201606 │ │ │ │ -315 template> │ │ │ │ -317 stack(_Container) -> stack; │ │ │ │ -318 │ │ │ │ -319 template> │ │ │ │ -321 stack(_Container, _Allocator) │ │ │ │ -322 -> stack; │ │ │ │ -323 │ │ │ │ -324#ifdef __cpp_lib_adaptor_iterator_pair_constructor │ │ │ │ -325 template::value_type, │ │ │ │ -328 typename = _RequireInputIter<_InputIterator>> │ │ │ │ -329 stack(_InputIterator, _InputIterator) -> stack<_ValT>; │ │ │ │ -330 │ │ │ │ -331 template::value_type, │ │ │ │ -334 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -335 typename = _RequireAllocator<_Allocator>> │ │ │ │ -336 stack(_InputIterator, _InputIterator, _Allocator) │ │ │ │ -337 -> stack<_ValT, deque<_ValT, _Allocator>>; │ │ │ │ -338#endif │ │ │ │ -339#endif │ │ │ │ -340 │ │ │ │ -341 /** │ │ │ │ -342 * @brief Stack equality comparison. │ │ │ │ -343 * @param __x A %stack. │ │ │ │ -344 * @param __y A %stack of the same type as @a __x. │ │ │ │ -345 * @return True iff the size and elements of the stacks are equal. │ │ │ │ -346 * │ │ │ │ -347 * This is an equivalence relation. Complexity and semantics │ │ │ │ -348 * depend on the underlying sequence type, but the expected rules │ │ │ │ -349 * are: this relation is linear in the size of the sequences, and │ │ │ │ -350 * stacks are considered equivalent if their sequences compare │ │ │ │ -351 * equal. │ │ │ │ -352 */ │ │ │ │ -353 template │ │ │ │ -354 _GLIBCXX_NODISCARD │ │ │ │ -355 inline bool │ │ │ │ -_3_5_6 operator==(const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __x, const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ -357 { return __x.c == __y.c; } │ │ │ │ -358 │ │ │ │ -359 /** │ │ │ │ -360 * @brief Stack ordering relation. │ │ │ │ -361 * @param __x A %stack. │ │ │ │ -362 * @param __y A %stack of the same type as @a x. │ │ │ │ -363 * @return True iff @a x is lexicographically less than @a __y. │ │ │ │ -364 * │ │ │ │ -365 * This is an total ordering relation. Complexity and semantics │ │ │ │ -366 * depend on the underlying sequence type, but the expected rules │ │ │ │ -367 * are: this relation is linear in the size of the sequences, the │ │ │ │ -368 * elements must be comparable with @c <, and │ │ │ │ -369 * std::lexicographical_compare() is usually used to make the │ │ │ │ -370 * determination. │ │ │ │ -371 */ │ │ │ │ -372 template │ │ │ │ -373 _GLIBCXX_NODISCARD │ │ │ │ -_3_7_4 inline bool │ │ │ │ -375 operator<(const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __x, const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ -376 { return __x.c < __y.c; } │ │ │ │ -377 │ │ │ │ -378 /// Based on operator== │ │ │ │ -379 template │ │ │ │ -380 _GLIBCXX_NODISCARD │ │ │ │ -381 inline bool │ │ │ │ -_3_8_2 operator!=(const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __x, const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ -383 { return !(__x == __y); } │ │ │ │ -384 │ │ │ │ -385 /// Based on operator< │ │ │ │ -386 template │ │ │ │ -387 _GLIBCXX_NODISCARD │ │ │ │ -388 inline bool │ │ │ │ -_3_8_9 operator>(const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __x, const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ -390 { return __y < __x; } │ │ │ │ -391 │ │ │ │ -392 /// Based on operator< │ │ │ │ -393 template │ │ │ │ -394 _GLIBCXX_NODISCARD │ │ │ │ -_3_9_5 inline bool │ │ │ │ -396 operator<=(const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __x, const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ -397 { return !(__y < __x); } │ │ │ │ -398 │ │ │ │ -399 /// Based on operator< │ │ │ │ -400 template │ │ │ │ -401 _GLIBCXX_NODISCARD │ │ │ │ -402 inline bool │ │ │ │ -_4_0_3 operator>=(const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __x, const _s_t_a_c_k_<___T_p_,_ ___S_e_q_>& __y) │ │ │ │ -404 { return !(__x < __y); } │ │ │ │ -405 │ │ │ │ -406#if __cpp_lib_three_way_comparison │ │ │ │ -407 template │ │ │ │ -408 [[nodiscard]] │ │ │ │ -409 inline compare_three_way_result_t<_Seq> │ │ │ │ -410 operator<=>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) │ │ │ │ -411 { return __x.c <=> __y.c; } │ │ │ │ -412#endif │ │ │ │ -413 │ │ │ │ -414#if __cplusplus >= 201103L │ │ │ │ -415 template │ │ │ │ -416 inline │ │ │ │ -417#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 │ │ │ │ -418 // Constrained free swap overload, see p0185r1 │ │ │ │ -419 typename enable_if<__is_swappable<_Seq>::value>::type │ │ │ │ -420#else │ │ │ │ +314 void │ │ │ │ +315 _M_notify(bool __all, bool __bare = false) noexcept │ │ │ │ +316 { _M_w._M_notify(_M_addr, __all, __bare); } │ │ │ │ +317 │ │ │ │ +318 template │ │ │ │ +320 static bool │ │ │ │ +321 _S_do_spin_v(__platform_wait_t* __addr, │ │ │ │ +322 const _Up& __old, _ValFn __vfn, │ │ │ │ +323 __platform_wait_t& __val, │ │ │ │ +324 _Spin __spin = _Spin{ }) │ │ │ │ +325 { │ │ │ │ +326 auto const __pred = [=] │ │ │ │ +327 { return !__detail::__atomic_compare(__old, __vfn()); }; │ │ │ │ +328 │ │ │ │ +329 if constexpr (__platform_wait_uses_type<_Up>) │ │ │ │ +330 { │ │ │ │ +331 __builtin_memcpy(&__val, &__old, sizeof(__val)); │ │ │ │ +332 } │ │ │ │ +333 else │ │ │ │ +334 { │ │ │ │ +335 __atomic_load(__addr, &__val, __ATOMIC_ACQUIRE); │ │ │ │ +336 } │ │ │ │ +337 return __atomic_spin(__pred, __spin); │ │ │ │ +338 } │ │ │ │ +339 │ │ │ │ +340 template │ │ │ │ +342 bool │ │ │ │ +343 _M_do_spin_v(const _Up& __old, _ValFn __vfn, │ │ │ │ +344 __platform_wait_t& __val, │ │ │ │ +345 _Spin __spin = _Spin{ }) │ │ │ │ +346 { return _S_do_spin_v(_M_addr, __old, __vfn, __val, __spin); } │ │ │ │ +347 │ │ │ │ +348 template │ │ │ │ +350 static bool │ │ │ │ +351 _S_do_spin(const __platform_wait_t* __addr, │ │ │ │ +352 _Pred __pred, │ │ │ │ +353 __platform_wait_t& __val, │ │ │ │ +354 _Spin __spin = _Spin{ }) │ │ │ │ +355 { │ │ │ │ +356 __atomic_load(__addr, &__val, __ATOMIC_ACQUIRE); │ │ │ │ +357 return __atomic_spin(__pred, __spin); │ │ │ │ +358 } │ │ │ │ +359 │ │ │ │ +360 template │ │ │ │ +362 bool │ │ │ │ +363 _M_do_spin(_Pred __pred, __platform_wait_t& __val, │ │ │ │ +364 _Spin __spin = _Spin{ }) │ │ │ │ +365 { return _S_do_spin(_M_addr, __pred, __val, __spin); } │ │ │ │ +366 }; │ │ │ │ +367 │ │ │ │ +368 template │ │ │ │ +369 struct __waiter : __waiter_base<__waiter_pool> │ │ │ │ +370 { │ │ │ │ +371 using __base_type = __waiter_base<__waiter_pool>; │ │ │ │ +372 │ │ │ │ +373 template │ │ │ │ +374 explicit __waiter(const _Tp* __addr) noexcept │ │ │ │ +375 : __base_type(__addr) │ │ │ │ +376 { │ │ │ │ +377 if constexpr (_EntersWait::value) │ │ │ │ +378 _M_w._M_enter_wait(); │ │ │ │ +379 } │ │ │ │ +380 │ │ │ │ +381 ~__waiter() │ │ │ │ +382 { │ │ │ │ +383 if constexpr (_EntersWait::value) │ │ │ │ +384 _M_w._M_leave_wait(); │ │ │ │ +385 } │ │ │ │ +386 │ │ │ │ +387 template │ │ │ │ +388 void │ │ │ │ +389 _M_do_wait_v(_Tp __old, _ValFn __vfn) │ │ │ │ +390 { │ │ │ │ +391 do │ │ │ │ +392 { │ │ │ │ +393 __platform_wait_t __val; │ │ │ │ +394 if (__base_type::_M_do_spin_v(__old, __vfn, __val)) │ │ │ │ +395 return; │ │ │ │ +396 __base_type::_M_w._M_do_wait(__base_type::_M_addr, __val); │ │ │ │ +397 } │ │ │ │ +398 while (__detail::__atomic_compare(__old, __vfn())); │ │ │ │ +399 } │ │ │ │ +400 │ │ │ │ +401 template │ │ │ │ +402 void │ │ │ │ +403 _M_do_wait(_Pred __pred) noexcept │ │ │ │ +404 { │ │ │ │ +405 do │ │ │ │ +406 { │ │ │ │ +407 __platform_wait_t __val; │ │ │ │ +408 if (__base_type::_M_do_spin(__pred, __val)) │ │ │ │ +409 return; │ │ │ │ +410 __base_type::_M_w._M_do_wait(__base_type::_M_addr, __val); │ │ │ │ +411 } │ │ │ │ +412 while (!__pred()); │ │ │ │ +413 } │ │ │ │ +414 }; │ │ │ │ +415 │ │ │ │ +416 using __enters_wait = __waiter; │ │ │ │ +417 using __bare_wait = __waiter; │ │ │ │ +418 } // namespace __detail │ │ │ │ +419 │ │ │ │ +420 template │ │ │ │ 421 void │ │ │ │ -422#endif │ │ │ │ -423 swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y) │ │ │ │ -424 noexcept(noexcept(__x.swap(__y))) │ │ │ │ -425 { __x.swap(__y); } │ │ │ │ -426 │ │ │ │ -427 template │ │ │ │ -428 struct uses_allocator, _Alloc> │ │ │ │ -429 : public uses_allocator<_Seq, _Alloc>::type { }; │ │ │ │ -430#endif // __cplusplus >= 201103L │ │ │ │ -431 │ │ │ │ -432_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -433} // namespace │ │ │ │ -434 │ │ │ │ -435#endif /* _STL_STACK_H */ │ │ │ │ -_c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ -_d_e_b_u_g_._h │ │ │ │ -_s_t_d_:_:_m_o_v_e │ │ │ │ -constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept │ │ │ │ -Convert a value to an rvalue. │ │ │ │ -DDeeffiinniittiioonn _m_o_v_e_._h_:_9_7 │ │ │ │ -_s_t_d_:_:_s_w_a_p │ │ │ │ -void swap(any &__x, any &__y) noexcept │ │ │ │ -Exchange the states of two any objects. │ │ │ │ -DDeeffiinniittiioonn _a_n_y_:_4_2_9 │ │ │ │ +422 __atomic_wait_address_v(const _Tp* __addr, _Tp __old, │ │ │ │ +423 _ValFn __vfn) noexcept │ │ │ │ +424 { │ │ │ │ +425 __detail::__enters_wait __w(__addr); │ │ │ │ +426 __w._M_do_wait_v(__old, __vfn); │ │ │ │ +427 } │ │ │ │ +428 │ │ │ │ +429 template │ │ │ │ +430 void │ │ │ │ +431 __atomic_wait_address(const _Tp* __addr, _Pred __pred) noexcept │ │ │ │ +432 { │ │ │ │ +433 __detail::__enters_wait __w(__addr); │ │ │ │ +434 __w._M_do_wait(__pred); │ │ │ │ +435 } │ │ │ │ +436 │ │ │ │ +437 // This call is to be used by atomic types which track contention │ │ │ │ +externally │ │ │ │ +438 template │ │ │ │ +439 void │ │ │ │ +440 __atomic_wait_address_bare(const __detail::__platform_wait_t* __addr, │ │ │ │ +441 _Pred __pred) noexcept │ │ │ │ +442 { │ │ │ │ +443#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +444 do │ │ │ │ +445 { │ │ │ │ +446 __detail::__platform_wait_t __val; │ │ │ │ +447 if (__detail::__bare_wait::_S_do_spin(__addr, __pred, __val)) │ │ │ │ +448 return; │ │ │ │ +449 __detail::__platform_wait(__addr, __val); │ │ │ │ +450 } │ │ │ │ +451 while (!__pred()); │ │ │ │ +452#else // !_GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +453 __detail::__bare_wait __w(__addr); │ │ │ │ +454 __w._M_do_wait(__pred); │ │ │ │ +455#endif │ │ │ │ +456 } │ │ │ │ +457 │ │ │ │ +458 template │ │ │ │ +459 void │ │ │ │ +460 __atomic_notify_address(const _Tp* __addr, bool __all) noexcept │ │ │ │ +461 { │ │ │ │ +462 __detail::__bare_wait __w(__addr); │ │ │ │ +463 __w._M_notify(__all); │ │ │ │ +464 } │ │ │ │ +465 │ │ │ │ +466 // This call is to be used by atomic types which track contention │ │ │ │ +externally │ │ │ │ +467 inline void │ │ │ │ +468 __atomic_notify_address_bare(const __detail::__platform_wait_t* __addr, │ │ │ │ +469 bool __all) noexcept │ │ │ │ +470 { │ │ │ │ +471#ifdef _GLIBCXX_HAVE_PLATFORM_WAIT │ │ │ │ +472 __detail::__platform_notify(__addr, __all); │ │ │ │ +473#else │ │ │ │ +474 __detail::__bare_wait __w(__addr); │ │ │ │ +475 __w._M_notify(__all, true); │ │ │ │ +476#endif │ │ │ │ +477 } │ │ │ │ +478_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ +479} // namespace std │ │ │ │ +480#endif // GTHREADS || LINUX_FUTEX │ │ │ │ +481#endif // _GLIBCXX_ATOMIC_WAIT_H │ │ │ │ +_c_e_r_r_n_o │ │ │ │ +_s_t_d___m_u_t_e_x_._h │ │ │ │ +_f_u_n_c_t_i_o_n_a_l___h_a_s_h_._h │ │ │ │ +_f_u_n_c_t_e_x_c_e_p_t_._h │ │ │ │ +_c_+_+_c_o_n_f_i_g_._h │ │ │ │ _s_t_d │ │ │ │ ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_i_s___s_a_m_e │ │ │ │ -is_same │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_3_9_9 │ │ │ │ -_s_t_d_:_:_s_t_a_c_k │ │ │ │ -A standard container giving FILO behavior. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_1_0_0 │ │ │ │ -_s_t_d_:_:_s_t_a_c_k_:_:_p_o_p │ │ │ │ -void pop() │ │ │ │ -Removes first element. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_2_9_3 │ │ │ │ -_s_t_d_:_:_s_t_a_c_k_:_:_s_i_z_e │ │ │ │ -size_type size() const │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_2_2_3 │ │ │ │ -_s_t_d_:_:_s_t_a_c_k_:_:_p_u_s_h │ │ │ │ -void push(const value_type &__x) │ │ │ │ -Add data to the top of the stack. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_2_6_0 │ │ │ │ -_s_t_d_:_:_s_t_a_c_k_:_:_e_m_p_t_y │ │ │ │ -bool empty() const │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_2_1_7 │ │ │ │ -_s_t_d_:_:_s_t_a_c_k_:_:_t_o_p │ │ │ │ -const_reference top() const │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_2_4_4 │ │ │ │ -_s_t_d_:_:_s_t_a_c_k_:_:_s_t_a_c_k │ │ │ │ -stack() │ │ │ │ -Default constructor creates no elements. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_1_6_2 │ │ │ │ -_s_t_d_:_:_s_t_a_c_k_:_:_t_o_p │ │ │ │ -reference top() │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_t_a_c_k_._h_:_2_3_2 │ │ │ │ -_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ -DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ +_c_s_t_d_i_n_t │ │ │ │ +_n_u_m_e_r_i_c___t_r_a_i_t_s_._h │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_l___s_t_a_c_k_._h │ │ │ │ + * _a_t_o_m_i_c___w_a_i_t_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00398.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stl_set.h File Reference │ │ │ +libstdc++: concept_check.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,81 +46,219 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00398.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ -Namespaces | │ │ │ -Functions
│ │ │ -
stl_set.h File Reference
│ │ │ +Macros
│ │ │ +
concept_check.h File Reference
│ │ │
│ │ │
│ │ │ │ │ │

Go to the source code of this file.

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

│ │ │ -Classes

class  std::set< _Key, _Compare, _Alloc >
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ -

│ │ │ -Namespaces

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

│ │ │ -Functions

template<typename _Key , typename _Compare , typename _Alloc >
bool std::operator!= (const set< _Key, _Compare, _Alloc > &__x, const set< _Key, _Compare, _Alloc > &__y)
 
template<typename _Key , typename _Compare , typename _Alloc >
bool std::operator< (const set< _Key, _Compare, _Alloc > &__x, const set< _Key, _Compare, _Alloc > &__y)
 
template<typename _Key , typename _Compare , typename _Alloc >
bool std::operator<= (const set< _Key, _Compare, _Alloc > &__x, const set< _Key, _Compare, _Alloc > &__y)
 
template<typename _Key , typename _Compare , typename _Alloc >
bool std::operator== (const set< _Key, _Compare, _Alloc > &__x, const set< _Key, _Compare, _Alloc > &__y)
 
template<typename _Key , typename _Compare , typename _Alloc >
bool std::operator> (const set< _Key, _Compare, _Alloc > &__x, const set< _Key, _Compare, _Alloc > &__y)
 
template<typename _Key , typename _Compare , typename _Alloc >
bool std::operator>= (const set< _Key, _Compare, _Alloc > &__x, const set< _Key, _Compare, _Alloc > &__y)
 
│ │ │ -template<typename _InputIterator , typename _Allocator , typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>>
 std::set (_InputIterator, _InputIterator, _Allocator) -> set< typename iterator_traits< _InputIterator >::value_type, less< typename iterator_traits< _InputIterator >::value_type >, _Allocator >
 
│ │ │ -template<typename _InputIterator , typename _Compare = less<typename iterator_traits<_InputIterator>::value_type>, typename _Allocator = allocator<typename iterator_traits<_InputIterator>::value_type>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocator<_Compare>, typename = _RequireAllocator<_Allocator>>
 std::set (_InputIterator, _InputIterator, _Compare=_Compare(), _Allocator=_Allocator()) -> set< typename iterator_traits< _InputIterator >::value_type, _Compare, _Allocator >
 
│ │ │ -template<typename _Key , typename _Allocator , typename = _RequireAllocator<_Allocator>>
 std::set (initializer_list< _Key >, _Allocator) -> set< _Key, less< _Key >, _Allocator >
 
│ │ │ -template<typename _Key , typename _Compare = less<_Key>, typename _Allocator = allocator<_Key>, typename = _RequireNotAllocator<_Compare>, typename = _RequireAllocator<_Allocator>>
 std::set (initializer_list< _Key >, _Compare=_Compare(), _Allocator=_Allocator()) -> set< _Key, _Compare, _Allocator >
 
template<typename _Key , typename _Compare , typename _Alloc >
void std::swap (set< _Key, _Compare, _Alloc > &__x, set< _Key, _Compare, _Alloc > &__y) noexcept(/*conditional */)
 

│ │ │ +Macros

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

Detailed Description

│ │ │ -

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

│ │ │ +

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

│ │ │ │ │ │ -

Definition in file stl_set.h.

│ │ │ -
│ │ │ +

Definition in file concept_check.h.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ __glibcxx_class_requires

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

Definition at line 49 of file concept_check.h.

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

◆ __glibcxx_class_requires2

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

Definition at line 50 of file concept_check.h.

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

◆ __glibcxx_class_requires3

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

Definition at line 51 of file concept_check.h.

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

◆ __glibcxx_class_requires4

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

Definition at line 52 of file concept_check.h.

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

◆ __glibcxx_function_requires

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

Definition at line 48 of file concept_check.h.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,72 +1,52 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -stl_set.h File Reference │ │ │ │ +_M_a_c_r_o_s │ │ │ │ +concept_check.h File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_s_e_t_<_ ___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_ _> │ │ │ │ +MMaaccrrooss │ │ │ │ +#define  _____g_l_i_b_c_x_x___c_l_a_s_s___r_e_q_u_i_r_e_s(_a, _b) │ │ │ │   │ │ │ │ -NNaammeessppaacceess │ │ │ │ -namespace   _s_t_d │ │ │ │ +#define  _____g_l_i_b_c_x_x___c_l_a_s_s___r_e_q_u_i_r_e_s_2(_a, _b, _c) │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Compare , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _s_e_t< ___K_e_y, _Compare, _Alloc > &__x, const _s_e_t< │ │ │ │ - ___K_e_y, _Compare, _Alloc > &__y) │ │ │ │ +#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) │ │ │ │   │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Compare , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _s_e_t< ___K_e_y, _Compare, _Alloc > &__x, const _s_e_t< │ │ │ │ - ___K_e_y, _Compare, _Alloc > &__y) │ │ │ │ +#define  _____g_l_i_b_c_x_x___c_l_a_s_s___r_e_q_u_i_r_e_s_4(_a, _b, _c, _d, _e) │ │ │ │   │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Compare , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _s_e_t< ___K_e_y, _Compare, _Alloc > &__x, const _s_e_t< │ │ │ │ - ___K_e_y, _Compare, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Compare , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _s_e_t< ___K_e_y, _Compare, _Alloc > &__x, const _s_e_t< │ │ │ │ - ___K_e_y, _Compare, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Compare , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _s_e_t< ___K_e_y, _Compare, _Alloc > &__x, const _s_e_t< │ │ │ │ - ___K_e_y, _Compare, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Compare , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ -bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _s_e_t< ___K_e_y, _Compare, _Alloc > &__x, const _s_e_t< │ │ │ │ - ___K_e_y, _Compare, _Alloc > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::sseett (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, ___A_l_l_o_c_a_t_o_r) -> _s_e_t< _t_y_p_e_n_a_m_e │ │ │ │ - _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type, _l_e_s_s< _t_y_p_e_n_a_m_e │ │ │ │ - _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r >::value_type >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e _Compare = less::value_type>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = │ │ │ │ -allocator::value_type>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Compare>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::sseett (___I_n_p_u_t_I_t_e_r_a_t_o_r, ___I_n_p_u_t_I_t_e_r_a_t_o_r, _Compare=_Compare(), │ │ │ │ - ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _s_e_t< _t_y_p_e_n_a_m_e _i_t_e_r_a_t_o_r___t_r_a_i_t_s< ___I_n_p_u_t_I_t_e_r_a_t_o_r │ │ │ │ - >::value_type, _Compare, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::sseett (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< ___K_e_y >, ___A_l_l_o_c_a_t_o_r) -> _s_e_t< ___K_e_y, _l_e_s_s< ___K_e_y │ │ │ │ - >, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Compare = less<_Key>, _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r = │ │ │ │ -allocator<_Key>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Compare>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireAllocator<_Allocator>> │ │ │ │ -   ssttdd::::sseett (_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t< ___K_e_y >, _Compare=_Compare(), │ │ │ │ - ___A_l_l_o_c_a_t_o_r=___A_l_l_o_c_a_t_o_r()) -> _s_e_t< ___K_e_y, _Compare, ___A_l_l_o_c_a_t_o_r > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___K_e_y , _t_y_p_e_n_a_m_e _Compare , _t_y_p_e_n_a_m_e _Alloc > │ │ │ │ -_v_o_i_d  _s_t_d_:_:_s_w_a_p (_s_e_t< ___K_e_y, _Compare, _Alloc > &__x, _s_e_t< ___K_e_y, _Compare, │ │ │ │ - _Alloc > &__y) noexcept(/*_c_o_n_d_i_t_i_o_n_a_l */) │ │ │ │ +#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_l___s_e_t_._h. │ │ │ │ +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 ********** │ │ │ │ +********** _?◆_? ____gglliibbccxxxx__ccllaassss__rreeqquuiirreess ********** │ │ │ │ +#define __glibcxx_class_requires (   _a, │ │ │ │ +   _b  │ │ │ │ + ) │ │ │ │ +Definition at line _4_9 of file _c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** _?◆_? ____gglliibbccxxxx__ccllaassss__rreeqquuiirreess22 ********** │ │ │ │ +#define __glibcxx_class_requires2 (   _a, │ │ │ │ +   _b, │ │ │ │ +   _c  │ │ │ │ + ) │ │ │ │ +Definition at line _5_0 of file _c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** _?◆_? ____gglliibbccxxxx__ccllaassss__rreeqquuiirreess33 ********** │ │ │ │ +#define __glibcxx_class_requires3 (   _a, │ │ │ │ +   _b, │ │ │ │ +   _c, │ │ │ │ +   _d  │ │ │ │ + ) │ │ │ │ +Definition at line _5_1 of file _c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** _?◆_? ____gglliibbccxxxx__ccllaassss__rreeqquuiirreess44 ********** │ │ │ │ +#define __glibcxx_class_requires4 (   _a, │ │ │ │ +   _b, │ │ │ │ +   _c, │ │ │ │ +   _d, │ │ │ │ +   _e  │ │ │ │ + ) │ │ │ │ +Definition at line _5_2 of file _c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ +********** _?◆_? ____gglliibbccxxxx__ffuunnccttiioonn__rreeqquuiirreess ********** │ │ │ │ +#define __glibcxx_function_requires (   ...... ) │ │ │ │ +Definition at line _4_8 of file _c_o_n_c_e_p_t___c_h_e_c_k_._h. │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_l___s_e_t_._h │ │ │ │ + * _c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00398_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stl_set.h Source File │ │ │ +libstdc++: concept_check.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,18 +45,18 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stl_set.h
│ │ │ +
concept_check.h
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Set implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// Concept-checking control -*- C++ -*-
│ │ │
2
│ │ │
3// Copyright (C) 2001-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │ @@ -71,1308 +71,78 @@ │ │ │
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_set.h
│ │ │ -
52 * This is an internal header file, included by other library headers.
│ │ │ -
53 * Do not attempt to use it directly. @headername{set}
│ │ │ -
54 */
│ │ │ +
24
│ │ │ +
25/** @file bits/concept_check.h
│ │ │ +
26 * This is an internal header file, included by other library headers.
│ │ │ +
27 * Do not attempt to use it directly. @headername{iterator}
│ │ │ +
28 */
│ │ │ +
29
│ │ │ +
30#ifndef _CONCEPT_CHECK_H
│ │ │ +
31#define _CONCEPT_CHECK_H 1
│ │ │ +
32
│ │ │ +
33#pragma GCC system_header
│ │ │ +
34
│ │ │ +
35#include <bits/c++config.h>
│ │ │ +
36
│ │ │ +
37// All places in libstdc++-v3 where these are used, or /might/ be used, or
│ │ │ +
38// don't need to be used, or perhaps /should/ be used, are commented with
│ │ │ +
39// "concept requirements" (and maybe some more text). So grep like crazy
│ │ │ +
40// if you're looking for additional places to use these.
│ │ │ +
41
│ │ │ +
42// Concept-checking code is off by default unless users turn it on via
│ │ │ +
43// configure options or editing c++config.h.
│ │ │ +
44// It is not supported for freestanding implementations.
│ │ │ +
45
│ │ │ +
46#if !defined(_GLIBCXX_CONCEPT_CHECKS)
│ │ │ +
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#ifndef _STL_SET_H
│ │ │ -
57#define _STL_SET_H 1
│ │ │ -
58
│ │ │ -
59#include <bits/concept_check.h>
│ │ │ -
60#if __cplusplus >= 201103L
│ │ │ -
61#include <initializer_list>
│ │ │ -
62#endif
│ │ │ -
63
│ │ │ -
64namespace std _GLIBCXX_VISIBILITY(default)
│ │ │ -
65{
│ │ │ -
66_GLIBCXX_BEGIN_NAMESPACE_VERSION
│ │ │ -
67_GLIBCXX_BEGIN_NAMESPACE_CONTAINER
│ │ │ -
68
│ │ │ -
69 template<typename _Key, typename _Compare, typename _Alloc>
│ │ │ -
70 class multiset;
│ │ │ -
71
│ │ │ -
72 /**
│ │ │ -
73 * @brief A standard container made up of unique keys, which can be
│ │ │ -
74 * retrieved in logarithmic time.
│ │ │ -
75 *
│ │ │ -
76 * @ingroup associative_containers
│ │ │ -
77 * @headerfile set
│ │ │ -
78 * @since C++98
│ │ │ -
79 *
│ │ │ -
80 * @tparam _Key Type of key objects.
│ │ │ -
81 * @tparam _Compare Comparison function object type, defaults to less<_Key>.
│ │ │ -
82 * @tparam _Alloc Allocator type, defaults to allocator<_Key>.
│ │ │ -
83 *
│ │ │ -
84 * Meets the requirements of a <a href="tables.html#65">container</a>, a
│ │ │ -
85 * <a href="tables.html#66">reversible container</a>, and an
│ │ │ -
86 * <a href="tables.html#69">associative container</a> (using unique keys).
│ │ │ -
87 *
│ │ │ -
88 * Sets support bidirectional iterators.
│ │ │ -
89 *
│ │ │ -
90 * The private tree data is declared exactly the same way for set and
│ │ │ -
91 * multiset; the distinction is made entirely in how the tree functions are
│ │ │ -
92 * called (*_unique versus *_equal, same as the standard).
│ │ │ -
93 */
│ │ │ -
94 template<typename _Key, typename _Compare = std::less<_Key>,
│ │ │ -
95 typename _Alloc = std::allocator<_Key> >
│ │ │ -
│ │ │ -
96 class set
│ │ │ -
97 {
│ │ │ -
98#ifdef _GLIBCXX_CONCEPT_CHECKS
│ │ │ -
99 // concept requirements
│ │ │ -
100 typedef typename _Alloc::value_type _Alloc_value_type;
│ │ │ -
101# if __cplusplus < 201103L
│ │ │ -
102 __glibcxx_class_requires(_Key, _SGIAssignableConcept)
│ │ │ -
103# endif
│ │ │ -
104 __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
│ │ │ -
105 _BinaryFunctionConcept)
│ │ │ -
106 __glibcxx_class_requires2(_Key, _Alloc_value_type, _SameTypeConcept)
│ │ │ -
107#endif
│ │ │ -
108
│ │ │ -
109#if __cplusplus >= 201103L
│ │ │ -
110 static_assert(is_same<typename remove_cv<_Key>::type, _Key>::value,
│ │ │ -
111 "std::set must have a non-const, non-volatile value_type");
│ │ │ -
112# if __cplusplus > 201703L || defined __STRICT_ANSI__
│ │ │ - │ │ │ -
114 "std::set must have the same value_type as its allocator");
│ │ │ -
115# endif
│ │ │ -
116#endif
│ │ │ -
117
│ │ │ -
118 public:
│ │ │ -
119 // typedefs:
│ │ │ -
120 ///@{
│ │ │ -
121 /// Public typedefs.
│ │ │ -
122 typedef _Key key_type;
│ │ │ - │ │ │ -
124 typedef _Compare key_compare;
│ │ │ -
125 typedef _Compare value_compare;
│ │ │ -
126 typedef _Alloc allocator_type;
│ │ │ -
127 ///@}
│ │ │ -
128
│ │ │ -
129 private:
│ │ │ - │ │ │ -
131 rebind<_Key>::other _Key_alloc_type;
│ │ │ -
132
│ │ │ - │ │ │ -
134 key_compare, _Key_alloc_type> _Rep_type;
│ │ │ -
135 _Rep_type _M_t; // Red-black tree representing set.
│ │ │ -
136
│ │ │ - │ │ │ -
138
│ │ │ -
139 public:
│ │ │ -
140 ///@{
│ │ │ -
141 /// Iterator-related typedefs.
│ │ │ - │ │ │ -
143 typedef typename _Alloc_traits::const_pointer const_pointer;
│ │ │ -
144 typedef typename _Alloc_traits::reference reference;
│ │ │ -
145 typedef typename _Alloc_traits::const_reference const_reference;
│ │ │ -
146 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
147 // DR 103. set::iterator is required to be modifiable,
│ │ │ -
148 // but this allows modification of keys.
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
153 typedef typename _Rep_type::size_type size_type;
│ │ │ -
154 typedef typename _Rep_type::difference_type difference_type;
│ │ │ -
155 ///@}
│ │ │ -
156
│ │ │ -
157#if __cplusplus > 201402L
│ │ │ -
158 using node_type = typename _Rep_type::node_type;
│ │ │ -
159 using insert_return_type = typename _Rep_type::insert_return_type;
│ │ │ -
160#endif
│ │ │ -
161
│ │ │ -
162 // allocation/deallocation
│ │ │ -
163 /**
│ │ │ -
164 * @brief Default constructor creates no elements.
│ │ │ -
165 */
│ │ │ -
166#if __cplusplus < 201103L
│ │ │ -
167 set() : _M_t() { }
│ │ │ -
168#else
│ │ │ -
169 set() = default;
│ │ │ -
170#endif
│ │ │ -
171
│ │ │ -
172 /**
│ │ │ -
173 * @brief Creates a %set with no elements.
│ │ │ -
174 * @param __comp Comparator to use.
│ │ │ -
175 * @param __a An allocator object.
│ │ │ -
176 */
│ │ │ -
177 explicit
│ │ │ -
│ │ │ -
178 set(const _Compare& __comp,
│ │ │ -
179 const allocator_type& __a = allocator_type())
│ │ │ -
180 : _M_t(__comp, _Key_alloc_type(__a)) { }
│ │ │ -
│ │ │ -
181
│ │ │ -
182 /**
│ │ │ -
183 * @brief Builds a %set from a range.
│ │ │ -
184 * @param __first An input iterator.
│ │ │ -
185 * @param __last An input iterator.
│ │ │ -
186 *
│ │ │ -
187 * Create a %set consisting of copies of the elements from
│ │ │ -
188 * [__first,__last). This is linear in N if the range is
│ │ │ -
189 * already sorted, and NlogN otherwise (where N is
│ │ │ -
190 * distance(__first,__last)).
│ │ │ -
191 */
│ │ │ -
192 template<typename _InputIterator>
│ │ │ -
│ │ │ - │ │ │ -
194 : _M_t()
│ │ │ -
195 { _M_t._M_insert_range_unique(__first, __last); }
│ │ │ -
│ │ │ -
196
│ │ │ -
197 /**
│ │ │ -
198 * @brief Builds a %set from a range.
│ │ │ -
199 * @param __first An input iterator.
│ │ │ -
200 * @param __last An input iterator.
│ │ │ -
201 * @param __comp A comparison functor.
│ │ │ -
202 * @param __a An allocator object.
│ │ │ -
203 *
│ │ │ -
204 * Create a %set consisting of copies of the elements from
│ │ │ -
205 * [__first,__last). This is linear in N if the range is
│ │ │ -
206 * already sorted, and NlogN otherwise (where N is
│ │ │ -
207 * distance(__first,__last)).
│ │ │ -
208 */
│ │ │ -
209 template<typename _InputIterator>
│ │ │ -
│ │ │ - │ │ │ -
211 const _Compare& __comp,
│ │ │ -
212 const allocator_type& __a = allocator_type())
│ │ │ -
213 : _M_t(__comp, _Key_alloc_type(__a))
│ │ │ -
214 { _M_t._M_insert_range_unique(__first, __last); }
│ │ │ -
│ │ │ -
215
│ │ │ -
216 /**
│ │ │ -
217 * @brief %Set copy constructor.
│ │ │ -
218 *
│ │ │ -
219 * Whether the allocator is copied depends on the allocator traits.
│ │ │ -
220 */
│ │ │ -
221#if __cplusplus < 201103L
│ │ │ -
222 set(const set& __x)
│ │ │ -
223 : _M_t(__x._M_t) { }
│ │ │ -
224#else
│ │ │ -
225 set(const set&) = default;
│ │ │ -
226
│ │ │ -
227 /**
│ │ │ -
228 * @brief %Set move constructor
│ │ │ -
229 *
│ │ │ -
230 * The newly-created %set contains the exact contents of the moved
│ │ │ -
231 * instance. The moved instance is a valid, but unspecified, %set.
│ │ │ -
232 */
│ │ │ -
233 set(set&&) = default;
│ │ │ -
234
│ │ │ -
235 /**
│ │ │ -
236 * @brief Builds a %set from an initializer_list.
│ │ │ -
237 * @param __l An initializer_list.
│ │ │ -
238 * @param __comp A comparison functor.
│ │ │ -
239 * @param __a An allocator object.
│ │ │ -
240 *
│ │ │ -
241 * Create a %set consisting of copies of the elements in the list.
│ │ │ -
242 * This is linear in N if the list is already sorted, and NlogN
│ │ │ -
243 * otherwise (where N is @a __l.size()).
│ │ │ -
244 */
│ │ │ -
│ │ │ - │ │ │ -
246 const _Compare& __comp = _Compare(),
│ │ │ -
247 const allocator_type& __a = allocator_type())
│ │ │ -
248 : _M_t(__comp, _Key_alloc_type(__a))
│ │ │ -
249 { _M_t._M_insert_range_unique(__l.begin(), __l.end()); }
│ │ │ -
│ │ │ -
250
│ │ │ -
251 /// Allocator-extended default constructor.
│ │ │ -
252 explicit
│ │ │ -
│ │ │ -
253 set(const allocator_type& __a)
│ │ │ -
254 : _M_t(_Key_alloc_type(__a)) { }
│ │ │ -
│ │ │ -
255
│ │ │ -
256 /// Allocator-extended copy constructor.
│ │ │ -
│ │ │ - │ │ │ -
258 : _M_t(__x._M_t, _Key_alloc_type(__a)) { }
│ │ │ -
│ │ │ -
259
│ │ │ -
260 /// Allocator-extended move constructor.
│ │ │ -
│ │ │ - │ │ │ - │ │ │ -
263 && _Alloc_traits::_S_always_equal())
│ │ │ -
264 : _M_t(std::move(__x._M_t), _Key_alloc_type(__a)) { }
│ │ │ -
│ │ │ -
265
│ │ │ -
266 /// Allocator-extended initialier-list constructor.
│ │ │ -
│ │ │ - │ │ │ -
268 : _M_t(_Key_alloc_type(__a))
│ │ │ -
269 { _M_t._M_insert_range_unique(__l.begin(), __l.end()); }
│ │ │ -
│ │ │ -
270
│ │ │ -
271 /// Allocator-extended range constructor.
│ │ │ -
272 template<typename _InputIterator>
│ │ │ -
│ │ │ - │ │ │ -
274 const allocator_type& __a)
│ │ │ -
275 : _M_t(_Key_alloc_type(__a))
│ │ │ -
276 { _M_t._M_insert_range_unique(__first, __last); }
│ │ │ -
│ │ │ -
277
│ │ │ -
278 /**
│ │ │ -
279 * The dtor only erases the elements, and note that if the elements
│ │ │ -
280 * themselves are pointers, the pointed-to memory is not touched in any
│ │ │ -
281 * way. Managing the pointer is the user's responsibility.
│ │ │ -
282 */
│ │ │ -
283 ~set() = default;
│ │ │ -
284#endif
│ │ │ -
285
│ │ │ -
286 /**
│ │ │ -
287 * @brief %Set assignment operator.
│ │ │ -
288 *
│ │ │ -
289 * Whether the allocator is copied depends on the allocator traits.
│ │ │ -
290 */
│ │ │ -
291#if __cplusplus < 201103L
│ │ │ -
292 set&
│ │ │ -
293 operator=(const set& __x)
│ │ │ -
294 {
│ │ │ -
295 _M_t = __x._M_t;
│ │ │ -
296 return *this;
│ │ │ -
297 }
│ │ │ -
298#else
│ │ │ -
299 set&
│ │ │ -
300 operator=(const set&) = default;
│ │ │ -
301
│ │ │ -
302 /// Move assignment operator.
│ │ │ -
303 set&
│ │ │ -
304 operator=(set&&) = default;
│ │ │ -
305
│ │ │ -
306 /**
│ │ │ -
307 * @brief %Set list assignment operator.
│ │ │ -
308 * @param __l An initializer_list.
│ │ │ -
309 *
│ │ │ -
310 * This function fills a %set with copies of the elements in the
│ │ │ -
311 * initializer list @a __l.
│ │ │ -
312 *
│ │ │ -
313 * Note that the assignment completely changes the %set and
│ │ │ -
314 * that the resulting %set's size is the same as the number
│ │ │ -
315 * of elements assigned.
│ │ │ -
316 */
│ │ │ -
317 set&
│ │ │ -
│ │ │ - │ │ │ -
319 {
│ │ │ -
320 _M_t._M_assign_unique(__l.begin(), __l.end());
│ │ │ -
321 return *this;
│ │ │ -
322 }
│ │ │ -
│ │ │ -
323#endif
│ │ │ -
324
│ │ │ -
325 // accessors:
│ │ │ -
326
│ │ │ -
327 /// Returns the comparison object with which the %set was constructed.
│ │ │ - │ │ │ -
│ │ │ -
329 key_comp() const
│ │ │ -
330 { return _M_t.key_comp(); }
│ │ │ -
│ │ │ -
331 /// Returns the comparison object with which the %set was constructed.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
334 { return _M_t.key_comp(); }
│ │ │ -
│ │ │ -
335 /// Returns the allocator object with which the %set was constructed.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
338 { return allocator_type(_M_t.get_allocator()); }
│ │ │ -
│ │ │ -
339
│ │ │ -
340 /**
│ │ │ -
341 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
342 * element in the %set. Iteration is done in ascending order according
│ │ │ -
343 * to the keys.
│ │ │ -
344 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
347 { return _M_t.begin(); }
│ │ │ -
│ │ │ -
348
│ │ │ -
349 /**
│ │ │ -
350 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
351 * element in the %set. Iteration is done in ascending order according
│ │ │ -
352 * to the keys.
│ │ │ -
353 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
356 { return _M_t.end(); }
│ │ │ -
│ │ │ -
357
│ │ │ -
358 /**
│ │ │ -
359 * Returns a read-only (constant) iterator that points to the last
│ │ │ -
360 * element in the %set. Iteration is done in descending order according
│ │ │ -
361 * to the keys.
│ │ │ -
362 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
365 { return _M_t.rbegin(); }
│ │ │ -
│ │ │ -
366
│ │ │ -
367 /**
│ │ │ -
368 * Returns a read-only (constant) reverse iterator that points to the
│ │ │ -
369 * last pair in the %set. Iteration is done in descending order
│ │ │ -
370 * according to the keys.
│ │ │ -
371 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
374 { return _M_t.rend(); }
│ │ │ -
│ │ │ -
375
│ │ │ -
376#if __cplusplus >= 201103L
│ │ │ -
377 /**
│ │ │ -
378 * Returns a read-only (constant) iterator that points to the first
│ │ │ -
379 * element in the %set. Iteration is done in ascending order according
│ │ │ -
380 * to the keys.
│ │ │ -
381 */
│ │ │ - │ │ │ -
│ │ │ -
383 cbegin() const noexcept
│ │ │ -
384 { return _M_t.begin(); }
│ │ │ -
│ │ │ -
385
│ │ │ -
386 /**
│ │ │ -
387 * Returns a read-only (constant) iterator that points one past the last
│ │ │ -
388 * element in the %set. Iteration is done in ascending order according
│ │ │ -
389 * to the keys.
│ │ │ -
390 */
│ │ │ - │ │ │ -
│ │ │ -
392 cend() const noexcept
│ │ │ -
393 { return _M_t.end(); }
│ │ │ -
│ │ │ -
394
│ │ │ -
395 /**
│ │ │ -
396 * Returns a read-only (constant) iterator that points to the last
│ │ │ -
397 * element in the %set. Iteration is done in descending order according
│ │ │ -
398 * to the keys.
│ │ │ -
399 */
│ │ │ - │ │ │ -
│ │ │ -
401 crbegin() const noexcept
│ │ │ -
402 { return _M_t.rbegin(); }
│ │ │ -
│ │ │ -
403
│ │ │ -
404 /**
│ │ │ -
405 * Returns a read-only (constant) reverse iterator that points to the
│ │ │ -
406 * last pair in the %set. Iteration is done in descending order
│ │ │ -
407 * according to the keys.
│ │ │ -
408 */
│ │ │ - │ │ │ -
│ │ │ -
410 crend() const noexcept
│ │ │ -
411 { return _M_t.rend(); }
│ │ │ -
│ │ │ -
412#endif
│ │ │ -
413
│ │ │ -
414 /// Returns true if the %set is empty.
│ │ │ -
415 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ - │ │ │ -
417 { return _M_t.empty(); }
│ │ │ -
│ │ │ -
418
│ │ │ -
419 /// Returns the size of the %set.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
422 { return _M_t.size(); }
│ │ │ -
│ │ │ -
423
│ │ │ -
424 /// Returns the maximum size of the %set.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
427 { return _M_t.max_size(); }
│ │ │ -
│ │ │ -
428
│ │ │ -
429 /**
│ │ │ -
430 * @brief Swaps data with another %set.
│ │ │ -
431 * @param __x A %set of the same element and allocator types.
│ │ │ -
432 *
│ │ │ -
433 * This exchanges the elements between two sets in constant
│ │ │ -
434 * time. (It is only swapping a pointer, an integer, and an
│ │ │ -
435 * instance of the @c Compare type (which itself is often
│ │ │ -
436 * stateless and empty), so it should be quite fast.) Note
│ │ │ -
437 * that the global std::swap() function is specialized such
│ │ │ -
438 * that std::swap(s1,s2) will feed to this function.
│ │ │ -
439 *
│ │ │ -
440 * Whether the allocators are swapped depends on the allocator traits.
│ │ │ -
441 */
│ │ │ -
442 void
│ │ │ -
│ │ │ -
443 swap(set& __x)
│ │ │ - │ │ │ -
445 { _M_t.swap(__x._M_t); }
│ │ │ -
│ │ │ -
446
│ │ │ -
447 // insert/erase
│ │ │ -
448#if __cplusplus >= 201103L
│ │ │ -
449 /**
│ │ │ -
450 * @brief Attempts to build and insert an element into the %set.
│ │ │ -
451 * @param __args Arguments used to generate an element.
│ │ │ -
452 * @return A pair, of which the first element is an iterator that points
│ │ │ -
453 * to the possibly inserted element, and the second is a bool
│ │ │ -
454 * that is true if the element was actually inserted.
│ │ │ -
455 *
│ │ │ -
456 * This function attempts to build and insert an element into the %set.
│ │ │ -
457 * A %set relies on unique keys and thus an element is only inserted if
│ │ │ -
458 * it is not already present in the %set.
│ │ │ -
459 *
│ │ │ -
460 * Insertion requires logarithmic time.
│ │ │ -
461 */
│ │ │ -
462 template<typename... _Args>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
465 { return _M_t._M_emplace_unique(std::forward<_Args>(__args)...); }
│ │ │ -
│ │ │ -
466
│ │ │ -
467 /**
│ │ │ -
468 * @brief Attempts to insert an element into the %set.
│ │ │ -
469 * @param __pos An iterator that serves as a hint as to where the
│ │ │ -
470 * element should be inserted.
│ │ │ -
471 * @param __args Arguments used to generate the element to be
│ │ │ -
472 * inserted.
│ │ │ -
473 * @return An iterator that points to the element with key equivalent to
│ │ │ -
474 * the one generated from @a __args (may or may not be the
│ │ │ -
475 * element itself).
│ │ │ -
476 *
│ │ │ -
477 * This function is not concerned about whether the insertion took place,
│ │ │ -
478 * and thus does not return a boolean like the single-argument emplace()
│ │ │ -
479 * does. Note that the first parameter is only a hint and can
│ │ │ -
480 * potentially improve the performance of the insertion process. A bad
│ │ │ -
481 * hint would cause no gains in efficiency.
│ │ │ -
482 *
│ │ │ -
483 * For more on @a hinting, see:
│ │ │ -
484 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
485 *
│ │ │ -
486 * Insertion requires logarithmic time (if the hint is not taken).
│ │ │ -
487 */
│ │ │ -
488 template<typename... _Args>
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
491 {
│ │ │ -
492 return _M_t._M_emplace_hint_unique(__pos,
│ │ │ - │ │ │ -
494 }
│ │ │ -
│ │ │ -
495#endif
│ │ │ -
496
│ │ │ -
497 /**
│ │ │ -
498 * @brief Attempts to insert an element into the %set.
│ │ │ -
499 * @param __x Element to be inserted.
│ │ │ -
500 * @return A pair, of which the first element is an iterator that points
│ │ │ -
501 * to the possibly inserted element, and the second is a bool
│ │ │ -
502 * that is true if the element was actually inserted.
│ │ │ -
503 *
│ │ │ -
504 * This function attempts to insert an element into the %set. A %set
│ │ │ -
505 * relies on unique keys and thus an element is only inserted if it is
│ │ │ -
506 * not already present in the %set.
│ │ │ -
507 *
│ │ │ -
508 * Insertion requires logarithmic time.
│ │ │ -
509 */
│ │ │ - │ │ │ -
│ │ │ -
511 insert(const value_type& __x)
│ │ │ -
512 {
│ │ │ - │ │ │ -
514 _M_t._M_insert_unique(__x);
│ │ │ -
515 return std::pair<iterator, bool>(__p.first, __p.second);
│ │ │ -
516 }
│ │ │ -
│ │ │ -
517
│ │ │ -
518#if __cplusplus >= 201103L
│ │ │ - │ │ │ -
520 insert(value_type&& __x)
│ │ │ -
521 {
│ │ │ - │ │ │ -
523 _M_t._M_insert_unique(std::move(__x));
│ │ │ -
524 return std::pair<iterator, bool>(__p.first, __p.second);
│ │ │ -
525 }
│ │ │ -
526#endif
│ │ │ -
527
│ │ │ -
528 /**
│ │ │ -
529 * @brief Attempts to insert an element into the %set.
│ │ │ -
530 * @param __position An iterator that serves as a hint as to where the
│ │ │ -
531 * element should be inserted.
│ │ │ -
532 * @param __x Element to be inserted.
│ │ │ -
533 * @return An iterator that points to the element with key of
│ │ │ -
534 * @a __x (may or may not be the element passed in).
│ │ │ -
535 *
│ │ │ -
536 * This function is not concerned about whether the insertion took place,
│ │ │ -
537 * and thus does not return a boolean like the single-argument insert()
│ │ │ -
538 * does. Note that the first parameter is only a hint and can
│ │ │ -
539 * potentially improve the performance of the insertion process. A bad
│ │ │ -
540 * hint would cause no gains in efficiency.
│ │ │ -
541 *
│ │ │ -
542 * For more on @a hinting, see:
│ │ │ -
543 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/associative.html#containers.associative.insert_hints
│ │ │ -
544 *
│ │ │ -
545 * Insertion requires logarithmic time (if the hint is not taken).
│ │ │ -
546 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
549 { return _M_t._M_insert_unique_(__position, __x); }
│ │ │ -
│ │ │ -
550
│ │ │ -
551#if __cplusplus >= 201103L
│ │ │ - │ │ │ - │ │ │ -
554 { return _M_t._M_insert_unique_(__position, std::move(__x)); }
│ │ │ -
555#endif
│ │ │ -
556
│ │ │ -
557 /**
│ │ │ -
558 * @brief A template function that attempts to insert a range
│ │ │ -
559 * of elements.
│ │ │ -
560 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
561 * inserted.
│ │ │ -
562 * @param __last Iterator pointing to the end of the range.
│ │ │ -
563 *
│ │ │ -
564 * Complexity similar to that of the range constructor.
│ │ │ -
565 */
│ │ │ -
566 template<typename _InputIterator>
│ │ │ -
567 void
│ │ │ -
│ │ │ - │ │ │ -
569 { _M_t._M_insert_range_unique(__first, __last); }
│ │ │ -
│ │ │ -
570
│ │ │ -
571#if __cplusplus >= 201103L
│ │ │ -
572 /**
│ │ │ -
573 * @brief Attempts to insert a list of elements into the %set.
│ │ │ -
574 * @param __l A std::initializer_list<value_type> of elements
│ │ │ -
575 * to be inserted.
│ │ │ -
576 *
│ │ │ -
577 * Complexity similar to that of the range constructor.
│ │ │ -
578 */
│ │ │ -
579 void
│ │ │ -
│ │ │ - │ │ │ -
581 { this->insert(__l.begin(), __l.end()); }
│ │ │ -
│ │ │ -
582#endif
│ │ │ -
583
│ │ │ -
584#if __cplusplus > 201402L
│ │ │ -
585 /// Extract a node.
│ │ │ -
586 node_type
│ │ │ -
│ │ │ - │ │ │ -
588 {
│ │ │ -
589 __glibcxx_assert(__pos != end());
│ │ │ -
590 return _M_t.extract(__pos);
│ │ │ -
591 }
│ │ │ -
│ │ │ -
592
│ │ │ -
593 /// Extract a node.
│ │ │ -
594 node_type
│ │ │ -
│ │ │ -
595 extract(const key_type& __x)
│ │ │ -
596 { return _M_t.extract(__x); }
│ │ │ -
│ │ │ -
597
│ │ │ -
598 /// Re-insert an extracted node.
│ │ │ -
599 insert_return_type
│ │ │ -
│ │ │ -
600 insert(node_type&& __nh)
│ │ │ -
601 { return _M_t._M_reinsert_node_unique(std::move(__nh)); }
│ │ │ -
│ │ │ -
602
│ │ │ -
603 /// Re-insert an extracted node.
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
606 { return _M_t._M_reinsert_node_hint_unique(__hint, std::move(__nh)); }
│ │ │ -
│ │ │ -
607
│ │ │ -
608 template<typename, typename>
│ │ │ -
609 friend struct std::_Rb_tree_merge_helper;
│ │ │ -
610
│ │ │ -
611 template<typename _Compare1>
│ │ │ -
612 void
│ │ │ - │ │ │ -
614 {
│ │ │ - │ │ │ -
616 _M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source));
│ │ │ -
617 }
│ │ │ -
618
│ │ │ -
619 template<typename _Compare1>
│ │ │ -
620 void
│ │ │ -
621 merge(set<_Key, _Compare1, _Alloc>&& __source)
│ │ │ -
622 { merge(__source); }
│ │ │ -
623
│ │ │ -
624 template<typename _Compare1>
│ │ │ -
625 void
│ │ │ -
626 merge(multiset<_Key, _Compare1, _Alloc>& __source)
│ │ │ -
627 {
│ │ │ -
628 using _Merge_helper = _Rb_tree_merge_helper<set, _Compare1>;
│ │ │ -
629 _M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source));
│ │ │ -
630 }
│ │ │ -
631
│ │ │ -
632 template<typename _Compare1>
│ │ │ -
633 void
│ │ │ -
634 merge(multiset<_Key, _Compare1, _Alloc>&& __source)
│ │ │ -
635 { merge(__source); }
│ │ │ -
636#endif // C++17
│ │ │ -
637
│ │ │ -
638#if __cplusplus >= 201103L
│ │ │ -
639 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
640 // DR 130. Associative erase should return an iterator.
│ │ │ -
641 /**
│ │ │ -
642 * @brief Erases an element from a %set.
│ │ │ -
643 * @param __position An iterator pointing to the element to be erased.
│ │ │ -
644 * @return An iterator pointing to the element immediately following
│ │ │ -
645 * @a __position prior to the element being erased. If no such
│ │ │ -
646 * element exists, end() is returned.
│ │ │ -
647 *
│ │ │ -
648 * This function erases an element, pointed to by the given iterator,
│ │ │ -
649 * from a %set. Note that this function only erases the element, and
│ │ │ -
650 * that if the element is itself a pointer, the pointed-to memory is not
│ │ │ -
651 * touched in any way. Managing the pointer is the user's
│ │ │ -
652 * responsibility.
│ │ │ -
653 */
│ │ │ -
654 _GLIBCXX_ABI_TAG_CXX11
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
657 { return _M_t.erase(__position); }
│ │ │ -
│ │ │ -
658#else
│ │ │ -
659 /**
│ │ │ -
660 * @brief Erases an element from a %set.
│ │ │ -
661 * @param position An iterator pointing to the element to be erased.
│ │ │ -
662 *
│ │ │ -
663 * This function erases an element, pointed to by the given iterator,
│ │ │ -
664 * from a %set. Note that this function only erases the element, and
│ │ │ -
665 * that if the element is itself a pointer, the pointed-to memory is not
│ │ │ -
666 * touched in any way. Managing the pointer is the user's
│ │ │ -
667 * responsibility.
│ │ │ -
668 */
│ │ │ -
669 void
│ │ │ - │ │ │ -
671 { _M_t.erase(__position); }
│ │ │ -
672#endif
│ │ │ -
673
│ │ │ -
674 /**
│ │ │ -
675 * @brief Erases elements according to the provided key.
│ │ │ -
676 * @param __x Key of element to be erased.
│ │ │ -
677 * @return The number of elements erased.
│ │ │ -
678 *
│ │ │ -
679 * This function erases all the elements located by the given key from
│ │ │ -
680 * a %set.
│ │ │ -
681 * Note that this function only erases the element, and that if
│ │ │ -
682 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
683 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
684 */
│ │ │ - │ │ │ -
│ │ │ -
686 erase(const key_type& __x)
│ │ │ -
687 { return _M_t.erase(__x); }
│ │ │ -
│ │ │ -
688
│ │ │ -
689#if __cplusplus >= 201103L
│ │ │ -
690 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
691 // DR 130. Associative erase should return an iterator.
│ │ │ -
692 /**
│ │ │ -
693 * @brief Erases a [__first,__last) range of elements from a %set.
│ │ │ -
694 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
695 * erased.
│ │ │ -
696
│ │ │ -
697 * @param __last Iterator pointing to the end of the range to
│ │ │ -
698 * be erased.
│ │ │ -
699 * @return The iterator @a __last.
│ │ │ -
700 *
│ │ │ -
701 * This function erases a sequence of elements from a %set.
│ │ │ -
702 * Note that this function only erases the element, and that if
│ │ │ -
703 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
704 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
705 */
│ │ │ -
706 _GLIBCXX_ABI_TAG_CXX11
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
709 { return _M_t.erase(__first, __last); }
│ │ │ -
│ │ │ -
710#else
│ │ │ -
711 /**
│ │ │ -
712 * @brief Erases a [first,last) range of elements from a %set.
│ │ │ -
713 * @param __first Iterator pointing to the start of the range to be
│ │ │ -
714 * erased.
│ │ │ -
715 * @param __last Iterator pointing to the end of the range to
│ │ │ -
716 * be erased.
│ │ │ -
717 *
│ │ │ -
718 * This function erases a sequence of elements from a %set.
│ │ │ -
719 * Note that this function only erases the element, and that if
│ │ │ -
720 * the element is itself a pointer, the pointed-to memory is not touched
│ │ │ -
721 * in any way. Managing the pointer is the user's responsibility.
│ │ │ -
722 */
│ │ │ -
723 void
│ │ │ -
724 erase(iterator __first, iterator __last)
│ │ │ -
725 { _M_t.erase(__first, __last); }
│ │ │ -
726#endif
│ │ │ -
727
│ │ │ -
728 /**
│ │ │ -
729 * Erases all elements in a %set. Note that this function only erases
│ │ │ -
730 * the elements, and that if the elements themselves are pointers, the
│ │ │ -
731 * pointed-to memory is not touched in any way. Managing the pointer is
│ │ │ -
732 * the user's responsibility.
│ │ │ -
733 */
│ │ │ -
734 void
│ │ │ -
│ │ │ - │ │ │ -
736 { _M_t.clear(); }
│ │ │ -
│ │ │ -
737
│ │ │ -
738 // set operations:
│ │ │ -
739
│ │ │ -
740 ///@{
│ │ │ -
741 /**
│ │ │ -
742 * @brief Finds the number of elements.
│ │ │ -
743 * @param __x Element to located.
│ │ │ -
744 * @return Number of elements with specified key.
│ │ │ -
745 *
│ │ │ -
746 * This function only makes sense for multisets; for set the result will
│ │ │ -
747 * either be 0 (not present) or 1 (present).
│ │ │ -
748 */
│ │ │ - │ │ │ -
│ │ │ -
750 count(const key_type& __x) const
│ │ │ -
751 { return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
│ │ │ -
│ │ │ -
752
│ │ │ -
753#if __cplusplus > 201103L
│ │ │ -
754 template<typename _Kt>
│ │ │ -
755 auto
│ │ │ -
│ │ │ -
756 count(const _Kt& __x) const
│ │ │ -
757 -> decltype(_M_t._M_count_tr(__x))
│ │ │ -
758 { return _M_t._M_count_tr(__x); }
│ │ │ -
│ │ │ -
759#endif
│ │ │ -
760 ///@}
│ │ │ -
761
│ │ │ -
762#if __cplusplus > 201703L
│ │ │ -
763 ///@{
│ │ │ -
764 /**
│ │ │ -
765 * @brief Finds whether an element with the given key exists.
│ │ │ -
766 * @param __x Key of elements to be located.
│ │ │ -
767 * @return True if there is an element with the specified key.
│ │ │ -
768 */
│ │ │ -
769 bool
│ │ │ -
│ │ │ -
770 contains(const key_type& __x) const
│ │ │ -
771 { return _M_t.find(__x) != _M_t.end(); }
│ │ │ -
│ │ │ -
772
│ │ │ -
773 template<typename _Kt>
│ │ │ -
774 auto
│ │ │ -
│ │ │ -
775 contains(const _Kt& __x) const
│ │ │ -
776 -> decltype(_M_t._M_find_tr(__x), void(), true)
│ │ │ -
777 { return _M_t._M_find_tr(__x) != _M_t.end(); }
│ │ │ -
│ │ │ -
778 ///@}
│ │ │ -
779#endif
│ │ │ -
780
│ │ │ -
781 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
782 // 214. set::find() missing const overload
│ │ │ -
783 ///@{
│ │ │ -
784 /**
│ │ │ -
785 * @brief Tries to locate an element in a %set.
│ │ │ -
786 * @param __x Element to be located.
│ │ │ -
787 * @return Iterator pointing to sought-after element, or end() if not
│ │ │ -
788 * found.
│ │ │ -
789 *
│ │ │ -
790 * This function takes a key and tries to locate the element with which
│ │ │ -
791 * the key matches. If successful the function returns an iterator
│ │ │ -
792 * pointing to the sought after element. If unsuccessful it returns the
│ │ │ -
793 * past-the-end ( @c end() ) iterator.
│ │ │ -
794 */
│ │ │ - │ │ │ -
│ │ │ -
796 find(const key_type& __x)
│ │ │ -
797 { return _M_t.find(__x); }
│ │ │ -
│ │ │ -
798
│ │ │ - │ │ │ -
│ │ │ -
800 find(const key_type& __x) const
│ │ │ -
801 { return _M_t.find(__x); }
│ │ │ -
│ │ │ -
802
│ │ │ -
803#if __cplusplus > 201103L
│ │ │ -
804 template<typename _Kt>
│ │ │ -
805 auto
│ │ │ -
│ │ │ -
806 find(const _Kt& __x)
│ │ │ -
807 -> decltype(iterator{_M_t._M_find_tr(__x)})
│ │ │ -
808 { return iterator{_M_t._M_find_tr(__x)}; }
│ │ │ -
│ │ │ -
809
│ │ │ -
810 template<typename _Kt>
│ │ │ -
811 auto
│ │ │ -
│ │ │ -
812 find(const _Kt& __x) const
│ │ │ -
813 -> decltype(const_iterator{_M_t._M_find_tr(__x)})
│ │ │ -
814 { return const_iterator{_M_t._M_find_tr(__x)}; }
│ │ │ -
│ │ │ -
815#endif
│ │ │ -
816 ///@}
│ │ │ -
817
│ │ │ -
818 ///@{
│ │ │ -
819 /**
│ │ │ -
820 * @brief Finds the beginning of a subsequence matching given key.
│ │ │ -
821 * @param __x Key to be located.
│ │ │ -
822 * @return Iterator pointing to first element equal to or greater
│ │ │ -
823 * than key, or end().
│ │ │ -
824 *
│ │ │ -
825 * This function returns the first element of a subsequence of elements
│ │ │ -
826 * that matches the given key. If unsuccessful it returns an iterator
│ │ │ -
827 * pointing to the first element that has a greater value than given key
│ │ │ -
828 * or end() if no such element exists.
│ │ │ -
829 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
832 { return _M_t.lower_bound(__x); }
│ │ │ -
│ │ │ -
833
│ │ │ - │ │ │ -
│ │ │ -
835 lower_bound(const key_type& __x) const
│ │ │ -
836 { return _M_t.lower_bound(__x); }
│ │ │ -
│ │ │ -
837
│ │ │ -
838#if __cplusplus > 201103L
│ │ │ -
839 template<typename _Kt>
│ │ │ -
840 auto
│ │ │ -
│ │ │ -
841 lower_bound(const _Kt& __x)
│ │ │ -
842 -> decltype(iterator(_M_t._M_lower_bound_tr(__x)))
│ │ │ -
843 { return iterator(_M_t._M_lower_bound_tr(__x)); }
│ │ │ -
│ │ │ -
844
│ │ │ -
845 template<typename _Kt>
│ │ │ -
846 auto
│ │ │ -
│ │ │ -
847 lower_bound(const _Kt& __x) const
│ │ │ -
848 -> decltype(const_iterator(_M_t._M_lower_bound_tr(__x)))
│ │ │ -
849 { return const_iterator(_M_t._M_lower_bound_tr(__x)); }
│ │ │ -
│ │ │ -
850#endif
│ │ │ -
851 ///@}
│ │ │ -
852
│ │ │ -
853 ///@{
│ │ │ -
854 /**
│ │ │ -
855 * @brief Finds the end of a subsequence matching given key.
│ │ │ -
856 * @param __x Key to be located.
│ │ │ -
857 * @return Iterator pointing to the first element
│ │ │ -
858 * greater than key, or end().
│ │ │ -
859 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
862 { return _M_t.upper_bound(__x); }
│ │ │ -
│ │ │ -
863
│ │ │ - │ │ │ -
│ │ │ -
865 upper_bound(const key_type& __x) const
│ │ │ -
866 { return _M_t.upper_bound(__x); }
│ │ │ -
│ │ │ -
867
│ │ │ -
868#if __cplusplus > 201103L
│ │ │ -
869 template<typename _Kt>
│ │ │ -
870 auto
│ │ │ -
│ │ │ -
871 upper_bound(const _Kt& __x)
│ │ │ -
872 -> decltype(iterator(_M_t._M_upper_bound_tr(__x)))
│ │ │ -
873 { return iterator(_M_t._M_upper_bound_tr(__x)); }
│ │ │ -
│ │ │ -
874
│ │ │ -
875 template<typename _Kt>
│ │ │ -
876 auto
│ │ │ -
│ │ │ -
877 upper_bound(const _Kt& __x) const
│ │ │ -
878 -> decltype(iterator(_M_t._M_upper_bound_tr(__x)))
│ │ │ -
879 { return const_iterator(_M_t._M_upper_bound_tr(__x)); }
│ │ │ -
│ │ │ -
880#endif
│ │ │ -
881 ///@}
│ │ │ -
882
│ │ │ -
883 ///@{
│ │ │ -
884 /**
│ │ │ -
885 * @brief Finds a subsequence matching given key.
│ │ │ -
886 * @param __x Key to be located.
│ │ │ -
887 * @return Pair of iterators that possibly points to the subsequence
│ │ │ -
888 * matching given key.
│ │ │ -
889 *
│ │ │ -
890 * This function is equivalent to
│ │ │ -
891 * @code
│ │ │ -
892 * std::make_pair(c.lower_bound(val),
│ │ │ -
893 * c.upper_bound(val))
│ │ │ -
894 * @endcode
│ │ │ -
895 * (but is faster than making the calls separately).
│ │ │ -
896 *
│ │ │ -
897 * This function probably only makes sense for multisets.
│ │ │ -
898 */
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
901 { return _M_t.equal_range(__x); }
│ │ │ -
│ │ │ -
902
│ │ │ - │ │ │ -
│ │ │ -
904 equal_range(const key_type& __x) const
│ │ │ -
905 { return _M_t.equal_range(__x); }
│ │ │ -
│ │ │ -
906
│ │ │ -
907#if __cplusplus > 201103L
│ │ │ -
908 template<typename _Kt>
│ │ │ -
909 auto
│ │ │ -
│ │ │ -
910 equal_range(const _Kt& __x)
│ │ │ -
911 -> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)))
│ │ │ -
912 { return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); }
│ │ │ -
│ │ │ -
913
│ │ │ -
914 template<typename _Kt>
│ │ │ -
915 auto
│ │ │ -
│ │ │ -
916 equal_range(const _Kt& __x) const
│ │ │ -
917 -> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)))
│ │ │ -
918 { return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); }
│ │ │ -
│ │ │ -
919#endif
│ │ │ -
920 ///@}
│ │ │ -
921
│ │ │ -
922 template<typename _K1, typename _C1, typename _A1>
│ │ │ -
923 friend bool
│ │ │ -
924 operator==(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&);
│ │ │ -
925
│ │ │ -
926#if __cpp_lib_three_way_comparison
│ │ │ -
927 template<typename _K1, typename _C1, typename _A1>
│ │ │ -
928 friend __detail::__synth3way_t<_K1>
│ │ │ -
929 operator<=>(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&);
│ │ │ -
930#else
│ │ │ -
931 template<typename _K1, typename _C1, typename _A1>
│ │ │ -
932 friend bool
│ │ │ -
933 operator<(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&);
│ │ │ -
934#endif
│ │ │ -
935 };
│ │ │ -
│ │ │ -
936
│ │ │ -
937#if __cpp_deduction_guides >= 201606
│ │ │ -
938
│ │ │ -
939 template<typename _InputIterator,
│ │ │ -
940 typename _Compare =
│ │ │ -
941 less<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
942 typename _Allocator =
│ │ │ -
943 allocator<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
944 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
945 typename = _RequireNotAllocator<_Compare>,
│ │ │ -
946 typename = _RequireAllocator<_Allocator>>
│ │ │ -
947 set(_InputIterator, _InputIterator,
│ │ │ -
948 _Compare = _Compare(), _Allocator = _Allocator())
│ │ │ -
949 -> set<typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
950 _Compare, _Allocator>;
│ │ │ -
951
│ │ │ -
952 template<typename _Key, typename _Compare = less<_Key>,
│ │ │ -
953 typename _Allocator = allocator<_Key>,
│ │ │ -
954 typename = _RequireNotAllocator<_Compare>,
│ │ │ -
955 typename = _RequireAllocator<_Allocator>>
│ │ │ -
956 set(initializer_list<_Key>,
│ │ │ -
957 _Compare = _Compare(), _Allocator = _Allocator())
│ │ │ -
958 -> set<_Key, _Compare, _Allocator>;
│ │ │ -
959
│ │ │ -
960 template<typename _InputIterator, typename _Allocator,
│ │ │ -
961 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
962 typename = _RequireAllocator<_Allocator>>
│ │ │ -
963 set(_InputIterator, _InputIterator, _Allocator)
│ │ │ -
964 -> set<typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
965 less<typename iterator_traits<_InputIterator>::value_type>,
│ │ │ -
966 _Allocator>;
│ │ │ -
967
│ │ │ -
968 template<typename _Key, typename _Allocator,
│ │ │ -
969 typename = _RequireAllocator<_Allocator>>
│ │ │ -
970 set(initializer_list<_Key>, _Allocator)
│ │ │ -
971 -> set<_Key, less<_Key>, _Allocator>;
│ │ │ -
972
│ │ │ -
973#endif // deduction guides
│ │ │ -
974
│ │ │ -
975 /**
│ │ │ -
976 * @brief Set equality comparison.
│ │ │ -
977 * @param __x A %set.
│ │ │ -
978 * @param __y A %set of the same type as @a x.
│ │ │ -
979 * @return True iff the size and elements of the sets are equal.
│ │ │ -
980 *
│ │ │ -
981 * This is an equivalence relation. It is linear in the size of the sets.
│ │ │ -
982 * Sets are considered equivalent if their sizes are equal, and if
│ │ │ -
983 * corresponding elements compare equal.
│ │ │ -
984 */
│ │ │ -
985 template<typename _Key, typename _Compare, typename _Alloc>
│ │ │ -
986 inline bool
│ │ │ -
│ │ │ -
987 operator==(const set<_Key, _Compare, _Alloc>& __x,
│ │ │ - │ │ │ -
989 { return __x._M_t == __y._M_t; }
│ │ │ -
│ │ │ -
990
│ │ │ -
991#if __cpp_lib_three_way_comparison
│ │ │ -
992 /**
│ │ │ -
993 * @brief Set ordering relation.
│ │ │ -
994 * @param __x A `set`.
│ │ │ -
995 * @param __y A `set` of the same type as `x`.
│ │ │ -
996 * @return A value indicating whether `__x` is less than, equal to,
│ │ │ -
997 * greater than, or incomparable with `__y`.
│ │ │ -
998 *
│ │ │ -
999 * This is a total ordering relation. It is linear in the size of the
│ │ │ -
1000 * maps. The elements must be comparable with @c <.
│ │ │ -
1001 *
│ │ │ -
1002 * See `std::lexicographical_compare_three_way()` for how the determination
│ │ │ -
1003 * is made. This operator is used to synthesize relational operators like
│ │ │ -
1004 * `<` and `>=` etc.
│ │ │ -
1005 */
│ │ │ -
1006 template<typename _Key, typename _Compare, typename _Alloc>
│ │ │ -
1007 inline __detail::__synth3way_t<_Key>
│ │ │ -
1008 operator<=>(const set<_Key, _Compare, _Alloc>& __x,
│ │ │ -
1009 const set<_Key, _Compare, _Alloc>& __y)
│ │ │ -
1010 { return __x._M_t <=> __y._M_t; }
│ │ │ -
1011#else
│ │ │ -
1012 /**
│ │ │ -
1013 * @brief Set ordering relation.
│ │ │ -
1014 * @param __x A %set.
│ │ │ -
1015 * @param __y A %set of the same type as @a x.
│ │ │ -
1016 * @return True iff @a __x is lexicographically less than @a __y.
│ │ │ -
1017 *
│ │ │ -
1018 * This is a total ordering relation. It is linear in the size of the
│ │ │ -
1019 * sets. The elements must be comparable with @c <.
│ │ │ -
1020 *
│ │ │ -
1021 * See std::lexicographical_compare() for how the determination is made.
│ │ │ -
1022 */
│ │ │ -
1023 template<typename _Key, typename _Compare, typename _Alloc>
│ │ │ -
│ │ │ -
1024 inline bool
│ │ │ -
1025 operator<(const set<_Key, _Compare, _Alloc>& __x,
│ │ │ -
1026 const set<_Key, _Compare, _Alloc>& __y)
│ │ │ -
1027 { return __x._M_t < __y._M_t; }
│ │ │ -
│ │ │ -
1028
│ │ │ -
1029 /// Returns !(x == y).
│ │ │ -
1030 template<typename _Key, typename _Compare, typename _Alloc>
│ │ │ -
1031 inline bool
│ │ │ -
│ │ │ -
1032 operator!=(const set<_Key, _Compare, _Alloc>& __x,
│ │ │ -
1033 const set<_Key, _Compare, _Alloc>& __y)
│ │ │ -
1034 { return !(__x == __y); }
│ │ │ -
│ │ │ -
1035
│ │ │ -
1036 /// Returns y < x.
│ │ │ -
1037 template<typename _Key, typename _Compare, typename _Alloc>
│ │ │ -
1038 inline bool
│ │ │ -
│ │ │ -
1039 operator>(const set<_Key, _Compare, _Alloc>& __x,
│ │ │ -
1040 const set<_Key, _Compare, _Alloc>& __y)
│ │ │ -
1041 { return __y < __x; }
│ │ │ -
│ │ │ -
1042
│ │ │ -
1043 /// Returns !(y < x)
│ │ │ -
1044 template<typename _Key, typename _Compare, typename _Alloc>
│ │ │ -
│ │ │ -
1045 inline bool
│ │ │ -
1046 operator<=(const set<_Key, _Compare, _Alloc>& __x,
│ │ │ -
1047 const set<_Key, _Compare, _Alloc>& __y)
│ │ │ -
1048 { return !(__y < __x); }
│ │ │ -
│ │ │ -
1049
│ │ │ -
1050 /// Returns !(x < y)
│ │ │ -
1051 template<typename _Key, typename _Compare, typename _Alloc>
│ │ │ -
1052 inline bool
│ │ │ -
│ │ │ -
1053 operator>=(const set<_Key, _Compare, _Alloc>& __x,
│ │ │ -
1054 const set<_Key, _Compare, _Alloc>& __y)
│ │ │ -
1055 { return !(__x < __y); }
│ │ │ -
│ │ │ -
1056#endif // three-way comparison
│ │ │ -
1057
│ │ │ -
1058 /// See std::set::swap().
│ │ │ -
1059 template<typename _Key, typename _Compare, typename _Alloc>
│ │ │ -
1060 inline void
│ │ │ -
│ │ │ - │ │ │ -
1062 _GLIBCXX_NOEXCEPT_IF(noexcept(__x.swap(__y)))
│ │ │ -
1063 { __x.swap(__y); }
│ │ │ -
│ │ │ -
1064
│ │ │ -
1065_GLIBCXX_END_NAMESPACE_CONTAINER
│ │ │ -
1066
│ │ │ -
1067#if __cplusplus > 201402L
│ │ │ -
1068 // Allow std::set access to internals of compatible sets.
│ │ │ -
1069 template<typename _Val, typename _Cmp1, typename _Alloc, typename _Cmp2>
│ │ │ -
1070 struct
│ │ │ -
1071 _Rb_tree_merge_helper<_GLIBCXX_STD_C::set<_Val, _Cmp1, _Alloc>, _Cmp2>
│ │ │ -
1072 {
│ │ │ -
1073 private:
│ │ │ -
1074 friend class _GLIBCXX_STD_C::set<_Val, _Cmp1, _Alloc>;
│ │ │ -
1075
│ │ │ -
1076 static auto&
│ │ │ -
1077 _S_get_tree(_GLIBCXX_STD_C::set<_Val, _Cmp2, _Alloc>& __set)
│ │ │ -
1078 { return __set._M_t; }
│ │ │ -
1079
│ │ │ -
1080 static auto&
│ │ │ -
1081 _S_get_tree(_GLIBCXX_STD_C::multiset<_Val, _Cmp2, _Alloc>& __set)
│ │ │ -
1082 { return __set._M_t; }
│ │ │ -
1083 };
│ │ │ -
1084#endif // C++17
│ │ │ -
1085
│ │ │ -
1086_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
1087} //namespace std
│ │ │ -
1088#endif /* _STL_SET_H */
│ │ │ - │ │ │ - │ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:97
│ │ │ -
ISO C++ entities toplevel namespace is std.
│ │ │ - │ │ │ -
is_nothrow_copy_constructible
Definition type_traits:1133
│ │ │ - │ │ │ -
Common iterator class.
│ │ │ -
A standard container made up of unique keys, which can be retrieved in logarithmic time.
Definition stl_set.h:97
│ │ │ -
set(set &&__x, const __type_identity_t< allocator_type > &__a) noexcept(is_nothrow_copy_constructible< _Compare >::value &&_Alloc_traits::_S_always_equal())
Allocator-extended move constructor.
Definition stl_set.h:261
│ │ │ -
bool contains(const key_type &__x) const
Finds whether an element with the given key exists.
Definition stl_set.h:770
│ │ │ -
set(_InputIterator __first, _InputIterator __last, const _Compare &__comp, const allocator_type &__a=allocator_type())
Builds a set from a range.
Definition stl_set.h:210
│ │ │ -
size_type count(const key_type &__x) const
Finds the number of elements.
Definition stl_set.h:750
│ │ │ -
_Rep_type::difference_type difference_type
Iterator-related typedefs.
Definition stl_set.h:154
│ │ │ -
node_type extract(const_iterator __pos)
Extract a node.
Definition stl_set.h:587
│ │ │ -
set & operator=(initializer_list< value_type > __l)
Set list assignment operator.
Definition stl_set.h:318
│ │ │ -
_GLIBCXX_ABI_TAG_CXX11 iterator erase(const_iterator __position)
Erases an element from a set.
Definition stl_set.h:656
│ │ │ -
set(set &&)=default
Set move constructor
│ │ │ -
void swap(set &__x) noexcept(/*conditional */)
Swaps data with another set.
Definition stl_set.h:443
│ │ │ -
_Compare value_compare
Public typedefs.
Definition stl_set.h:125
│ │ │ -
value_compare value_comp() const
Returns the comparison object with which the set was constructed.
Definition stl_set.h:333
│ │ │ -
iterator cbegin() const noexcept
Definition stl_set.h:383
│ │ │ -
_Alloc allocator_type
Public typedefs.
Definition stl_set.h:126
│ │ │ -
_Rep_type::const_iterator const_iterator
Iterator-related typedefs.
Definition stl_set.h:150
│ │ │ -
_Alloc_traits::const_pointer const_pointer
Iterator-related typedefs.
Definition stl_set.h:143
│ │ │ -
_Key value_type
Public typedefs.
Definition stl_set.h:123
│ │ │ -
auto contains(const _Kt &__x) const -> decltype(_M_t._M_find_tr(__x), void(), true)
Finds whether an element with the given key exists.
Definition stl_set.h:775
│ │ │ -
std::pair< const_iterator, const_iterator > equal_range(const key_type &__x) const
Finds a subsequence matching given key.
Definition stl_set.h:904
│ │ │ -
auto lower_bound(const _Kt &__x) -> decltype(iterator(_M_t._M_lower_bound_tr(__x)))
Finds the beginning of a subsequence matching given key.
Definition stl_set.h:841
│ │ │ -
const_iterator upper_bound(const key_type &__x) const
Finds the end of a subsequence matching given key.
Definition stl_set.h:865
│ │ │ -
void insert(initializer_list< value_type > __l)
Attempts to insert a list of elements into the set.
Definition stl_set.h:580
│ │ │ -
set(_InputIterator __first, _InputIterator __last)
Builds a set from a range.
Definition stl_set.h:193
│ │ │ -
iterator cend() const noexcept
Definition stl_set.h:392
│ │ │ -
auto count(const _Kt &__x) const -> decltype(_M_t._M_count_tr(__x))
Finds the number of elements.
Definition stl_set.h:756
│ │ │ -
insert_return_type insert(node_type &&__nh)
Re-insert an extracted node.
Definition stl_set.h:600
│ │ │ -
iterator insert(const_iterator __hint, node_type &&__nh)
Re-insert an extracted node.
Definition stl_set.h:605
│ │ │ -
iterator end() const noexcept
Definition stl_set.h:355
│ │ │ -
_Compare key_compare
Public typedefs.
Definition stl_set.h:124
│ │ │ -
size_type max_size() const noexcept
Returns the maximum size of the set.
Definition stl_set.h:426
│ │ │ -
_Key key_type
Public typedefs.
Definition stl_set.h:122
│ │ │ -
std::pair< iterator, bool > insert(const value_type &__x)
Attempts to insert an element into the set.
Definition stl_set.h:511
│ │ │ -
std::pair< iterator, iterator > equal_range(const key_type &__x)
Finds a subsequence matching given key.
Definition stl_set.h:900
│ │ │ -
auto find(const _Kt &__x) -> decltype(iterator{_M_t._M_find_tr(__x)})
Tries to locate an element in a set.
Definition stl_set.h:806
│ │ │ -
_Alloc_traits::const_reference const_reference
Iterator-related typedefs.
Definition stl_set.h:145
│ │ │ -
auto find(const _Kt &__x) const -> decltype(const_iterator{_M_t._M_find_tr(__x)})
Tries to locate an element in a set.
Definition stl_set.h:812
│ │ │ -
set()=default
Default constructor creates no elements.
│ │ │ -
auto lower_bound(const _Kt &__x) const -> decltype(const_iterator(_M_t._M_lower_bound_tr(__x)))
Finds the beginning of a subsequence matching given key.
Definition stl_set.h:847
│ │ │ -
set(const allocator_type &__a)
Allocator-extended default constructor.
Definition stl_set.h:253
│ │ │ -
std::pair< iterator, bool > emplace(_Args &&... __args)
Attempts to build and insert an element into the set.
Definition stl_set.h:464
│ │ │ -
key_compare key_comp() const
Returns the comparison object with which the set was constructed.
Definition stl_set.h:329
│ │ │ -
reverse_iterator rbegin() const noexcept
Definition stl_set.h:364
│ │ │ -
_Alloc_traits::reference reference
Iterator-related typedefs.
Definition stl_set.h:144
│ │ │ -
void insert(_InputIterator __first, _InputIterator __last)
A template function that attempts to insert a range of elements.
Definition stl_set.h:568
│ │ │ -
_GLIBCXX_ABI_TAG_CXX11 iterator erase(const_iterator __first, const_iterator __last)
Erases a [__first,__last) range of elements from a set.
Definition stl_set.h:708
│ │ │ -
reverse_iterator crbegin() const noexcept
Definition stl_set.h:401
│ │ │ -
auto upper_bound(const _Kt &__x) const -> decltype(iterator(_M_t._M_upper_bound_tr(__x)))
Finds the end of a subsequence matching given key.
Definition stl_set.h:877
│ │ │ -
auto equal_range(const _Kt &__x) -> decltype(pair< iterator, iterator >(_M_t._M_equal_range_tr(__x)))
Finds a subsequence matching given key.
Definition stl_set.h:910
│ │ │ -
auto equal_range(const _Kt &__x) const -> decltype(pair< iterator, iterator >(_M_t._M_equal_range_tr(__x)))
Finds a subsequence matching given key.
Definition stl_set.h:916
│ │ │ -
set(initializer_list< value_type > __l, const allocator_type &__a)
Allocator-extended initialier-list constructor.
Definition stl_set.h:267
│ │ │ -
_Alloc_traits::pointer pointer
Iterator-related typedefs.
Definition stl_set.h:142
│ │ │ -
size_type size() const noexcept
Returns the size of the set.
Definition stl_set.h:421
│ │ │ -
_Rep_type::const_reverse_iterator const_reverse_iterator
Iterator-related typedefs.
Definition stl_set.h:152
│ │ │ -
_Rep_type::const_iterator iterator
Iterator-related typedefs.
Definition stl_set.h:149
│ │ │ -
_Rep_type::const_reverse_iterator reverse_iterator
Iterator-related typedefs.
Definition stl_set.h:151
│ │ │ -
reverse_iterator crend() const noexcept
Definition stl_set.h:410
│ │ │ -
iterator insert(const_iterator __position, const value_type &__x)
Attempts to insert an element into the set.
Definition stl_set.h:548
│ │ │ -
const_iterator lower_bound(const key_type &__x) const
Finds the beginning of a subsequence matching given key.
Definition stl_set.h:835
│ │ │ -
set(_InputIterator __first, _InputIterator __last, const allocator_type &__a)
Allocator-extended range constructor.
Definition stl_set.h:273
│ │ │ -
set(const set &__x, const __type_identity_t< allocator_type > &__a)
Allocator-extended copy constructor.
Definition stl_set.h:257
│ │ │ -
set(initializer_list< value_type > __l, const _Compare &__comp=_Compare(), const allocator_type &__a=allocator_type())
Builds a set from an initializer_list.
Definition stl_set.h:245
│ │ │ -
void clear() noexcept
Definition stl_set.h:735
│ │ │ -
allocator_type get_allocator() const noexcept
Returns the allocator object with which the set was constructed.
Definition stl_set.h:337
│ │ │ -
_Rep_type::size_type size_type
Iterator-related typedefs.
Definition stl_set.h:153
│ │ │ -
set(const set &)=default
Set copy constructor.
│ │ │ -
iterator upper_bound(const key_type &__x)
Finds the end of a subsequence matching given key.
Definition stl_set.h:861
│ │ │ -
iterator lower_bound(const key_type &__x)
Finds the beginning of a subsequence matching given key.
Definition stl_set.h:831
│ │ │ -
auto upper_bound(const _Kt &__x) -> decltype(iterator(_M_t._M_upper_bound_tr(__x)))
Finds the end of a subsequence matching given key.
Definition stl_set.h:871
│ │ │ -
iterator emplace_hint(const_iterator __pos, _Args &&... __args)
Attempts to insert an element into the set.
Definition stl_set.h:490
│ │ │ -
set & operator=(const set &)=default
Set assignment operator.
│ │ │ -
iterator begin() const noexcept
Definition stl_set.h:346
│ │ │ -
node_type extract(const key_type &__x)
Extract a node.
Definition stl_set.h:595
│ │ │ -
set(const _Compare &__comp, const allocator_type &__a=allocator_type())
Creates a set with no elements.
Definition stl_set.h:178
│ │ │ -
~set()=default
│ │ │ -
iterator find(const key_type &__x)
Tries to locate an element in a set.
Definition stl_set.h:796
│ │ │ -
set & operator=(set &&)=default
Move assignment operator.
│ │ │ -
bool empty() const noexcept
Returns true if the set is empty.
Definition stl_set.h:416
│ │ │ -
size_type erase(const key_type &__x)
Erases elements according to the provided key.
Definition stl_set.h:686
│ │ │ -
const_iterator find(const key_type &__x) const
Tries to locate an element in a set.
Definition stl_set.h:800
│ │ │ -
reverse_iterator rend() const noexcept
Definition stl_set.h:373
│ │ │ - │ │ │ -
Uniform interface to C++98 and C++11 allocators.
│ │ │ + │ │ │ +
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,11 +1,11 @@ │ │ │ │ libstdc++ │ │ │ │ -stl_set.h │ │ │ │ +concept_check.h │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -1// Set implementation -*- C++ -*- │ │ │ │ +1// Concept-checking control -*- C++ -*- │ │ │ │ 2 │ │ │ │ 3// Copyright (C) 2001-2023 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,1422 +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/* │ │ │ │ -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_set.h │ │ │ │ -52 * This is an internal header file, included by other library headers. │ │ │ │ -53 * Do not attempt to use it directly. @headername{set} │ │ │ │ -54 */ │ │ │ │ +25/** @file bits/concept_check.h │ │ │ │ +26 * This is an internal header file, included by other library headers. │ │ │ │ +27 * Do not attempt to use it directly. @headername{iterator} │ │ │ │ +28 */ │ │ │ │ +29 │ │ │ │ +30#ifndef _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// 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) │ │ │ │ +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#ifndef _STL_SET_H │ │ │ │ -57#define _STL_SET_H 1 │ │ │ │ -58 │ │ │ │ -59#include <_b_i_t_s_/_c_o_n_c_e_p_t___c_h_e_c_k_._h> │ │ │ │ -60#if __cplusplus >= 201103L │ │ │ │ -61#include <_i_n_i_t_i_a_l_i_z_e_r___l_i_s_t> │ │ │ │ -62#endif │ │ │ │ -63 │ │ │ │ -64namespace _s_t_d _GLIBCXX_VISIBILITY(default) │ │ │ │ -65{ │ │ │ │ -66_GLIBCXX_BEGIN_NAMESPACE_VERSION │ │ │ │ -67_GLIBCXX_BEGIN_NAMESPACE_CONTAINER │ │ │ │ -68 │ │ │ │ -69 template │ │ │ │ -70 class multiset; │ │ │ │ -71 │ │ │ │ -72 /** │ │ │ │ -73 * @brief A standard container made up of unique keys, which can be │ │ │ │ -74 * retrieved in logarithmic time. │ │ │ │ -75 * │ │ │ │ -76 * @ingroup associative_containers │ │ │ │ -77 * @headerfile set │ │ │ │ -78 * @since C++98 │ │ │ │ -79 * │ │ │ │ -80 * @tparam _Key Type of key objects. │ │ │ │ -81 * @tparam _Compare Comparison function object type, defaults to less<_Key>. │ │ │ │ -82 * @tparam _Alloc Allocator type, defaults to allocator<_Key>. │ │ │ │ -83 * │ │ │ │ -84 * Meets the requirements of a container, a │ │ │ │ -85 * reversible container, and an │ │ │ │ -86 * associative container (using unique keys). │ │ │ │ -87 * │ │ │ │ -88 * Sets support bidirectional iterators. │ │ │ │ -89 * │ │ │ │ -90 * The private tree data is declared exactly the same way for set and │ │ │ │ -91 * multiset; the distinction is made entirely in how the tree functions are │ │ │ │ -92 * called (*_unique versus *_equal, same as the standard). │ │ │ │ -93 */ │ │ │ │ -94 template, │ │ │ │ -95 typename _Alloc = std::allocator<_Key> > │ │ │ │ -_9_6 class _s_e_t │ │ │ │ -97 { │ │ │ │ -98#ifdef _GLIBCXX_CONCEPT_CHECKS │ │ │ │ -99 // concept requirements │ │ │ │ -100 typedef typename _Alloc::value_type ___A_l_l_o_c___v_a_l_u_e___t_y_p_e; │ │ │ │ -101# if __cplusplus < 201103L │ │ │ │ -102 __glibcxx_class_requires(___K_e_y, _SGIAssignableConcept) │ │ │ │ -103# endif │ │ │ │ -104 __glibcxx_class_requires4(_Compare, bool, ___K_e_y, ___K_e_y, │ │ │ │ -105 _BinaryFunctionConcept) │ │ │ │ -106 __glibcxx_class_requires2(___K_e_y, ___A_l_l_o_c___v_a_l_u_e___t_y_p_e, _SameTypeConcept) │ │ │ │ -107#endif │ │ │ │ -108 │ │ │ │ -109#if __cplusplus >= 201103L │ │ │ │ -110 static_assert(_i_s___s_a_m_e_<_t_y_p_e_n_a_m_e_ _r_e_m_o_v_e___c_v_<___K_e_y_>_:_:_t_y_p_e, ___K_e_y>::value, │ │ │ │ -111 "std::set must have a non-const, non-volatile value_type"); │ │ │ │ -112# if __cplusplus > 201703L || defined __STRICT_ANSI__ │ │ │ │ -113 static_assert(_i_s___s_a_m_e_<_t_y_p_e_n_a_m_e_ ___A_l_l_o_c_:_:_v_a_l_u_e___t_y_p_e_,_ ___K_e_y_>_:_:_v_a_l_u_e, │ │ │ │ -114 "std::set must have the same value_type as its allocator"); │ │ │ │ -115# endif │ │ │ │ -116#endif │ │ │ │ -117 │ │ │ │ -118 public: │ │ │ │ -119 // typedefs: │ │ │ │ -120 ///@{ │ │ │ │ -121 /// Public typedefs. │ │ │ │ -_1_2_2 typedef ___K_e_y _k_e_y___t_y_p_e; │ │ │ │ -_1_2_3 typedef ___K_e_y _v_a_l_u_e___t_y_p_e; │ │ │ │ -_1_2_4 typedef _Compare _k_e_y___c_o_m_p_a_r_e; │ │ │ │ -_1_2_5 typedef _Compare _v_a_l_u_e___c_o_m_p_a_r_e; │ │ │ │ -_1_2_6 typedef _Alloc _a_l_l_o_c_a_t_o_r___t_y_p_e; │ │ │ │ -127 ///@} │ │ │ │ -128 │ │ │ │ -129 private: │ │ │ │ -130 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 │ │ │ │ -131 rebind<_Key>::other _Key_alloc_type; │ │ │ │ -132 │ │ │ │ -133 typedef ___R_b___t_r_e_e_<_k_e_y___t_y_p_e_,_ _v_a_l_u_e___t_y_p_e_,_ ___I_d_e_n_t_i_t_y_<_v_a_l_u_e___t_y_p_e_>, │ │ │ │ -134 _k_e_y___c_o_m_p_a_r_e, _Key_alloc_type> _Rep_type; │ │ │ │ -135 _Rep_type _M_t; // Red-black tree representing set. │ │ │ │ -136 │ │ │ │ -137 typedef _____g_n_u___c_x_x_:_:_____a_l_l_o_c___t_r_a_i_t_s_<___K_e_y___a_l_l_o_c___t_y_p_e_> ___A_l_l_o_c___t_r_a_i_t_s; │ │ │ │ -138 │ │ │ │ -139 public: │ │ │ │ -140 ///@{ │ │ │ │ -141 /// Iterator-related typedefs. │ │ │ │ -_1_4_2 typedef typename ___A_l_l_o_c___t_r_a_i_t_s_:_:_p_o_i_n_t_e_r _p_o_i_n_t_e_r; │ │ │ │ -_1_4_3 typedef typename _Alloc_traits::const_pointer _c_o_n_s_t___p_o_i_n_t_e_r; │ │ │ │ -_1_4_4 typedef typename _Alloc_traits::reference _r_e_f_e_r_e_n_c_e; │ │ │ │ -_1_4_5 typedef typename _Alloc_traits::const_reference _c_o_n_s_t___r_e_f_e_r_e_n_c_e; │ │ │ │ -146 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -147 // DR 103. set::iterator is required to be modifiable, │ │ │ │ -148 // but this allows modification of keys. │ │ │ │ -_1_4_9 typedef typename ___R_e_p___t_y_p_e_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r _i_t_e_r_a_t_o_r; │ │ │ │ -_1_5_0 typedef typename ___R_e_p___t_y_p_e_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r _c_o_n_s_t___i_t_e_r_a_t_o_r; │ │ │ │ -_1_5_1 typedef typename ___R_e_p___t_y_p_e_:_:_c_o_n_s_t___r_e_v_e_r_s_e___i_t_e_r_a_t_o_r _r_e_v_e_r_s_e___i_t_e_r_a_t_o_r; │ │ │ │ -_1_5_2 typedef typename ___R_e_p___t_y_p_e_:_:_c_o_n_s_t___r_e_v_e_r_s_e___i_t_e_r_a_t_o_r _c_o_n_s_t___r_e_v_e_r_s_e___i_t_e_r_a_t_o_r; │ │ │ │ -_1_5_3 typedef typename _Rep_type::size_type _s_i_z_e___t_y_p_e; │ │ │ │ -_1_5_4 typedef typename _Rep_type::difference_type _d_i_f_f_e_r_e_n_c_e___t_y_p_e; │ │ │ │ -155 ///@} │ │ │ │ -156 │ │ │ │ -157#if __cplusplus > 201402L │ │ │ │ -158 using node_type = typename ___R_e_p___t_y_p_e_:_:_n_o_d_e___t_y_p_e; │ │ │ │ -159 using insert_return_type = typename ___R_e_p___t_y_p_e_:_:_i_n_s_e_r_t___r_e_t_u_r_n___t_y_p_e; │ │ │ │ -160#endif │ │ │ │ -161 │ │ │ │ -162 // allocation/deallocation │ │ │ │ -163 /** │ │ │ │ -164 * @brief Default constructor creates no elements. │ │ │ │ -165 */ │ │ │ │ -166#if __cplusplus < 201103L │ │ │ │ -167 _s_e_t() : _M_t() { } │ │ │ │ -168#else │ │ │ │ -_1_6_9 _s_e_t() = default; │ │ │ │ -170#endif │ │ │ │ -171 │ │ │ │ -172 /** │ │ │ │ -173 * @brief Creates a %set with no elements. │ │ │ │ -174 * @param __comp Comparator to use. │ │ │ │ -175 * @param __a An allocator object. │ │ │ │ -176 */ │ │ │ │ -177 explicit │ │ │ │ -_1_7_8 _s_e_t(const _Compare& __comp, │ │ │ │ -179 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()) │ │ │ │ -180 : _M_t(__comp, _Key_alloc_type(__a)) { } │ │ │ │ -181 │ │ │ │ -182 /** │ │ │ │ -183 * @brief Builds a %set from a range. │ │ │ │ -184 * @param __first An input iterator. │ │ │ │ -185 * @param __last An input iterator. │ │ │ │ -186 * │ │ │ │ -187 * Create a %set consisting of copies of the elements from │ │ │ │ -188 * [__first,__last). This is linear in N if the range is │ │ │ │ -189 * already sorted, and NlogN otherwise (where N is │ │ │ │ -190 * distance(__first,__last)). │ │ │ │ -191 */ │ │ │ │ -192 template │ │ │ │ -_1_9_3 _s_e_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ -194 : _M_t() │ │ │ │ -195 { _M_t._M_insert_range_unique(__first, __last); } │ │ │ │ -196 │ │ │ │ -197 /** │ │ │ │ -198 * @brief Builds a %set from a range. │ │ │ │ -199 * @param __first An input iterator. │ │ │ │ -200 * @param __last An input iterator. │ │ │ │ -201 * @param __comp A comparison functor. │ │ │ │ -202 * @param __a An allocator object. │ │ │ │ -203 * │ │ │ │ -204 * Create a %set consisting of copies of the elements from │ │ │ │ -205 * [__first,__last). This is linear in N if the range is │ │ │ │ -206 * already sorted, and NlogN otherwise (where N is │ │ │ │ -207 * distance(__first,__last)). │ │ │ │ -208 */ │ │ │ │ -209 template │ │ │ │ -_2_1_0 _s_e_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ -211 const _Compare& __comp, │ │ │ │ -212 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()) │ │ │ │ -213 : _M_t(__comp, _Key_alloc_type(__a)) │ │ │ │ -214 { _M_t._M_insert_range_unique(__first, __last); } │ │ │ │ -215 │ │ │ │ -216 /** │ │ │ │ -217 * @brief %Set copy constructor. │ │ │ │ -218 * │ │ │ │ -219 * Whether the allocator is copied depends on the allocator traits. │ │ │ │ -220 */ │ │ │ │ -221#if __cplusplus < 201103L │ │ │ │ -222 _s_e_t(const _s_e_t& __x) │ │ │ │ -223 : _M_t(__x._M_t) { } │ │ │ │ -224#else │ │ │ │ -_2_2_5 _s_e_t(const _s_e_t&) = default; │ │ │ │ -226 │ │ │ │ -227 /** │ │ │ │ -228 * @brief %Set move constructor │ │ │ │ -229 * │ │ │ │ -230 * The newly-created %set contains the exact contents of the moved │ │ │ │ -231 * instance. The moved instance is a valid, but unspecified, %set. │ │ │ │ -232 */ │ │ │ │ -_2_3_3 _s_e_t(_s_e_t&&) = default; │ │ │ │ -234 │ │ │ │ -235 /** │ │ │ │ -236 * @brief Builds a %set from an initializer_list. │ │ │ │ -237 * @param __l An initializer_list. │ │ │ │ -238 * @param __comp A comparison functor. │ │ │ │ -239 * @param __a An allocator object. │ │ │ │ -240 * │ │ │ │ -241 * Create a %set consisting of copies of the elements in the list. │ │ │ │ -242 * This is linear in N if the list is already sorted, and NlogN │ │ │ │ -243 * otherwise (where N is @a __l.size()). │ │ │ │ -244 */ │ │ │ │ -_2_4_5 _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, │ │ │ │ -246 const _Compare& __comp = _Compare(), │ │ │ │ -247 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()) │ │ │ │ -248 : _M_t(__comp, _Key_alloc_type(__a)) │ │ │ │ -249 { _M_t._M_insert_range_unique(_____l.begin(), _____l.end()); } │ │ │ │ -250 │ │ │ │ -251 /// Allocator-extended default constructor. │ │ │ │ -252 explicit │ │ │ │ -_2_5_3 _s_e_t(const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -254 : _M_t(_Key_alloc_type(__a)) { } │ │ │ │ -255 │ │ │ │ -256 /// Allocator-extended copy constructor. │ │ │ │ -_2_5_7 _s_e_t(const _s_e_t& __x, const _____t_y_p_e___i_d_e_n_t_i_t_y___t_<_a_l_l_o_c_a_t_o_r___t_y_p_e_>& __a) │ │ │ │ -258 : _M_t(__x._M_t, _Key_alloc_type(__a)) { } │ │ │ │ -259 │ │ │ │ -260 /// Allocator-extended move constructor. │ │ │ │ -_2_6_1 _s_e_t(_s_e_t&& __x, const _____t_y_p_e___i_d_e_n_t_i_t_y___t_<_a_l_l_o_c_a_t_o_r___t_y_p_e_>& __a) │ │ │ │ -262 noexcept(_i_s___n_o_t_h_r_o_w___c_o_p_y___c_o_n_s_t_r_u_c_t_i_b_l_e_<___C_o_m_p_a_r_e_>_:_:_v_a_l_u_e │ │ │ │ -263 && _Alloc_traits::_S_always_equal()) │ │ │ │ -264 : _M_t(_s_t_d::_m_o_v_e(__x._M_t), _Key_alloc_type(__a)) { } │ │ │ │ -265 │ │ │ │ -266 /// Allocator-extended initialier-list constructor. │ │ │ │ -_2_6_7 _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, const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -268 : _M_t(_Key_alloc_type(__a)) │ │ │ │ -269 { _M_t._M_insert_range_unique(_____l.begin(), _____l.end()); } │ │ │ │ -270 │ │ │ │ -271 /// Allocator-extended range constructor. │ │ │ │ -272 template │ │ │ │ -_2_7_3 _s_e_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last, │ │ │ │ -274 const _a_l_l_o_c_a_t_o_r___t_y_p_e& __a) │ │ │ │ -275 : _M_t(_Key_alloc_type(__a)) │ │ │ │ -276 { _M_t._M_insert_range_unique(__first, __last); } │ │ │ │ -277 │ │ │ │ -278 /** │ │ │ │ -279 * The dtor only erases the elements, and note that if the elements │ │ │ │ -280 * themselves are pointers, the pointed-to memory is not touched in any │ │ │ │ -281 * way. Managing the pointer is the user's responsibility. │ │ │ │ -282 */ │ │ │ │ -_2_8_3 _~_s_e_t() = default; │ │ │ │ -284#endif │ │ │ │ -285 │ │ │ │ -286 /** │ │ │ │ -287 * @brief %Set assignment operator. │ │ │ │ -288 * │ │ │ │ -289 * Whether the allocator is copied depends on the allocator traits. │ │ │ │ -290 */ │ │ │ │ -291#if __cplusplus < 201103L │ │ │ │ -292 _s_e_t& │ │ │ │ -293 _o_p_e_r_a_t_o_r_=(const _s_e_t& __x) │ │ │ │ -294 { │ │ │ │ -295 _M_t = __x._M_t; │ │ │ │ -296 return *this; │ │ │ │ -297 } │ │ │ │ -298#else │ │ │ │ -299 _s_e_t& │ │ │ │ -_3_0_0 _o_p_e_r_a_t_o_r_=(const _s_e_t&) = default; │ │ │ │ -301 │ │ │ │ -302 /// Move assignment operator. │ │ │ │ -303 _s_e_t& │ │ │ │ -_3_0_4 _o_p_e_r_a_t_o_r_=(_s_e_t&&) = default; │ │ │ │ -305 │ │ │ │ -306 /** │ │ │ │ -307 * @brief %Set list assignment operator. │ │ │ │ -308 * @param __l An initializer_list. │ │ │ │ -309 * │ │ │ │ -310 * This function fills a %set with copies of the elements in the │ │ │ │ -311 * initializer list @a __l. │ │ │ │ -312 * │ │ │ │ -313 * Note that the assignment completely changes the %set and │ │ │ │ -314 * that the resulting %set's size is the same as the number │ │ │ │ -315 * of elements assigned. │ │ │ │ -316 */ │ │ │ │ -317 _s_e_t& │ │ │ │ -_3_1_8 _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) │ │ │ │ -319 { │ │ │ │ -320 _M_t._M_assign_unique(_____l.begin(), _____l.end()); │ │ │ │ -321 return *this; │ │ │ │ -322 } │ │ │ │ -323#endif │ │ │ │ -324 │ │ │ │ -325 // accessors: │ │ │ │ -326 │ │ │ │ -327 /// Returns the comparison object with which the %set was constructed. │ │ │ │ -328 _k_e_y___c_o_m_p_a_r_e │ │ │ │ -_3_2_9 _k_e_y___c_o_m_p() const │ │ │ │ -330 { return _M_t.key_comp(); } │ │ │ │ -331 /// Returns the comparison object with which the %set was constructed. │ │ │ │ -332 _v_a_l_u_e___c_o_m_p_a_r_e │ │ │ │ -_3_3_3 _v_a_l_u_e___c_o_m_p() const │ │ │ │ -334 { return _M_t.key_comp(); } │ │ │ │ -335 /// Returns the allocator object with which the %set was constructed. │ │ │ │ -336 _a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_3_3_7 _g_e_t___a_l_l_o_c_a_t_o_r() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -338 { return _a_l_l_o_c_a_t_o_r___t_y_p_e(_M_t.get_allocator()); } │ │ │ │ -339 │ │ │ │ -340 /** │ │ │ │ -341 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -342 * element in the %set. Iteration is done in ascending order according │ │ │ │ -343 * to the keys. │ │ │ │ -344 */ │ │ │ │ -345 _i_t_e_r_a_t_o_r │ │ │ │ -_3_4_6 _b_e_g_i_n() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -347 { return _M_t.begin(); } │ │ │ │ -348 │ │ │ │ -349 /** │ │ │ │ -350 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -351 * element in the %set. Iteration is done in ascending order according │ │ │ │ -352 * to the keys. │ │ │ │ -353 */ │ │ │ │ -354 _i_t_e_r_a_t_o_r │ │ │ │ -_3_5_5 _e_n_d() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -356 { return _M_t.end(); } │ │ │ │ -357 │ │ │ │ -358 /** │ │ │ │ -359 * Returns a read-only (constant) iterator that points to the last │ │ │ │ -360 * element in the %set. Iteration is done in descending order according │ │ │ │ -361 * to the keys. │ │ │ │ -362 */ │ │ │ │ -363 _r_e_v_e_r_s_e___i_t_e_r_a_t_o_r │ │ │ │ -_3_6_4 _r_b_e_g_i_n() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -365 { return _M_t.rbegin(); } │ │ │ │ -366 │ │ │ │ -367 /** │ │ │ │ -368 * Returns a read-only (constant) reverse iterator that points to the │ │ │ │ -369 * last pair in the %set. Iteration is done in descending order │ │ │ │ -370 * according to the keys. │ │ │ │ -371 */ │ │ │ │ -372 _r_e_v_e_r_s_e___i_t_e_r_a_t_o_r │ │ │ │ -_3_7_3 _r_e_n_d() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -374 { return _M_t.rend(); } │ │ │ │ -375 │ │ │ │ -376#if __cplusplus >= 201103L │ │ │ │ -377 /** │ │ │ │ -378 * Returns a read-only (constant) iterator that points to the first │ │ │ │ -379 * element in the %set. Iteration is done in ascending order according │ │ │ │ -380 * to the keys. │ │ │ │ -381 */ │ │ │ │ -382 _i_t_e_r_a_t_o_r │ │ │ │ -_3_8_3 _c_b_e_g_i_n() const noexcept │ │ │ │ -384 { return _M_t.begin(); } │ │ │ │ -385 │ │ │ │ -386 /** │ │ │ │ -387 * Returns a read-only (constant) iterator that points one past the last │ │ │ │ -388 * element in the %set. Iteration is done in ascending order according │ │ │ │ -389 * to the keys. │ │ │ │ -390 */ │ │ │ │ -391 _i_t_e_r_a_t_o_r │ │ │ │ -_3_9_2 _c_e_n_d() const noexcept │ │ │ │ -393 { return _M_t.end(); } │ │ │ │ -394 │ │ │ │ -395 /** │ │ │ │ -396 * Returns a read-only (constant) iterator that points to the last │ │ │ │ -397 * element in the %set. Iteration is done in descending order according │ │ │ │ -398 * to the keys. │ │ │ │ -399 */ │ │ │ │ -400 _r_e_v_e_r_s_e___i_t_e_r_a_t_o_r │ │ │ │ -_4_0_1 _c_r_b_e_g_i_n() const noexcept │ │ │ │ -402 { return _M_t.rbegin(); } │ │ │ │ -403 │ │ │ │ -404 /** │ │ │ │ -405 * Returns a read-only (constant) reverse iterator that points to the │ │ │ │ -406 * last pair in the %set. Iteration is done in descending order │ │ │ │ -407 * according to the keys. │ │ │ │ -408 */ │ │ │ │ -409 _r_e_v_e_r_s_e___i_t_e_r_a_t_o_r │ │ │ │ -_4_1_0 _c_r_e_n_d() const noexcept │ │ │ │ -411 { return _M_t.rend(); } │ │ │ │ -412#endif │ │ │ │ -413 │ │ │ │ -414 /// Returns true if the %set is empty. │ │ │ │ -415 _GLIBCXX_NODISCARD bool │ │ │ │ -_4_1_6 _e_m_p_t_y() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -417 { return _M_t.empty(); } │ │ │ │ -418 │ │ │ │ -419 /// Returns the size of the %set. │ │ │ │ -420 _s_i_z_e___t_y_p_e │ │ │ │ -_4_2_1 _s_i_z_e() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -422 { return _M_t.size(); } │ │ │ │ -423 │ │ │ │ -424 /// Returns the maximum size of the %set. │ │ │ │ -425 _s_i_z_e___t_y_p_e │ │ │ │ -_4_2_6 _m_a_x___s_i_z_e() const ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -427 { return _M_t.max_size(); } │ │ │ │ -428 │ │ │ │ -429 /** │ │ │ │ -430 * @brief Swaps data with another %set. │ │ │ │ -431 * @param __x A %set of the same element and allocator types. │ │ │ │ -432 * │ │ │ │ -433 * This exchanges the elements between two sets in constant │ │ │ │ -434 * time. (It is only swapping a pointer, an integer, and an │ │ │ │ -435 * instance of the @c Compare type (which itself is often │ │ │ │ -436 * stateless and empty), so it should be quite fast.) Note │ │ │ │ -437 * that the global std::swap() function is specialized such │ │ │ │ -438 * that std::swap(s1,s2) will feed to this function. │ │ │ │ -439 * │ │ │ │ -440 * Whether the allocators are swapped depends on the allocator traits. │ │ │ │ -441 */ │ │ │ │ -442 void │ │ │ │ -_4_4_3 _s_w_a_p(_s_e_t& __x) │ │ │ │ -444 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T___I_F(_____i_s___n_o_t_h_r_o_w___s_w_a_p_p_a_b_l_e_<___C_o_m_p_a_r_e_>_:_:_v_a_l_u_e) │ │ │ │ -445 { _M_t.swap(__x._M_t); } │ │ │ │ -446 │ │ │ │ -447 // insert/erase │ │ │ │ -448#if __cplusplus >= 201103L │ │ │ │ -449 /** │ │ │ │ -450 * @brief Attempts to build and insert an element into the %set. │ │ │ │ -451 * @param __args Arguments used to generate an element. │ │ │ │ -452 * @return A pair, of which the first element is an iterator that points │ │ │ │ -453 * to the possibly inserted element, and the second is a bool │ │ │ │ -454 * that is true if the element was actually inserted. │ │ │ │ -455 * │ │ │ │ -456 * This function attempts to build and insert an element into the %set. │ │ │ │ -457 * A %set relies on unique keys and thus an element is only inserted if │ │ │ │ -458 * it is not already present in the %set. │ │ │ │ -459 * │ │ │ │ -460 * Insertion requires logarithmic time. │ │ │ │ -461 */ │ │ │ │ -462 template │ │ │ │ -463 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_4_6_4 _e_m_p_l_a_c_e(___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -465 { return _M_t._M_emplace_unique(_s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); } │ │ │ │ -466 │ │ │ │ -467 /** │ │ │ │ -468 * @brief Attempts to insert an element into the %set. │ │ │ │ -469 * @param __pos An iterator that serves as a hint as to where the │ │ │ │ -470 * element should be inserted. │ │ │ │ -471 * @param __args Arguments used to generate the element to be │ │ │ │ -472 * inserted. │ │ │ │ -473 * @return An iterator that points to the element with key equivalent to │ │ │ │ -474 * the one generated from @a __args (may or may not be the │ │ │ │ -475 * element itself). │ │ │ │ -476 * │ │ │ │ -477 * This function is not concerned about whether the insertion took place, │ │ │ │ -478 * and thus does not return a boolean like the single-argument emplace() │ │ │ │ -479 * does. Note that the first parameter is only a hint and can │ │ │ │ -480 * potentially improve the performance of the insertion process. A bad │ │ │ │ -481 * hint would cause no gains in efficiency. │ │ │ │ -482 * │ │ │ │ -483 * For more on @a hinting, see: │ │ │ │ -484 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -485 * │ │ │ │ -486 * Insertion requires logarithmic time (if the hint is not taken). │ │ │ │ -487 */ │ │ │ │ -488 template │ │ │ │ -489 _i_t_e_r_a_t_o_r │ │ │ │ -_4_9_0 _e_m_p_l_a_c_e___h_i_n_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s, ___A_r_g_s&&... _____a_r_g_s) │ │ │ │ -491 { │ │ │ │ -492 return _M_t._M_emplace_hint_unique(_____p_o_s, │ │ │ │ -493 _s_t_d_:_:_f_o_r_w_a_r_d_<___A_r_g_s_>(_____a_r_g_s)...); │ │ │ │ -494 } │ │ │ │ -495#endif │ │ │ │ -496 │ │ │ │ -497 /** │ │ │ │ -498 * @brief Attempts to insert an element into the %set. │ │ │ │ -499 * @param __x Element to be inserted. │ │ │ │ -500 * @return A pair, of which the first element is an iterator that points │ │ │ │ -501 * to the possibly inserted element, and the second is a bool │ │ │ │ -502 * that is true if the element was actually inserted. │ │ │ │ -503 * │ │ │ │ -504 * This function attempts to insert an element into the %set. A %set │ │ │ │ -505 * relies on unique keys and thus an element is only inserted if it is │ │ │ │ -506 * not already present in the %set. │ │ │ │ -507 * │ │ │ │ -508 * Insertion requires logarithmic time. │ │ │ │ -509 */ │ │ │ │ -510 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -_5_1_1 _i_n_s_e_r_t(const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -512 { │ │ │ │ -513 _s_t_d_:_:_p_a_i_r_<_t_y_p_e_n_a_m_e_ ___R_e_p___t_y_p_e_:_:_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> __p = │ │ │ │ -514 _M_t._M_insert_unique(__x); │ │ │ │ -515 return _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_>(__p.first, __p.second); │ │ │ │ -516 } │ │ │ │ -517 │ │ │ │ -518#if __cplusplus >= 201103L │ │ │ │ -519 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> │ │ │ │ -520 _i_n_s_e_r_t(_v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -521 { │ │ │ │ -522 _s_t_d_:_:_p_a_i_r_<_t_y_p_e_n_a_m_e_ ___R_e_p___t_y_p_e_:_:_i_t_e_r_a_t_o_r_,_ _b_o_o_l_> __p = │ │ │ │ -523 _M_t._M_insert_unique(_s_t_d_:_:_m_o_v_e(__x)); │ │ │ │ -524 return _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _b_o_o_l_>(__p.first, __p.second); │ │ │ │ -525 } │ │ │ │ -526#endif │ │ │ │ -527 │ │ │ │ -528 /** │ │ │ │ -529 * @brief Attempts to insert an element into the %set. │ │ │ │ -530 * @param __position An iterator that serves as a hint as to where the │ │ │ │ -531 * element should be inserted. │ │ │ │ -532 * @param __x Element to be inserted. │ │ │ │ -533 * @return An iterator that points to the element with key of │ │ │ │ -534 * @a __x (may or may not be the element passed in). │ │ │ │ -535 * │ │ │ │ -536 * This function is not concerned about whether the insertion took place, │ │ │ │ -537 * and thus does not return a boolean like the single-argument insert() │ │ │ │ -538 * does. Note that the first parameter is only a hint and can │ │ │ │ -539 * potentially improve the performance of the insertion process. A bad │ │ │ │ -540 * hint would cause no gains in efficiency. │ │ │ │ -541 * │ │ │ │ -542 * For more on @a hinting, see: │ │ │ │ -543 * https://gcc.gnu.org/onlinedocs/libstdc++/manual/ │ │ │ │ -associative.html#containers.associative.insert_hints │ │ │ │ -544 * │ │ │ │ -545 * Insertion requires logarithmic time (if the hint is not taken). │ │ │ │ -546 */ │ │ │ │ -547 _i_t_e_r_a_t_o_r │ │ │ │ -_5_4_8 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n, const _v_a_l_u_e___t_y_p_e& __x) │ │ │ │ -549 { return _M_t._M_insert_unique_(_____p_o_s_i_t_i_o_n, __x); } │ │ │ │ -550 │ │ │ │ -551#if __cplusplus >= 201103L │ │ │ │ -552 _i_t_e_r_a_t_o_r │ │ │ │ -553 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n, _v_a_l_u_e___t_y_p_e&& __x) │ │ │ │ -554 { return _M_t._M_insert_unique_(_____p_o_s_i_t_i_o_n, _s_t_d_:_:_m_o_v_e(__x)); } │ │ │ │ -555#endif │ │ │ │ -556 │ │ │ │ -557 /** │ │ │ │ -558 * @brief A template function that attempts to insert a range │ │ │ │ -559 * of elements. │ │ │ │ -560 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -561 * inserted. │ │ │ │ -562 * @param __last Iterator pointing to the end of the range. │ │ │ │ -563 * │ │ │ │ -564 * Complexity similar to that of the range constructor. │ │ │ │ -565 */ │ │ │ │ -566 template │ │ │ │ -567 void │ │ │ │ -_5_6_8 _i_n_s_e_r_t(___I_n_p_u_t_I_t_e_r_a_t_o_r __first, ___I_n_p_u_t_I_t_e_r_a_t_o_r __last) │ │ │ │ -569 { _M_t._M_insert_range_unique(__first, __last); } │ │ │ │ -570 │ │ │ │ -571#if __cplusplus >= 201103L │ │ │ │ -572 /** │ │ │ │ -573 * @brief Attempts to insert a list of elements into the %set. │ │ │ │ -574 * @param __l A std::initializer_list of elements │ │ │ │ -575 * to be inserted. │ │ │ │ -576 * │ │ │ │ -577 * Complexity similar to that of the range constructor. │ │ │ │ -578 */ │ │ │ │ -579 void │ │ │ │ -_5_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) │ │ │ │ -581 { this->_i_n_s_e_r_t(__l.begin(), _____l.end()); } │ │ │ │ -582#endif │ │ │ │ -583 │ │ │ │ -584#if __cplusplus > 201402L │ │ │ │ -585 /// Extract a node. │ │ │ │ -586 node_type │ │ │ │ -_5_8_7 _e_x_t_r_a_c_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s) │ │ │ │ -588 { │ │ │ │ -589 __glibcxx_assert(_____p_o_s != _e_n_d()); │ │ │ │ -590 return _M_t.extract(_____p_o_s); │ │ │ │ -591 } │ │ │ │ -592 │ │ │ │ -593 /// Extract a node. │ │ │ │ -594 node_type │ │ │ │ -_5_9_5 _e_x_t_r_a_c_t(const _k_e_y___t_y_p_e& __x) │ │ │ │ -596 { return _M_t.extract(__x); } │ │ │ │ -597 │ │ │ │ -598 /// Re-insert an extracted node. │ │ │ │ -599 insert_return_type │ │ │ │ -_6_0_0 _i_n_s_e_r_t(node_type&& _____n_h) │ │ │ │ -601 { return _M_t._M_reinsert_node_unique(_s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ -602 │ │ │ │ -603 /// Re-insert an extracted node. │ │ │ │ -604 _i_t_e_r_a_t_o_r │ │ │ │ -_6_0_5 _i_n_s_e_r_t(_c_o_n_s_t___i_t_e_r_a_t_o_r _____h_i_n_t, node_type&& _____n_h) │ │ │ │ -606 { return _M_t._M_reinsert_node_hint_unique(_____h_i_n_t, _s_t_d_:_:_m_o_v_e(_____n_h)); } │ │ │ │ -607 │ │ │ │ -608 template │ │ │ │ -609 friend struct std::_Rb_tree_merge_helper; │ │ │ │ -610 │ │ │ │ -611 template │ │ │ │ -612 void │ │ │ │ -613 merge(_s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_1_,_ ___A_l_l_o_c_>& _____s_o_u_r_c_e) │ │ │ │ -614 { │ │ │ │ -615 using ___M_e_r_g_e___h_e_l_p_e_r = ___R_b___t_r_e_e___m_e_r_g_e___h_e_l_p_e_r_<_s_e_t_,_ ___C_o_m_p_a_r_e_1_>; │ │ │ │ -616 _M_t._M_merge_unique(_Merge_helper::_S_get_tree(_____s_o_u_r_c_e)); │ │ │ │ -617 } │ │ │ │ -618 │ │ │ │ -619 template │ │ │ │ -620 void │ │ │ │ -621 merge(set<_Key, _Compare1, _Alloc>&& __source) │ │ │ │ -622 { merge(__source); } │ │ │ │ -623 │ │ │ │ -624 template │ │ │ │ -625 void │ │ │ │ -626 merge(multiset<_Key, _Compare1, _Alloc>& __source) │ │ │ │ -627 { │ │ │ │ -628 using _Merge_helper = _Rb_tree_merge_helper; │ │ │ │ -629 _M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source)); │ │ │ │ -630 } │ │ │ │ -631 │ │ │ │ -632 template │ │ │ │ -633 void │ │ │ │ -634 merge(multiset<_Key, _Compare1, _Alloc>&& __source) │ │ │ │ -635 { merge(__source); } │ │ │ │ -636#endif // C++17 │ │ │ │ -637 │ │ │ │ -638#if __cplusplus >= 201103L │ │ │ │ -639 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -640 // DR 130. Associative erase should return an iterator. │ │ │ │ -641 /** │ │ │ │ -642 * @brief Erases an element from a %set. │ │ │ │ -643 * @param __position An iterator pointing to the element to be erased. │ │ │ │ -644 * @return An iterator pointing to the element immediately following │ │ │ │ -645 * @a __position prior to the element being erased. If no such │ │ │ │ -646 * element exists, end() is returned. │ │ │ │ -647 * │ │ │ │ -648 * This function erases an element, pointed to by the given iterator, │ │ │ │ -649 * from a %set. Note that this function only erases the element, and │ │ │ │ -650 * that if the element is itself a pointer, the pointed-to memory is not │ │ │ │ -651 * touched in any way. Managing the pointer is the user's │ │ │ │ -652 * responsibility. │ │ │ │ -653 */ │ │ │ │ -654 _GLIBCXX_ABI_TAG_CXX11 │ │ │ │ -655 _i_t_e_r_a_t_o_r │ │ │ │ -_6_5_6 _e_r_a_s_e(_c_o_n_s_t___i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -657 { return _M_t.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -658#else │ │ │ │ -659 /** │ │ │ │ -660 * @brief Erases an element from a %set. │ │ │ │ -661 * @param position An iterator pointing to the element to be erased. │ │ │ │ -662 * │ │ │ │ -663 * This function erases an element, pointed to by the given iterator, │ │ │ │ -664 * from a %set. Note that this function only erases the element, and │ │ │ │ -665 * that if the element is itself a pointer, the pointed-to memory is not │ │ │ │ -666 * touched in any way. Managing the pointer is the user's │ │ │ │ -667 * responsibility. │ │ │ │ -668 */ │ │ │ │ -669 void │ │ │ │ -670 _e_r_a_s_e(_i_t_e_r_a_t_o_r _____p_o_s_i_t_i_o_n) │ │ │ │ -671 { _M_t.erase(_____p_o_s_i_t_i_o_n); } │ │ │ │ -672#endif │ │ │ │ -673 │ │ │ │ -674 /** │ │ │ │ -675 * @brief Erases elements according to the provided key. │ │ │ │ -676 * @param __x Key of element to be erased. │ │ │ │ -677 * @return The number of elements erased. │ │ │ │ -678 * │ │ │ │ -679 * This function erases all the elements located by the given key from │ │ │ │ -680 * a %set. │ │ │ │ -681 * Note that this function only erases the element, and that if │ │ │ │ -682 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -683 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -684 */ │ │ │ │ -685 _s_i_z_e___t_y_p_e │ │ │ │ -_6_8_6 _e_r_a_s_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -687 { return _M_t.erase(__x); } │ │ │ │ -688 │ │ │ │ -689#if __cplusplus >= 201103L │ │ │ │ -690 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -691 // DR 130. Associative erase should return an iterator. │ │ │ │ -692 /** │ │ │ │ -693 * @brief Erases a [__first,__last) range of elements from a %set. │ │ │ │ -694 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -695 * erased. │ │ │ │ -696 │ │ │ │ -697 * @param __last Iterator pointing to the end of the range to │ │ │ │ -698 * be erased. │ │ │ │ -699 * @return The iterator @a __last. │ │ │ │ -700 * │ │ │ │ -701 * This function erases a sequence of elements from a %set. │ │ │ │ -702 * Note that this function only erases the element, and that if │ │ │ │ -703 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -704 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -705 */ │ │ │ │ -706 _GLIBCXX_ABI_TAG_CXX11 │ │ │ │ -707 _i_t_e_r_a_t_o_r │ │ │ │ -_7_0_8 _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) │ │ │ │ -709 { return _M_t.erase(__first, __last); } │ │ │ │ -710#else │ │ │ │ -711 /** │ │ │ │ -712 * @brief Erases a [first,last) range of elements from a %set. │ │ │ │ -713 * @param __first Iterator pointing to the start of the range to be │ │ │ │ -714 * erased. │ │ │ │ -715 * @param __last Iterator pointing to the end of the range to │ │ │ │ -716 * be erased. │ │ │ │ -717 * │ │ │ │ -718 * This function erases a sequence of elements from a %set. │ │ │ │ -719 * Note that this function only erases the element, and that if │ │ │ │ -720 * the element is itself a pointer, the pointed-to memory is not touched │ │ │ │ -721 * in any way. Managing the pointer is the user's responsibility. │ │ │ │ -722 */ │ │ │ │ -723 void │ │ │ │ -724 _e_r_a_s_e(_i_t_e_r_a_t_o_r __first, _i_t_e_r_a_t_o_r __last) │ │ │ │ -725 { _M_t.erase(__first, __last); } │ │ │ │ -726#endif │ │ │ │ -727 │ │ │ │ -728 /** │ │ │ │ -729 * Erases all elements in a %set. Note that this function only erases │ │ │ │ -730 * the elements, and that if the elements themselves are pointers, the │ │ │ │ -731 * pointed-to memory is not touched in any way. Managing the pointer is │ │ │ │ -732 * the user's responsibility. │ │ │ │ -733 */ │ │ │ │ -734 void │ │ │ │ -_7_3_5 _c_l_e_a_r() ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T │ │ │ │ -736 { _M_t.clear(); } │ │ │ │ -737 │ │ │ │ -738 // set operations: │ │ │ │ -739 │ │ │ │ -740 ///@{ │ │ │ │ -741 /** │ │ │ │ -742 * @brief Finds the number of elements. │ │ │ │ -743 * @param __x Element to located. │ │ │ │ -744 * @return Number of elements with specified key. │ │ │ │ -745 * │ │ │ │ -746 * This function only makes sense for multisets; for set the result will │ │ │ │ -747 * either be 0 (not present) or 1 (present). │ │ │ │ -748 */ │ │ │ │ -749 _s_i_z_e___t_y_p_e │ │ │ │ -_7_5_0 _c_o_u_n_t(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -751 { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } │ │ │ │ -752 │ │ │ │ -753#if __cplusplus > 201103L │ │ │ │ -754 template │ │ │ │ -755 auto │ │ │ │ -_7_5_6 _c_o_u_n_t(const ___K_t& __x) const │ │ │ │ -757 -> decltype(_M_t._M_count_tr(__x)) │ │ │ │ -758 { return _M_t._M_count_tr(__x); } │ │ │ │ -759#endif │ │ │ │ -760 ///@} │ │ │ │ -761 │ │ │ │ -762#if __cplusplus > 201703L │ │ │ │ -763 ///@{ │ │ │ │ -764 /** │ │ │ │ -765 * @brief Finds whether an element with the given key exists. │ │ │ │ -766 * @param __x Key of elements to be located. │ │ │ │ -767 * @return True if there is an element with the specified key. │ │ │ │ -768 */ │ │ │ │ -769 bool │ │ │ │ -_7_7_0 _c_o_n_t_a_i_n_s(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -771 { return _M_t.find(__x) != _M_t.end(); } │ │ │ │ -772 │ │ │ │ -773 template │ │ │ │ -774 auto │ │ │ │ -_7_7_5 _c_o_n_t_a_i_n_s(const ___K_t& __x) const │ │ │ │ -776 -> decltype(_M_t._M_find_tr(__x), _v_o_i_d(), true) │ │ │ │ -777 { return _M_t._M_find_tr(__x) != _M_t.end(); } │ │ │ │ -778 ///@} │ │ │ │ -779#endif │ │ │ │ -780 │ │ │ │ -781 // _GLIBCXX_RESOLVE_LIB_DEFECTS │ │ │ │ -782 // 214. set::find() missing const overload │ │ │ │ -783 ///@{ │ │ │ │ -784 /** │ │ │ │ -785 * @brief Tries to locate an element in a %set. │ │ │ │ -786 * @param __x Element to be located. │ │ │ │ -787 * @return Iterator pointing to sought-after element, or end() if not │ │ │ │ -788 * found. │ │ │ │ -789 * │ │ │ │ -790 * This function takes a key and tries to locate the element with which │ │ │ │ -791 * the key matches. If successful the function returns an iterator │ │ │ │ -792 * pointing to the sought after element. If unsuccessful it returns the │ │ │ │ -793 * past-the-end ( @c end() ) iterator. │ │ │ │ -794 */ │ │ │ │ -795 _i_t_e_r_a_t_o_r │ │ │ │ -_7_9_6 _f_i_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -797 { return _M_t.find(__x); } │ │ │ │ -798 │ │ │ │ -799 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_8_0_0 _f_i_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -801 { return _M_t.find(__x); } │ │ │ │ -802 │ │ │ │ -803#if __cplusplus > 201103L │ │ │ │ -804 template │ │ │ │ -805 auto │ │ │ │ -_8_0_6 _f_i_n_d(const ___K_t& __x) │ │ │ │ -807 -> decltype(_i_t_e_r_a_t_o_r{_M_t._M_find_tr(__x)}) │ │ │ │ -808 { return _i_t_e_r_a_t_o_r{_M_t._M_find_tr(__x)}; } │ │ │ │ -809 │ │ │ │ -810 template │ │ │ │ -811 auto │ │ │ │ -_8_1_2 _f_i_n_d(const ___K_t& __x) const │ │ │ │ -813 -> decltype(_c_o_n_s_t___i_t_e_r_a_t_o_r{_M_t._M_find_tr(__x)}) │ │ │ │ -814 { return _c_o_n_s_t___i_t_e_r_a_t_o_r{_M_t._M_find_tr(__x)}; } │ │ │ │ -815#endif │ │ │ │ -816 ///@} │ │ │ │ -817 │ │ │ │ -818 ///@{ │ │ │ │ -819 /** │ │ │ │ -820 * @brief Finds the beginning of a subsequence matching given key. │ │ │ │ -821 * @param __x Key to be located. │ │ │ │ -822 * @return Iterator pointing to first element equal to or greater │ │ │ │ -823 * than key, or end(). │ │ │ │ -824 * │ │ │ │ -825 * This function returns the first element of a subsequence of elements │ │ │ │ -826 * that matches the given key. If unsuccessful it returns an iterator │ │ │ │ -827 * pointing to the first element that has a greater value than given key │ │ │ │ -828 * or end() if no such element exists. │ │ │ │ -829 */ │ │ │ │ -830 _i_t_e_r_a_t_o_r │ │ │ │ -_8_3_1 _l_o_w_e_r___b_o_u_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -832 { return _M_t.lower_bound(__x); } │ │ │ │ -833 │ │ │ │ -834 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_8_3_5 _l_o_w_e_r___b_o_u_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -836 { return _M_t.lower_bound(__x); } │ │ │ │ -837 │ │ │ │ -838#if __cplusplus > 201103L │ │ │ │ -839 template │ │ │ │ -840 auto │ │ │ │ -_8_4_1 _l_o_w_e_r___b_o_u_n_d(const ___K_t& __x) │ │ │ │ -842 -> decltype(_i_t_e_r_a_t_o_r(_M_t._M_lower_bound_tr(__x))) │ │ │ │ -843 { return _i_t_e_r_a_t_o_r(_M_t._M_lower_bound_tr(__x)); } │ │ │ │ -844 │ │ │ │ -845 template │ │ │ │ -846 auto │ │ │ │ -_8_4_7 _l_o_w_e_r___b_o_u_n_d(const ___K_t& __x) const │ │ │ │ -848 -> decltype(_c_o_n_s_t___i_t_e_r_a_t_o_r(_M_t._M_lower_bound_tr(__x))) │ │ │ │ -849 { return _c_o_n_s_t___i_t_e_r_a_t_o_r(_M_t._M_lower_bound_tr(__x)); } │ │ │ │ -850#endif │ │ │ │ -851 ///@} │ │ │ │ -852 │ │ │ │ -853 ///@{ │ │ │ │ -854 /** │ │ │ │ -855 * @brief Finds the end of a subsequence matching given key. │ │ │ │ -856 * @param __x Key to be located. │ │ │ │ -857 * @return Iterator pointing to the first element │ │ │ │ -858 * greater than key, or end(). │ │ │ │ -859 */ │ │ │ │ -860 _i_t_e_r_a_t_o_r │ │ │ │ -_8_6_1 _u_p_p_e_r___b_o_u_n_d(const _k_e_y___t_y_p_e& __x) │ │ │ │ -862 { return _M_t.upper_bound(__x); } │ │ │ │ -863 │ │ │ │ -864 _c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_8_6_5 _u_p_p_e_r___b_o_u_n_d(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -866 { return _M_t.upper_bound(__x); } │ │ │ │ -867 │ │ │ │ -868#if __cplusplus > 201103L │ │ │ │ -869 template │ │ │ │ -870 auto │ │ │ │ -_8_7_1 _u_p_p_e_r___b_o_u_n_d(const ___K_t& __x) │ │ │ │ -872 -> decltype(_i_t_e_r_a_t_o_r(_M_t._M_upper_bound_tr(__x))) │ │ │ │ -873 { return _i_t_e_r_a_t_o_r(_M_t._M_upper_bound_tr(__x)); } │ │ │ │ -874 │ │ │ │ -875 template │ │ │ │ -876 auto │ │ │ │ -_8_7_7 _u_p_p_e_r___b_o_u_n_d(const ___K_t& __x) const │ │ │ │ -878 -> decltype(_i_t_e_r_a_t_o_r(_M_t._M_upper_bound_tr(__x))) │ │ │ │ -879 { return _c_o_n_s_t___i_t_e_r_a_t_o_r(_M_t._M_upper_bound_tr(__x)); } │ │ │ │ -880#endif │ │ │ │ -881 ///@} │ │ │ │ -882 │ │ │ │ -883 ///@{ │ │ │ │ -884 /** │ │ │ │ -885 * @brief Finds a subsequence matching given key. │ │ │ │ -886 * @param __x Key to be located. │ │ │ │ -887 * @return Pair of iterators that possibly points to the subsequence │ │ │ │ -888 * matching given key. │ │ │ │ -889 * │ │ │ │ -890 * This function is equivalent to │ │ │ │ -891 * @code │ │ │ │ -892 * std::make_pair(c.lower_bound(val), │ │ │ │ -893 * c.upper_bound(val)) │ │ │ │ -894 * @endcode │ │ │ │ -895 * (but is faster than making the calls separately). │ │ │ │ -896 * │ │ │ │ -897 * This function probably only makes sense for multisets. │ │ │ │ -898 */ │ │ │ │ -899 _s_t_d_:_:_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_> │ │ │ │ -_9_0_0 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) │ │ │ │ -901 { return _M_t.equal_range(__x); } │ │ │ │ -902 │ │ │ │ -903 _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_0_4 _e_q_u_a_l___r_a_n_g_e(const _k_e_y___t_y_p_e& __x) const │ │ │ │ -905 { return _M_t.equal_range(__x); } │ │ │ │ -906 │ │ │ │ -907#if __cplusplus > 201103L │ │ │ │ -908 template │ │ │ │ -909 auto │ │ │ │ -_9_1_0 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) │ │ │ │ -911 -> decltype(_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_>(_M_t._M_equal_range_tr(__x))) │ │ │ │ -912 { return _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_>(_M_t._M_equal_range_tr(__x)); } │ │ │ │ -913 │ │ │ │ -914 template │ │ │ │ -915 auto │ │ │ │ -_9_1_6 _e_q_u_a_l___r_a_n_g_e(const ___K_t& __x) const │ │ │ │ -917 -> decltype(_p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_>(_M_t._M_equal_range_tr(__x))) │ │ │ │ -918 { return _p_a_i_r_<_i_t_e_r_a_t_o_r_,_ _i_t_e_r_a_t_o_r_>(_M_t._M_equal_range_tr(__x)); } │ │ │ │ -919#endif │ │ │ │ -920 ///@} │ │ │ │ -921 │ │ │ │ -922 template │ │ │ │ -923 friend bool │ │ │ │ -924 operator==(const _s_e_t_<___K_1_,_ ___C_1_,_ ___A_1_>&, const _s_e_t_<___K_1_,_ ___C_1_,_ ___A_1_>&); │ │ │ │ -925 │ │ │ │ -926#if __cpp_lib_three_way_comparison │ │ │ │ -927 template │ │ │ │ -928 friend __detail::__synth3way_t<_K1> │ │ │ │ -929 operator<=>(const _s_e_t_<___K_1_,_ ___C_1_,_ ___A_1_>&, const _s_e_t_<___K_1_,_ ___C_1_,_ ___A_1_>&); │ │ │ │ -930#else │ │ │ │ -931 template │ │ │ │ -932 friend bool │ │ │ │ -933 operator<(const _s_e_t_<___K_1_,_ ___C_1_,_ ___A_1_>&, const _s_e_t_<___K_1_,_ ___C_1_,_ ___A_1_>&); │ │ │ │ -934#endif │ │ │ │ -935 }; │ │ │ │ -936 │ │ │ │ -937#if __cpp_deduction_guides >= 201606 │ │ │ │ -938 │ │ │ │ -939 template::value_type>, │ │ │ │ -942 typename _Allocator = │ │ │ │ -943 allocator::value_type>, │ │ │ │ -944 typename = _RequireInputIter<_InputIterator>, │ │ │ │ -945 typename = _RequireNotAllocator<_Compare>, │ │ │ │ -946 typename = _RequireAllocator<_Allocator>> │ │ │ │ -947 set(_InputIterator, _InputIterator, │ │ │ │ -948 _Compare = _Compare(), _Allocator = _Allocator()) │ │ │ │ -949 -> set::value_type, │ │ │ │ -950 _Compare, _Allocator>; │ │ │ │ -951 │ │ │ │ -952 template, │ │ │ │ -953 typename _Allocator = allocator<_Key>, │ │ │ │ -954 typename = _RequireNotAllocator<_Compare>, │ │ │ │ -955 typename = _RequireAllocator<_Allocator>> │ │ │ │ -956 set(initializer_list<_Key>, │ │ │ │ -957 _Compare = _Compare(), _Allocator = _Allocator()) │ │ │ │ -958 -> set<_Key, _Compare, _Allocator>; │ │ │ │ -959 │ │ │ │ -960 template, │ │ │ │ -962 typename = _RequireAllocator<_Allocator>> │ │ │ │ -963 set(_InputIterator, _InputIterator, _Allocator) │ │ │ │ -964 -> set::value_type, │ │ │ │ -965 less::value_type>, │ │ │ │ -966 _Allocator>; │ │ │ │ -967 │ │ │ │ -968 template> │ │ │ │ -970 set(initializer_list<_Key>, _Allocator) │ │ │ │ -971 -> set<_Key, less<_Key>, _Allocator>; │ │ │ │ -972 │ │ │ │ -973#endif // deduction guides │ │ │ │ -974 │ │ │ │ -975 /** │ │ │ │ -976 * @brief Set equality comparison. │ │ │ │ -977 * @param __x A %set. │ │ │ │ -978 * @param __y A %set of the same type as @a x. │ │ │ │ -979 * @return True iff the size and elements of the sets are equal. │ │ │ │ -980 * │ │ │ │ -981 * This is an equivalence relation. It is linear in the size of the sets. │ │ │ │ -982 * Sets are considered equivalent if their sizes are equal, and if │ │ │ │ -983 * corresponding elements compare equal. │ │ │ │ -984 */ │ │ │ │ -985 template │ │ │ │ -986 inline bool │ │ │ │ -_9_8_7 operator==(const _s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_>& __x, │ │ │ │ -988 const _s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_>& __y) │ │ │ │ -989 { return __x._M_t == __y._M_t; } │ │ │ │ -990 │ │ │ │ -991#if __cpp_lib_three_way_comparison │ │ │ │ -992 /** │ │ │ │ -993 * @brief Set ordering relation. │ │ │ │ -994 * @param __x A `set`. │ │ │ │ -995 * @param __y A `set` of the same type as `x`. │ │ │ │ -996 * @return A value indicating whether `__x` is less than, equal to, │ │ │ │ -997 * greater than, or incomparable with `__y`. │ │ │ │ -998 * │ │ │ │ -999 * This is a total ordering relation. It is linear in the size of the │ │ │ │ -1000 * maps. The elements must be comparable with @c <. │ │ │ │ -1001 * │ │ │ │ -1002 * See `std::lexicographical_compare_three_way()` for how the determination │ │ │ │ -1003 * is made. This operator is used to synthesize relational operators like │ │ │ │ -1004 * `<` and `>=` etc. │ │ │ │ -1005 */ │ │ │ │ -1006 template │ │ │ │ -1007 inline __detail::__synth3way_t<_Key> │ │ │ │ -1008 operator<=>(const set<_Key, _Compare, _Alloc>& __x, │ │ │ │ -1009 const set<_Key, _Compare, _Alloc>& __y) │ │ │ │ -1010 { return __x._M_t <=> __y._M_t; } │ │ │ │ -1011#else │ │ │ │ -1012 /** │ │ │ │ -1013 * @brief Set ordering relation. │ │ │ │ -1014 * @param __x A %set. │ │ │ │ -1015 * @param __y A %set of the same type as @a x. │ │ │ │ -1016 * @return True iff @a __x is lexicographically less than @a __y. │ │ │ │ -1017 * │ │ │ │ -1018 * This is a total ordering relation. It is linear in the size of the │ │ │ │ -1019 * sets. The elements must be comparable with @c <. │ │ │ │ -1020 * │ │ │ │ -1021 * See std::lexicographical_compare() for how the determination is made. │ │ │ │ -1022 */ │ │ │ │ -1023 template │ │ │ │ -_1_0_2_4 inline bool │ │ │ │ -1025 operator<(const _s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_>& __x, │ │ │ │ -1026 const _s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_>& __y) │ │ │ │ -1027 { return __x._M_t < __y._M_t; } │ │ │ │ -1028 │ │ │ │ -1029 /// Returns !(x == y). │ │ │ │ -1030 template │ │ │ │ -1031 inline bool │ │ │ │ -_1_0_3_2 operator!=(const _s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_>& __x, │ │ │ │ -1033 const _s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_>& __y) │ │ │ │ -1034 { return !(__x == __y); } │ │ │ │ -1035 │ │ │ │ -1036 /// Returns y < x. │ │ │ │ -1037 template │ │ │ │ -1038 inline bool │ │ │ │ -_1_0_3_9 operator>(const _s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_>& __x, │ │ │ │ -1040 const _s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_>& __y) │ │ │ │ -1041 { return __y < __x; } │ │ │ │ -1042 │ │ │ │ -1043 /// Returns !(y < x) │ │ │ │ -1044 template │ │ │ │ -_1_0_4_5 inline bool │ │ │ │ -1046 operator<=(const _s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_>& __x, │ │ │ │ -1047 const _s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_>& __y) │ │ │ │ -1048 { return !(__y < __x); } │ │ │ │ -1049 │ │ │ │ -1050 /// Returns !(x < y) │ │ │ │ -1051 template │ │ │ │ -1052 inline bool │ │ │ │ -_1_0_5_3 operator>=(const _s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_>& __x, │ │ │ │ -1054 const _s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_>& __y) │ │ │ │ -1055 { return !(__x < __y); } │ │ │ │ -1056#endif // three-way comparison │ │ │ │ -1057 │ │ │ │ -1058 /// See std::set::swap(). │ │ │ │ -1059 template │ │ │ │ -1060 inline void │ │ │ │ -_1_0_6_1 swap(_s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_>& __x, _s_e_t_<___K_e_y_,_ ___C_o_m_p_a_r_e_,_ ___A_l_l_o_c_>& __y) │ │ │ │ -1062 ___G_L_I_B_C_X_X___N_O_E_X_C_E_P_T___I_F(noexcept(__x.swap(__y))) │ │ │ │ -1063 { __x.swap(__y); } │ │ │ │ -1064 │ │ │ │ -1065_GLIBCXX_END_NAMESPACE_CONTAINER │ │ │ │ -1066 │ │ │ │ -1067#if __cplusplus > 201402L │ │ │ │ -1068 // Allow std::set access to internals of compatible sets. │ │ │ │ -1069 template │ │ │ │ -1070 struct │ │ │ │ -1071 _Rb_tree_merge_helper<_GLIBCXX_STD_C::set<_Val, _Cmp1, _Alloc>, _Cmp2> │ │ │ │ -1072 { │ │ │ │ -1073 private: │ │ │ │ -1074 friend class _GLIBCXX_STD_C::set<_Val, _Cmp1, _Alloc>; │ │ │ │ -1075 │ │ │ │ -1076 static auto& │ │ │ │ -1077 _S_get_tree(_GLIBCXX_STD_C::set<_Val, _Cmp2, _Alloc>& __set) │ │ │ │ -1078 { return __set._M_t; } │ │ │ │ -1079 │ │ │ │ -1080 static auto& │ │ │ │ -1081 _S_get_tree(_GLIBCXX_STD_C::multiset<_Val, _Cmp2, _Alloc>& __set) │ │ │ │ -1082 { return __set._M_t; } │ │ │ │ -1083 }; │ │ │ │ -1084#endif // C++17 │ │ │ │ -1085 │ │ │ │ -1086_GLIBCXX_END_NAMESPACE_VERSION │ │ │ │ -1087} //namespace std │ │ │ │ -1088#endif /* _STL_SET_H */ │ │ │ │ -_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 │ │ │ │ -_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_:_9_7 │ │ │ │ -_s_t_d │ │ │ │ -ISO C++ entities toplevel namespace is std. │ │ │ │ -_s_t_d_:_:_i_s___s_a_m_e │ │ │ │ -is_same │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_3_9_9 │ │ │ │ -_s_t_d_:_:_i_s___n_o_t_h_r_o_w___c_o_p_y___c_o_n_s_t_r_u_c_t_i_b_l_e │ │ │ │ -is_nothrow_copy_constructible │ │ │ │ -DDeeffiinniittiioonn _t_y_p_e___t_r_a_i_t_s_:_1_1_3_3 │ │ │ │ -_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_4_2 │ │ │ │ -_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_:_:_s_e_t │ │ │ │ -A standard container made up of unique keys, which can be retrieved in │ │ │ │ -logarithmic time. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_9_7 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_e_t │ │ │ │ -set(set &&__x, const __type_identity_t< allocator_type > &__a) noexcept │ │ │ │ -(is_nothrow_copy_constructible< _Compare >::value &&_Alloc_traits:: │ │ │ │ -_S_always_equal()) │ │ │ │ -Allocator-extended move constructor. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_2_6_1 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ -bool contains(const key_type &__x) const │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_7_7_0 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_e_t │ │ │ │ -set(_InputIterator __first, _InputIterator __last, const _Compare &__comp, │ │ │ │ -const allocator_type &__a=allocator_type()) │ │ │ │ -Builds a set from a range. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_2_1_0 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_c_o_u_n_t │ │ │ │ -size_type count(const key_type &__x) const │ │ │ │ -Finds the number of elements. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_7_5_0 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_d_i_f_f_e_r_e_n_c_e___t_y_p_e │ │ │ │ -_Rep_type::difference_type difference_type │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_5_4 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_e_x_t_r_a_c_t │ │ │ │ -node_type extract(const_iterator __pos) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_5_8_7 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -set & operator=(initializer_list< value_type > __l) │ │ │ │ -Set list assignment operator. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_3_1_8 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_e_r_a_s_e │ │ │ │ -_GLIBCXX_ABI_TAG_CXX11 iterator erase(const_iterator __position) │ │ │ │ -Erases an element from a set. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_6_5_6 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_e_t │ │ │ │ -set(set &&)=default │ │ │ │ -Set move constructor │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_w_a_p │ │ │ │ -void swap(set &__x) noexcept(/*conditional */) │ │ │ │ -Swaps data with another set. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_4_4_3 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_v_a_l_u_e___c_o_m_p_a_r_e │ │ │ │ -_Compare value_compare │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_2_5 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_v_a_l_u_e___c_o_m_p │ │ │ │ -value_compare value_comp() const │ │ │ │ -Returns the comparison object with which the set was constructed. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_3_3_3 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_c_b_e_g_i_n │ │ │ │ -iterator cbegin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_3_8_3 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_a_l_l_o_c_a_t_o_r___t_y_p_e │ │ │ │ -_Alloc allocator_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_2_6 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_c_o_n_s_t___i_t_e_r_a_t_o_r │ │ │ │ -_Rep_type::const_iterator const_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_5_0 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_c_o_n_s_t___p_o_i_n_t_e_r │ │ │ │ -_Alloc_traits::const_pointer const_pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_4_3 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_v_a_l_u_e___t_y_p_e │ │ │ │ -_Key value_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_2_3 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_c_o_n_t_a_i_n_s │ │ │ │ -auto contains(const _Kt &__x) const -> decltype(_M_t._M_find_tr(__x), void(), │ │ │ │ -true) │ │ │ │ -Finds whether an element with the given key exists. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_7_7_5 │ │ │ │ -_s_t_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 _s_t_l___s_e_t_._h_:_9_0_4 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_l_o_w_e_r___b_o_u_n_d │ │ │ │ -auto lower_bound(const _Kt &__x) -> decltype(iterator(_M_t._M_lower_bound_tr │ │ │ │ -(__x))) │ │ │ │ -Finds the beginning of a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_8_4_1 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_u_p_p_e_r___b_o_u_n_d │ │ │ │ -const_iterator upper_bound(const key_type &__x) const │ │ │ │ -Finds the end of a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_8_6_5 │ │ │ │ -_s_t_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 set. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_5_8_0 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_e_t │ │ │ │ -set(_InputIterator __first, _InputIterator __last) │ │ │ │ -Builds a set from a range. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_9_3 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_c_e_n_d │ │ │ │ -iterator cend() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_3_9_2 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_c_o_u_n_t │ │ │ │ -auto count(const _Kt &__x) const -> decltype(_M_t._M_count_tr(__x)) │ │ │ │ -Finds the number of elements. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_7_5_6 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -insert_return_type insert(node_type &&__nh) │ │ │ │ -Re-insert an extracted node. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_6_0_0 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __hint, node_type &&__nh) │ │ │ │ -Re-insert an extracted node. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_6_0_5 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_e_n_d │ │ │ │ -iterator end() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_3_5_5 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_k_e_y___c_o_m_p_a_r_e │ │ │ │ -_Compare key_compare │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_2_4 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_m_a_x___s_i_z_e │ │ │ │ -size_type max_size() const noexcept │ │ │ │ -Returns the maximum size of the set. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_4_2_6 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_k_e_y___t_y_p_e │ │ │ │ -_Key key_type │ │ │ │ -Public typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_2_2 │ │ │ │ -_s_t_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 set. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_5_1_1 │ │ │ │ -_s_t_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 _s_t_l___s_e_t_._h_:_9_0_0 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__x) -> decltype(iterator{_M_t._M_find_tr(__x)}) │ │ │ │ -Tries to locate an element in a set. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_8_0_6 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_c_o_n_s_t___r_e_f_e_r_e_n_c_e │ │ │ │ -_Alloc_traits::const_reference const_reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_4_5 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_f_i_n_d │ │ │ │ -auto find(const _Kt &__x) const -> decltype(const_iterator{_M_t._M_find_tr │ │ │ │ -(__x)}) │ │ │ │ -Tries to locate an element in a set. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_8_1_2 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_e_t │ │ │ │ -set()=default │ │ │ │ -Default constructor creates no elements. │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_l_o_w_e_r___b_o_u_n_d │ │ │ │ -auto lower_bound(const _Kt &__x) const -> decltype(const_iterator │ │ │ │ -(_M_t._M_lower_bound_tr(__x))) │ │ │ │ -Finds the beginning of a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_8_4_7 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_e_t │ │ │ │ -set(const allocator_type &__a) │ │ │ │ -Allocator-extended default constructor. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_2_5_3 │ │ │ │ -_s_t_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 set. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_4_6_4 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_k_e_y___c_o_m_p │ │ │ │ -key_compare key_comp() const │ │ │ │ -Returns the comparison object with which the set was constructed. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_3_2_9 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_r_b_e_g_i_n │ │ │ │ -reverse_iterator rbegin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_3_6_4 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_r_e_f_e_r_e_n_c_e │ │ │ │ -_Alloc_traits::reference reference │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_4_4 │ │ │ │ -_s_t_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 _s_t_l___s_e_t_._h_:_5_6_8 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_e_r_a_s_e │ │ │ │ -_GLIBCXX_ABI_TAG_CXX11 iterator erase(const_iterator __first, const_iterator │ │ │ │ -__last) │ │ │ │ -Erases a [__first,__last) range of elements from a set. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_7_0_8 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_c_r_b_e_g_i_n │ │ │ │ -reverse_iterator crbegin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_4_0_1 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_u_p_p_e_r___b_o_u_n_d │ │ │ │ -auto upper_bound(const _Kt &__x) const -> decltype(iterator │ │ │ │ -(_M_t._M_upper_bound_tr(__x))) │ │ │ │ -Finds the end of a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_8_7_7 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__x) -> decltype(pair< iterator, iterator > │ │ │ │ -(_M_t._M_equal_range_tr(__x))) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_9_1_0 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_e_q_u_a_l___r_a_n_g_e │ │ │ │ -auto equal_range(const _Kt &__x) const -> decltype(pair< iterator, iterator > │ │ │ │ -(_M_t._M_equal_range_tr(__x))) │ │ │ │ -Finds a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_9_1_6 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_e_t │ │ │ │ -set(initializer_list< value_type > __l, const allocator_type &__a) │ │ │ │ -Allocator-extended initialier-list constructor. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_2_6_7 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_p_o_i_n_t_e_r │ │ │ │ -_Alloc_traits::pointer pointer │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_4_2 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_i_z_e │ │ │ │ -size_type size() const noexcept │ │ │ │ -Returns the size of the set. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_4_2_1 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_c_o_n_s_t___r_e_v_e_r_s_e___i_t_e_r_a_t_o_r │ │ │ │ -_Rep_type::const_reverse_iterator const_reverse_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_5_2 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_i_t_e_r_a_t_o_r │ │ │ │ -_Rep_type::const_iterator iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_4_9 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_r_e_v_e_r_s_e___i_t_e_r_a_t_o_r │ │ │ │ -_Rep_type::const_reverse_iterator reverse_iterator │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_5_1 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_c_r_e_n_d │ │ │ │ -reverse_iterator crend() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_4_1_0 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_i_n_s_e_r_t │ │ │ │ -iterator insert(const_iterator __position, const value_type &__x) │ │ │ │ -Attempts to insert an element into the set. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_5_4_8 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_l_o_w_e_r___b_o_u_n_d │ │ │ │ -const_iterator lower_bound(const key_type &__x) const │ │ │ │ -Finds the beginning of a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_8_3_5 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_e_t │ │ │ │ -set(_InputIterator __first, _InputIterator __last, const allocator_type &__a) │ │ │ │ -Allocator-extended range constructor. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_2_7_3 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_e_t │ │ │ │ -set(const set &__x, const __type_identity_t< allocator_type > &__a) │ │ │ │ -Allocator-extended copy constructor. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_2_5_7 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_e_t │ │ │ │ -set(initializer_list< value_type > __l, const _Compare &__comp=_Compare(), │ │ │ │ -const allocator_type &__a=allocator_type()) │ │ │ │ -Builds a set from an initializer_list. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_2_4_5 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_c_l_e_a_r │ │ │ │ -void clear() noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_7_3_5 │ │ │ │ -_s_t_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 with which the set was constructed. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_3_3_7 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_i_z_e___t_y_p_e │ │ │ │ -_Rep_type::size_type size_type │ │ │ │ -Iterator-related typedefs. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_5_3 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_e_t │ │ │ │ -set(const set &)=default │ │ │ │ -Set copy constructor. │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_u_p_p_e_r___b_o_u_n_d │ │ │ │ -iterator upper_bound(const key_type &__x) │ │ │ │ -Finds the end of a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_8_6_1 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_l_o_w_e_r___b_o_u_n_d │ │ │ │ -iterator lower_bound(const key_type &__x) │ │ │ │ -Finds the beginning of a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_8_3_1 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_u_p_p_e_r___b_o_u_n_d │ │ │ │ -auto upper_bound(const _Kt &__x) -> decltype(iterator(_M_t._M_upper_bound_tr │ │ │ │ -(__x))) │ │ │ │ -Finds the end of a subsequence matching given key. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_8_7_1 │ │ │ │ -_s_t_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 set. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_4_9_0 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -set & operator=(const set &)=default │ │ │ │ -Set assignment operator. │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_b_e_g_i_n │ │ │ │ -iterator begin() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_3_4_6 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_e_x_t_r_a_c_t │ │ │ │ -node_type extract(const key_type &__x) │ │ │ │ -Extract a node. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_5_9_5 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_s_e_t │ │ │ │ -set(const _Compare &__comp, const allocator_type &__a=allocator_type()) │ │ │ │ -Creates a set with no elements. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_1_7_8 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_~_s_e_t │ │ │ │ -~set()=default │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_f_i_n_d │ │ │ │ -iterator find(const key_type &__x) │ │ │ │ -Tries to locate an element in a set. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_7_9_6 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ -set & operator=(set &&)=default │ │ │ │ -Move assignment operator. │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_e_m_p_t_y │ │ │ │ -bool empty() const noexcept │ │ │ │ -Returns true if the set is empty. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_4_1_6 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_e_r_a_s_e │ │ │ │ -size_type erase(const key_type &__x) │ │ │ │ -Erases elements according to the provided key. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_6_8_6 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_f_i_n_d │ │ │ │ -const_iterator find(const key_type &__x) const │ │ │ │ -Tries to locate an element in a set. │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_8_0_0 │ │ │ │ -_s_t_d_:_:_s_e_t_:_:_r_e_n_d │ │ │ │ -reverse_iterator rend() const noexcept │ │ │ │ -DDeeffiinniittiioonn _s_t_l___s_e_t_._h_:_3_7_3 │ │ │ │ -_s_t_d_:_:_a_u_t_o___p_t_r___r_e_f │ │ │ │ -DDeeffiinniittiioonn _a_u_t_o___p_t_r_._h_:_4_9 │ │ │ │ -_____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_:_4_9 │ │ │ │ +56#include <_b_i_t_s_/_b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h> │ │ │ │ +57 │ │ │ │ +58// Note that the obvious and elegant approach of │ │ │ │ +59// │ │ │ │ +60//#define glibcxx_function_requires(C) debug::function_requires< debug::C >() │ │ │ │ +61// │ │ │ │ +62// won't work due to concept templates with more than one parameter, e.g., │ │ │ │ +63// BinaryPredicateConcept. The preprocessor tries to split things up on │ │ │ │ +64// the commas in the template argument list. We can't use an inner pair of │ │ │ │ +65// parenthesis to hide the commas, because "debug::(Temp)" isn't │ │ │ │ +66// a valid instantiation pattern. Thus, we steal a feature from C99. │ │ │ │ +67 │ │ │ │ +68#define __glibcxx_function_requires(...) \ │ │ │ │ +69 __gnu_cxx::__function_requires< __gnu_cxx::__VA_ARGS__ >(); │ │ │ │ +70#define __glibcxx_class_requires(_a,_C) \ │ │ │ │ +71 _GLIBCXX_CLASS_REQUIRES(_a, __gnu_cxx, _C); │ │ │ │ +72#define __glibcxx_class_requires2(_a,_b,_C) \ │ │ │ │ +73 _GLIBCXX_CLASS_REQUIRES2(_a, _b, __gnu_cxx, _C); │ │ │ │ +74#define __glibcxx_class_requires3(_a,_b,_c,_C) \ │ │ │ │ +75 _GLIBCXX_CLASS_REQUIRES3(_a, _b, _c, __gnu_cxx, _C); │ │ │ │ +76#define __glibcxx_class_requires4(_a,_b,_c,_d,_C) \ │ │ │ │ +77 _GLIBCXX_CLASS_REQUIRES4(_a, _b, _c, _d, __gnu_cxx, _C); │ │ │ │ +78 │ │ │ │ +79#endif // enable/disable │ │ │ │ +80 │ │ │ │ +81#endif // _GLIBCXX_CONCEPT_CHECK │ │ │ │ +_b_o_o_s_t___c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ +_c_+_+_c_o_n_f_i_g_._h │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_l___s_e_t_._h │ │ │ │ + * _c_o_n_c_e_p_t___c_h_e_c_k_._h │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00401.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stl_queue.h File Reference │ │ │ +libstdc++: sstream.tcc File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -46,90 +46,57 @@ │ │ │ /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ │ │ │ $(document).ready(function(){initNavTree('a00401.html',''); initResizable(); }); │ │ │ /* @license-end */ │ │ │ │ │ │
│ │ │
│ │ │
│ │ │ -Classes | │ │ │ Namespaces | │ │ │ -Functions
│ │ │ -
stl_queue.h File Reference
│ │ │ +Macros
│ │ │ +
sstream.tcc 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
 
│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ + │ │ │ + │ │ │ + │ │ │

│ │ │ -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 _Compare , typename _Container , typename = _RequireNotAllocator<_Compare>, typename = _RequireNotAllocator<_Container>>
 std::priority_queue (_Compare, _Container) -> priority_queue< typename _Container::value_type, _Container, _Compare >
 
│ │ │ -template<typename _Compare , typename _Container , typename _Allocator , typename = _RequireNotAllocator<_Compare>, typename = _RequireNotAllocator<_Container>>
 std::priority_queue (_Compare, _Container, _Allocator) -> priority_queue< typename _Container::value_type, _Container, _Compare >
 
│ │ │ -template<typename _InputIterator , typename _ValT = typename iterator_traits<_InputIterator>::value_type, typename _Compare = less<_ValT>, typename _Container = vector<_ValT>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocator<_Compare>, typename = _RequireNotAllocator<_Container>>
 std::priority_queue (_InputIterator, _InputIterator, _Compare=_Compare(), _Container=_Container()) -> priority_queue< _ValT, _Container, _Compare >
 
│ │ │ -template<typename _Container , typename = _RequireNotAllocator<_Container>>
 std::queue (_Container) -> queue< typename _Container::value_type, _Container >
 
│ │ │ -template<typename _Container , typename _Allocator , typename = _RequireNotAllocator<_Container>>
 std::queue (_Container, _Allocator) -> queue< typename _Container::value_type, _Container >
 
template<typename _Tp , typename _Sequence , typename _Compare >
enable_if< __and_< __is_swappable< _Sequence >, __is_swappable< _Compare > >::value >::type std::swap (priority_queue< _Tp, _Sequence, _Compare > &__x, priority_queue< _Tp, _Sequence, _Compare > &__y) noexcept(noexcept(__x.swap(__y)))
 
template<typename _Tp , typename _Seq >
enable_if< __is_swappable< _Seq >::value >::type std::swap (queue< _Tp, _Seq > &__x, queue< _Tp, _Seq > &__y) noexcept(noexcept(__x.swap(__y)))
 

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

│ │ │ +

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

│ │ │ + │ │ │ +

Definition in file sstream.tcc.

│ │ │ +

Macro Definition Documentation

│ │ │ + │ │ │ +

◆ _SSTREAM_TCC

│ │ │ │ │ │ -

Definition in file stl_queue.h.

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

Definition at line 35 of file sstream.tcc.

│ │ │ + │ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -1,93 +1,21 @@ │ │ │ │ libstdc++ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ -stl_queue.h File Reference │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _M_a_c_r_o_s │ │ │ │ +sstream.tcc File Reference │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ -CCllaasssseess │ │ │ │ -class   _s_t_d_:_:_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 │ │ │ │   │ │ │ │ -FFuunnccttiioonnss │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_!_= (const _q_u_e_u_e< _Tp, ___S_e_q │ │ │ │ - > &__x, const _q_u_e_u_e< _Tp, ___S_e_q > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_< (const _q_u_e_u_e< _Tp, ___S_e_q │ │ │ │ - > &__x, const _q_u_e_u_e< _Tp, ___S_e_q > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_<_= (const _q_u_e_u_e< _Tp, ___S_e_q │ │ │ │ - > &__x, const _q_u_e_u_e< _Tp, ___S_e_q > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_=_= (const _q_u_e_u_e< _Tp, ___S_e_q │ │ │ │ - > &__x, const _q_u_e_u_e< _Tp, ___S_e_q > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_> (const _q_u_e_u_e< _Tp, ___S_e_q │ │ │ │ - > &__x, const _q_u_e_u_e< _Tp, ___S_e_q > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ - bool  _s_t_d_:_:_o_p_e_r_a_t_o_r_>_= (const _q_u_e_u_e< _Tp, ___S_e_q │ │ │ │ - > &__x, const _q_u_e_u_e< _Tp, ___S_e_q > &__y) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Compare , _t_y_p_e_n_a_m_e _Container , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocator<_Compare>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Container>> │ │ │ │ -   ssttdd::::pprriioorriittyy__qquueeuuee (_Compare, │ │ │ │ - _Container) -> _p_r_i_o_r_i_t_y___q_u_e_u_e< _t_y_p_e_n_a_m_e │ │ │ │ - _Container::value_type, _Container, │ │ │ │ - _Compare > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Compare , _t_y_p_e_n_a_m_e _Container , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireNotAllocator<_Compare>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocator<_Container>> │ │ │ │ -   ssttdd::::pprriioorriittyy__qquueeuuee (_Compare, │ │ │ │ - _Container, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _p_r_i_o_r_i_t_y___q_u_e_u_e< _t_y_p_e_n_a_m_e _Container:: │ │ │ │ - value_type, _Container, _Compare > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e ___I_n_p_u_t_I_t_e_r_a_t_o_r , _t_y_p_e_n_a_m_e ___V_a_l_T = typename │ │ │ │ -iterator_traits<_InputIterator>::value_type, _t_y_p_e_n_a_m_e _Compare = less<_ValT>, │ │ │ │ -_t_y_p_e_n_a_m_e _Container = vector<_ValT>, _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireInputIter<_InputIterator>, _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Compare>, │ │ │ │ -_t_y_p_e_n_a_m_e = _RequireNotAllocator<_Container>> │ │ │ │ -   ssttdd::::pprriioorriittyy__qquueeuuee (___I_n_p_u_t_I_t_e_r_a_t_o_r, │ │ │ │ - ___I_n_p_u_t_I_t_e_r_a_t_o_r, _Compare=_Compare(), │ │ │ │ - _Container=_Container()) - │ │ │ │ - > _p_r_i_o_r_i_t_y___q_u_e_u_e< ___V_a_l_T, _Container, │ │ │ │ - _Compare > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Container , _t_y_p_e_n_a_m_e = _RequireNotAllocator<_Container>> │ │ │ │ -   ssttdd::::qquueeuuee (_Container) -> _q_u_e_u_e< │ │ │ │ - _t_y_p_e_n_a_m_e _Container::value_type, │ │ │ │ - _Container > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Container , _t_y_p_e_n_a_m_e ___A_l_l_o_c_a_t_o_r , _t_y_p_e_n_a_m_e = │ │ │ │ -_RequireNotAllocator<_Container>> │ │ │ │ -   ssttdd::::qquueeuuee (_Container, ___A_l_l_o_c_a_t_o_r) - │ │ │ │ - > _q_u_e_u_e< _t_y_p_e_n_a_m_e _Container:: │ │ │ │ - value_type, _Container > │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e _Sequence , _t_y_p_e_n_a_m_e _Compare > │ │ │ │ - _e_n_a_b_l_e___i_f< __and_< _____i_s___s_w_a_p_p_a_b_l_e< _s_t_d_:_:_s_w_a_p (_p_r_i_o_r_i_t_y___q_u_e_u_e< _Tp, │ │ │ │ -_Sequence >, _____i_s___s_w_a_p_p_a_b_l_e< _Compare > _Sequence, _Compare > &__x, │ │ │ │ - >::value >::type  _p_r_i_o_r_i_t_y___q_u_e_u_e< _Tp, _Sequence, │ │ │ │ - _Compare > &__y) noexcept(noexcept │ │ │ │ - (__x.swap(__y))) │ │ │ │ -  │ │ │ │ -template<_t_y_p_e_n_a_m_e _Tp , _t_y_p_e_n_a_m_e ___S_e_q > │ │ │ │ - _e_n_a_b_l_e___i_f< _____i_s___s_w_a_p_p_a_b_l_e< ___S_e_q >:: _s_t_d_:_:_s_w_a_p (_q_u_e_u_e< _Tp, ___S_e_q > &__x, │ │ │ │ - value >::type  _q_u_e_u_e< _Tp, ___S_e_q > &__y) noexcept │ │ │ │ - (noexcept(__x.swap(__y))) │ │ │ │ +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_l___q_u_e_u_e_._h. │ │ │ │ +attempt to use it directly. Instead, include . │ │ │ │ +Definition in file _s_s_t_r_e_a_m_._t_c_c. │ │ │ │ +********** MMaaccrroo DDeeffiinniittiioonn DDooccuummeennttaattiioonn ********** │ │ │ │ +********** _?◆_? __SSSSTTRREEAAMM__TTCCCC ********** │ │ │ │ +#define _SSTREAM_TCC │ │ │ │ +Definition at line _3_5 of file _s_s_t_r_e_a_m_._t_c_c. │ │ │ │ * _b_i_t_s │ │ │ │ - * _s_t_l___q_u_e_u_e_._h │ │ │ │ + * _s_s_t_r_e_a_m_._t_c_c │ │ │ │ * Generated by _[_d_o_x_y_g_e_n_]1.9.8 │ │ ├── ./usr/share/doc/gcc-13-base/libstdc++/user/a00401_source.html │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -libstdc++: stl_queue.h Source File │ │ │ +libstdc++: sstream.tcc Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -45,20 +45,20 @@ │ │ │ │ │ │
│ │ │
│ │ │ -
stl_queue.h
│ │ │ +
sstream.tcc
│ │ │
│ │ │
│ │ │ -Go to the documentation of this file.
1// Queue implementation -*- C++ -*-
│ │ │ +Go to the documentation of this file.
1// String based streams -*- C++ -*-
│ │ │
2
│ │ │ -
3// Copyright (C) 2001-2023 Free Software Foundation, Inc.
│ │ │ +
3// Copyright (C) 1997-2023 Free Software Foundation, Inc.
│ │ │
4//
│ │ │
5// This file is part of the GNU ISO C++ Library. This library is free
│ │ │
6// software; you can redistribute it and/or modify it under the
│ │ │
7// terms of the GNU General Public License as published by the
│ │ │
8// Free Software Foundation; either version 3, or (at your option)
│ │ │
9// any later version.
│ │ │
10
│ │ │ @@ -71,919 +71,327 @@ │ │ │
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_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>
│ │ │ - │ │ │ -
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
│ │ │ - │ │ │ -
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)) { }
│ │ │ +
24
│ │ │ +
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{sstream}
│ │ │ +
28 */
│ │ │ +
29
│ │ │ +
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 const __size_type __capacity = _M_string.capacity();
│ │ │ +
91
│ │ │ +
92#if _GLIBCXX_USE_CXX11_ABI
│ │ │ +
93 if (size_t(this->epptr() - this->pbase()) < __capacity)
│ │ │ +
94 {
│ │ │ +
95 // There is additional capacity in _M_string that can be used.
│ │ │ +
96 char_type* __base = const_cast<char_type*>(_M_string.data());
│ │ │ +
97 _M_pbump(__base, __base + __capacity, this->pptr() - this->pbase());
│ │ │ +
98 if (_M_mode & ios_base::in)
│ │ │ +
99 {
│ │ │ +
100 const __size_type __nget = this->gptr() - this->eback();
│ │ │ +
101 const __size_type __eget = this->egptr() - this->eback();
│ │ │ +
102 this->setg(__base, __base + __nget, __base + __eget + 1);
│ │ │ +
103 }
│ │ │ +
104 *this->pptr() = traits_type::to_char_type(__c);
│ │ │ +
105 this->pbump(1);
│ │ │ +
106 return __c;
│ │ │ +
107 }
│ │ │ +
108#endif
│ │ │ +
109
│ │ │ +
110 const __size_type __max_size = _M_string.max_size();
│ │ │ +
111 const bool __testput = this->pptr() < this->epptr();
│ │ │ + │ │ │ +
113 return traits_type::eof();
│ │ │ +
114
│ │ │ +
115 // Try to append __c into output sequence in one of two ways.
│ │ │ +
116 // Order these tests done in is unspecified by the standard.
│ │ │ +
117 const char_type __conv = traits_type::to_char_type(__c);
│ │ │ +
118 if (!__testput)
│ │ │ +
119 {
│ │ │ +
120 // NB: Start ostringstream buffers at 512 chars. This is an
│ │ │ +
121 // experimental value (pronounced "arbitrary" in some of the
│ │ │ +
122 // hipper English-speaking countries), and can be changed to
│ │ │ +
123 // suit particular needs.
│ │ │ +
124 //
│ │ │ +
125 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ +
126 // 169. Bad efficiency of overflow() mandated
│ │ │ +
127 // 432. stringbuf::overflow() makes only one write position
│ │ │ +
128 // available
│ │ │ +
129 const __size_type __opt_len = std::max(__size_type(2 * __capacity),
│ │ │ +
130 __size_type(512));
│ │ │ +
131 const __size_type __len = std::min(__opt_len, __max_size);
│ │ │ +
132 __string_type __tmp(_M_string.get_allocator());
│ │ │ +
133 __tmp.reserve(__len);
│ │ │ +
134 if (this->pbase())
│ │ │ +
135 __tmp.assign(this->pbase(), this->epptr() - this->pbase());
│ │ │ +
136 __tmp.push_back(__conv);
│ │ │ +
137 _M_string.swap(__tmp);
│ │ │ +
138 _M_sync(const_cast<char_type*>(_M_string.data()),
│ │ │ +
139 this->gptr() - this->eback(), this->pptr() - this->pbase());
│ │ │ +
140 }
│ │ │ +
141 else
│ │ │ +
142 *this->pptr() = __conv;
│ │ │ +
143 this->pbump(1);
│ │ │ +
144 return __c;
│ │ │ +
145 }
│ │ │ +
│ │ │ +
146
│ │ │ +
147 template <class _CharT, class _Traits, class _Alloc>
│ │ │ +
148 typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
│ │ │ +
│ │ │ + │ │ │ + │ │ │ +
151 {
│ │ │ +
152 int_type __ret = traits_type::eof();
│ │ │ +
153 const bool __testin = this->_M_mode & ios_base::in;
│ │ │ +
154 if (__testin)
│ │ │ +
155 {
│ │ │ +
156 // Update egptr() to match the actual string end.
│ │ │ +
157 _M_update_egptr();
│ │ │ +
158
│ │ │ +
159 if (this->gptr() < this->egptr())
│ │ │ +
160 __ret = traits_type::to_int_type(*this->gptr());
│ │ │ +
161 }
│ │ │ +
162 return __ret;
│ │ │ +
163 }
│ │ │ +
│ │ │ +
164
│ │ │ +
165 template <class _CharT, class _Traits, class _Alloc>
│ │ │ +
166 typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
│ │ │ +
│ │ │ + │ │ │ +
168 seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode)
│ │ │ +
169 {
│ │ │ +
170 pos_type __ret = pos_type(off_type(-1));
│ │ │ +
171 bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
│ │ │ +
172 bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
│ │ │ +
173 const bool __testboth = __testin && __testout && __way != ios_base::cur;
│ │ │ + │ │ │ + │ │ │
176
│ │ │ -
177 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 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) { }
│ │ │ +
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 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ -
195 queue(queue&& __q, const _Alloc& __a)
│ │ │ -
196 : c(std::move(__q.c), __a) { }
│ │ │ -
197
│ │ │ -
198#if __cplusplus > 202002L
│ │ │ -
199#define __cpp_lib_adaptor_iterator_pair_constructor 202106L
│ │ │ -
200
│ │ │ -
201 template<typename _InputIterator,
│ │ │ -
202 typename = _RequireInputIter<_InputIterator>>
│ │ │ -
203 queue(_InputIterator __first, _InputIterator __last)
│ │ │ -
204 : c(__first, __last) { }
│ │ │ -
205
│ │ │ -
206 template<typename _InputIterator, typename _Alloc,
│ │ │ -
207 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
208 typename = _Uses<_Alloc>>
│ │ │ -
209 queue(_InputIterator __first, _InputIterator __last, const _Alloc& __a)
│ │ │ -
210 : c(__first, __last, __a) { }
│ │ │ -
211#endif
│ │ │ -
212#endif
│ │ │ -
213
│ │ │ -
214 /**
│ │ │ -
215 * Returns true if the %queue is empty.
│ │ │ -
216 */
│ │ │ -
217 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
218 empty() const
│ │ │ -
219 { return c.empty(); }
│ │ │ -
│ │ │ -
220
│ │ │ -
221 /** Returns the number of elements in the %queue. */
│ │ │ -
222 _GLIBCXX_NODISCARD
│ │ │ -
223 size_type
│ │ │ -
│ │ │ -
224 size() const
│ │ │ -
225 { return c.size(); }
│ │ │ -
│ │ │ -
226
│ │ │ -
227 /**
│ │ │ -
228 * Returns a read/write reference to the data at the first
│ │ │ -
229 * element of the %queue.
│ │ │ -
230 */
│ │ │ -
231 _GLIBCXX_NODISCARD
│ │ │ -
232 reference
│ │ │ -
│ │ │ - │ │ │ -
234 {
│ │ │ -
235 __glibcxx_requires_nonempty();
│ │ │ -
236 return c.front();
│ │ │ -
237 }
│ │ │ -
│ │ │ -
238
│ │ │ -
239 /**
│ │ │ -
240 * Returns a read-only (constant) reference to the data at the first
│ │ │ -
241 * element of the %queue.
│ │ │ -
242 */
│ │ │ -
243 _GLIBCXX_NODISCARD
│ │ │ -
244 const_reference
│ │ │ -
│ │ │ -
245 front() const
│ │ │ -
246 {
│ │ │ -
247 __glibcxx_requires_nonempty();
│ │ │ -
248 return c.front();
│ │ │ -
249 }
│ │ │ -
│ │ │ -
250
│ │ │ -
251 /**
│ │ │ -
252 * Returns a read/write reference to the data at the last
│ │ │ -
253 * element of the %queue.
│ │ │ -
254 */
│ │ │ -
255 _GLIBCXX_NODISCARD
│ │ │ -
256 reference
│ │ │ -
│ │ │ - │ │ │ -
258 {
│ │ │ -
259 __glibcxx_requires_nonempty();
│ │ │ -
260 return c.back();
│ │ │ -
261 }
│ │ │ -
│ │ │ -
262
│ │ │ -
263 /**
│ │ │ -
264 * Returns a read-only (constant) reference to the data at the last
│ │ │ -
265 * element of the %queue.
│ │ │ -
266 */
│ │ │ -
267 _GLIBCXX_NODISCARD
│ │ │ -
268 const_reference
│ │ │ -
│ │ │ -
269 back() const
│ │ │ -
270 {
│ │ │ -
271 __glibcxx_requires_nonempty();
│ │ │ -
272 return c.back();
│ │ │ -
273 }
│ │ │ -
│ │ │ -
274
│ │ │ -
275 /**
│ │ │ -
276 * @brief Add data to the end of the %queue.
│ │ │ -
277 * @param __x Data to be added.
│ │ │ -
278 *
│ │ │ -
279 * This is a typical %queue operation. The function creates an
│ │ │ -
280 * element at the end of the %queue and assigns the given data
│ │ │ -
281 * to it. The time complexity of the operation depends on the
│ │ │ -
282 * underlying sequence.
│ │ │ -
283 */
│ │ │ -
284 void
│ │ │ -
│ │ │ -
285 push(const value_type& __x)
│ │ │ -
286 { c.push_back(__x); }
│ │ │ -
│ │ │ +
194 if ((__testin || __testboth)
│ │ │ +
195 && __newoffi >= 0
│ │ │ +
196 && this->egptr() - __beg >= __newoffi)
│ │ │ +
197 {
│ │ │ +
198 this->setg(this->eback(), this->eback() + __newoffi,
│ │ │ +
199 this->egptr());
│ │ │ +
200 __ret = pos_type(__newoffi);
│ │ │ +
201 }
│ │ │ +
202 if ((__testout || __testboth)
│ │ │ +
203 && __newoffo >= 0
│ │ │ +
204 && this->egptr() - __beg >= __newoffo)
│ │ │ +
205 {
│ │ │ +
206 _M_pbump(this->pbase(), this->epptr(), __newoffo);
│ │ │ +
207 __ret = pos_type(__newoffo);
│ │ │ +
208 }
│ │ │ +
209 }
│ │ │ +
210 return __ret;
│ │ │ +
211 }
│ │ │ +
│ │ │ +
212
│ │ │ +
213 template <class _CharT, class _Traits, class _Alloc>
│ │ │ +
214 typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
│ │ │ +
│ │ │ + │ │ │ +
216 seekpos(pos_type __sp, ios_base::openmode __mode)
│ │ │ +
217 {
│ │ │ +
218 pos_type __ret = pos_type(off_type(-1));
│ │ │ +
219 const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
│ │ │ +
220 const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
│ │ │ +
221
│ │ │ +
222 const char_type* __beg = __testin ? this->eback() : this->pbase();
│ │ │ +
223 if ((__beg || !off_type(__sp)) && (__testin || __testout))
│ │ │ +
224 {
│ │ │ +
225 _M_update_egptr();
│ │ │ +
226
│ │ │ +
227 const off_type __pos(__sp);
│ │ │ +
228 const bool __testpos = (0 <= __pos
│ │ │ +
229 && __pos <= this->egptr() - __beg);
│ │ │ +
230 if (__testpos)
│ │ │ +
231 {
│ │ │ +
232 if (__testin)
│ │ │ +
233 this->setg(this->eback(), this->eback() + __pos,
│ │ │ +
234 this->egptr());
│ │ │ +
235 if (__testout)
│ │ │ +
236 _M_pbump(this->pbase(), this->epptr(), __pos);
│ │ │ +
237 __ret = __sp;
│ │ │ +
238 }
│ │ │ +
239 }
│ │ │ +
240 return __ret;
│ │ │ +
241 }
│ │ │ +
│ │ │ +
242
│ │ │ +
243 template <class _CharT, class _Traits, class _Alloc>
│ │ │ +
244 void
│ │ │ + │ │ │ +
246 _M_sync(char_type* __base, __size_type __i, __size_type __o)
│ │ │ +
247 {
│ │ │ +
248 const bool __testin = _M_mode & ios_base::in;
│ │ │ +
249 const bool __testout = _M_mode & ios_base::out;
│ │ │ +
250 char_type* __endg = __base + _M_string.size();
│ │ │ +
251 char_type* __endp = __base + _M_string.capacity();
│ │ │ +
252
│ │ │ +
253 if (__base != _M_string.data())
│ │ │ +
254 {
│ │ │ +
255 // setbuf: __i == size of buffer area (_M_string.size() == 0).
│ │ │ +
256 __endg += __i;
│ │ │ +
257 __i = 0;
│ │ │ +
258 __endp = __endg;
│ │ │ +
259 }
│ │ │ +
260
│ │ │ +
261 if (__testin)
│ │ │ +
262 this->setg(__base, __base + __i, __endg);
│ │ │ +
263 if (__testout)
│ │ │ +
264 {
│ │ │ +
265 _M_pbump(__base, __endp, __o);
│ │ │ +
266 // egptr() always tracks the string end. When !__testin,
│ │ │ +
267 // for the correct functioning of the streambuf inlines
│ │ │ +
268 // the other get area pointers are identical.
│ │ │ +
269 if (!__testin)
│ │ │ +
270 this->setg(__endg, __endg, __endg);
│ │ │ +
271 }
│ │ │ +
272 }
│ │ │ +
273
│ │ │ +
274 template <class _CharT, class _Traits, class _Alloc>
│ │ │ +
275 void
│ │ │ +
276 basic_stringbuf<_CharT, _Traits, _Alloc>::
│ │ │ +
277 _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off)
│ │ │ +
278 {
│ │ │ +
279 this->setp(__pbeg, __pend);
│ │ │ +
280 while (__off > __gnu_cxx::__numeric_traits<int>::__max)
│ │ │ +
281 {
│ │ │ +
282 this->pbump(__gnu_cxx::__numeric_traits<int>::__max);
│ │ │ +
283 __off -= __gnu_cxx::__numeric_traits<int>::__max;
│ │ │ +
284 }
│ │ │ +
285 this->pbump(__off);
│ │ │ +
286 }
│ │ │
287
│ │ │ -
288#if __cplusplus >= 201103L
│ │ │ -
289 void
│ │ │ -
290 push(value_type&& __x)
│ │ │ -
291 { c.push_back(std::move(__x)); }
│ │ │ -
292
│ │ │ -
293#if __cplusplus > 201402L
│ │ │ -
294 template<typename... _Args>
│ │ │ -
295 decltype(auto)
│ │ │ -
296 emplace(_Args&&... __args)
│ │ │ -
297 { return c.emplace_back(std::forward<_Args>(__args)...); }
│ │ │ -
298#else
│ │ │ -
299 template<typename... _Args>
│ │ │ -
300 void
│ │ │ -
301 emplace(_Args&&... __args)
│ │ │ -
302 { c.emplace_back(std::forward<_Args>(__args)...); }
│ │ │ -
303#endif
│ │ │ -
304#endif
│ │ │ -
305
│ │ │ -
306 /**
│ │ │ -
307 * @brief Removes first element.
│ │ │ -
308 *
│ │ │ -
309 * This is a typical %queue operation. It shrinks the %queue by one.
│ │ │ -
310 * The time complexity of the operation depends on the underlying
│ │ │ -
311 * sequence.
│ │ │ -
312 *
│ │ │ -
313 * Note that no data is returned, and if the first element's
│ │ │ -
314 * data is needed, it should be retrieved before pop() is
│ │ │ -
315 * called.
│ │ │ -
316 */
│ │ │ -
317 void
│ │ │ -
│ │ │ - │ │ │ -
319 {
│ │ │ -
320 __glibcxx_requires_nonempty();
│ │ │ -
321 c.pop_front();
│ │ │ -
322 }
│ │ │ -
│ │ │ -
323
│ │ │ -
324#if __cplusplus >= 201103L
│ │ │ -
325 void
│ │ │ -
326 swap(queue& __q)
│ │ │ -
327#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ - │ │ │ -
329#else
│ │ │ - │ │ │ -
331#endif
│ │ │ -
332 {
│ │ │ -
333 using std::swap;
│ │ │ -
334 swap(c, __q.c);
│ │ │ -
335 }
│ │ │ -
336#endif // __cplusplus >= 201103L
│ │ │ -
337 };
│ │ │ -
│ │ │ -
338
│ │ │ -
339#if __cpp_deduction_guides >= 201606
│ │ │ -
340 template<typename _Container,
│ │ │ -
341 typename = _RequireNotAllocator<_Container>>
│ │ │ -
342 queue(_Container) -> queue<typename _Container::value_type, _Container>;
│ │ │ -
343
│ │ │ -
344 template<typename _Container, typename _Allocator,
│ │ │ -
345 typename = _RequireNotAllocator<_Container>>
│ │ │ -
346 queue(_Container, _Allocator)
│ │ │ -
347 -> queue<typename _Container::value_type, _Container>;
│ │ │ -
348
│ │ │ -
349#ifdef __cpp_lib_adaptor_iterator_pair_constructor
│ │ │ -
350 template<typename _InputIterator,
│ │ │ -
351 typename _ValT
│ │ │ -
352 = typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
353 typename = _RequireInputIter<_InputIterator>>
│ │ │ -
354 queue(_InputIterator, _InputIterator) -> queue<_ValT>;
│ │ │ -
355
│ │ │ -
356 template<typename _InputIterator, typename _Allocator,
│ │ │ -
357 typename _ValT
│ │ │ -
358 = typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
359 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
360 typename = _RequireAllocator<_Allocator>>
│ │ │ -
361 queue(_InputIterator, _InputIterator, _Allocator)
│ │ │ -
362 -> queue<_ValT, deque<_ValT, _Allocator>>;
│ │ │ -
363#endif
│ │ │ -
364#endif
│ │ │ -
365
│ │ │ -
366 /**
│ │ │ -
367 * @brief Queue equality comparison.
│ │ │ -
368 * @param __x A %queue.
│ │ │ -
369 * @param __y A %queue of the same type as @a __x.
│ │ │ -
370 * @return True iff the size and elements of the queues are equal.
│ │ │ -
371 *
│ │ │ -
372 * This is an equivalence relation. Complexity and semantics depend on the
│ │ │ -
373 * underlying sequence type, but the expected rules are: this relation is
│ │ │ -
374 * linear in the size of the sequences, and queues are considered equivalent
│ │ │ -
375 * if their sequences compare equal.
│ │ │ -
376 */
│ │ │ -
377 template<typename _Tp, typename _Seq>
│ │ │ -
378 _GLIBCXX_NODISCARD
│ │ │ -
379 inline bool
│ │ │ -
│ │ │ -
380 operator==(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ -
381 { return __x.c == __y.c; }
│ │ │ -
│ │ │ -
382
│ │ │ -
383 /**
│ │ │ -
384 * @brief Queue ordering relation.
│ │ │ -
385 * @param __x A %queue.
│ │ │ -
386 * @param __y A %queue of the same type as @a x.
│ │ │ -
387 * @return True iff @a __x is lexicographically less than @a __y.
│ │ │ -
388 *
│ │ │ -
389 * This is an total ordering relation. Complexity and semantics
│ │ │ -
390 * depend on the underlying sequence type, but the expected rules
│ │ │ -
391 * are: this relation is linear in the size of the sequences, the
│ │ │ -
392 * elements must be comparable with @c <, and
│ │ │ -
393 * std::lexicographical_compare() is usually used to make the
│ │ │ -
394 * determination.
│ │ │ -
395 */
│ │ │ -
396 template<typename _Tp, typename _Seq>
│ │ │ -
397 _GLIBCXX_NODISCARD
│ │ │ -
│ │ │ -
398 inline bool
│ │ │ -
399 operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ -
400 { return __x.c < __y.c; }
│ │ │ -
│ │ │ -
401
│ │ │ -
402 /// Based on operator==
│ │ │ -
403 template<typename _Tp, typename _Seq>
│ │ │ -
404 _GLIBCXX_NODISCARD
│ │ │ -
405 inline bool
│ │ │ -
│ │ │ -
406 operator!=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ -
407 { return !(__x == __y); }
│ │ │ -
│ │ │ -
408
│ │ │ -
409 /// Based on operator<
│ │ │ -
410 template<typename _Tp, typename _Seq>
│ │ │ -
411 _GLIBCXX_NODISCARD
│ │ │ -
412 inline bool
│ │ │ -
│ │ │ -
413 operator>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ -
414 { return __y < __x; }
│ │ │ -
│ │ │ -
415
│ │ │ -
416 /// Based on operator<
│ │ │ -
417 template<typename _Tp, typename _Seq>
│ │ │ -
418 _GLIBCXX_NODISCARD
│ │ │ -
│ │ │ -
419 inline bool
│ │ │ -
420 operator<=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ -
421 { return !(__y < __x); }
│ │ │ -
│ │ │ -
422
│ │ │ -
423 /// Based on operator<
│ │ │ -
424 template<typename _Tp, typename _Seq>
│ │ │ -
425 _GLIBCXX_NODISCARD
│ │ │ -
426 inline bool
│ │ │ -
│ │ │ -
427 operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ -
428 { return !(__x < __y); }
│ │ │ -
│ │ │ -
429
│ │ │ -
430#if __cpp_lib_three_way_comparison
│ │ │ -
431 template<typename _Tp, three_way_comparable _Seq>
│ │ │ -
432 [[nodiscard]]
│ │ │ -
433 inline compare_three_way_result_t<_Seq>
│ │ │ -
434 operator<=>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
│ │ │ -
435 { return __x.c <=> __y.c; }
│ │ │ -
436#endif
│ │ │ -
437
│ │ │ -
438#if __cplusplus >= 201103L
│ │ │ -
439 template<typename _Tp, typename _Seq>
│ │ │ -
440 inline
│ │ │ -
441#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ -
442 // Constrained free swap overload, see p0185r1
│ │ │ -
443 typename enable_if<__is_swappable<_Seq>::value>::type
│ │ │ -
444#else
│ │ │ -
445 void
│ │ │ -
446#endif
│ │ │ -
447 swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y)
│ │ │ -
448 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
449 { __x.swap(__y); }
│ │ │ -
450
│ │ │ -
451 template<typename _Tp, typename _Seq, typename _Alloc>
│ │ │ -
452 struct uses_allocator<queue<_Tp, _Seq>, _Alloc>
│ │ │ -
453 : public uses_allocator<_Seq, _Alloc>::type { };
│ │ │ -
454#endif // __cplusplus >= 201103L
│ │ │ -
455
│ │ │ -
456 /**
│ │ │ -
457 * @brief A standard container automatically sorting its contents.
│ │ │ -
458 *
│ │ │ -
459 * @ingroup sequences
│ │ │ -
460 *
│ │ │ -
461 * @tparam _Tp Type of element.
│ │ │ -
462 * @tparam _Sequence Type of underlying sequence, defaults to vector<_Tp>.
│ │ │ -
463 * @tparam _Compare Comparison function object type, defaults to
│ │ │ -
464 * less<_Sequence::value_type>.
│ │ │ -
465 *
│ │ │ -
466 * This is not a true container, but an @e adaptor. It holds
│ │ │ -
467 * another container, and provides a wrapper interface to that
│ │ │ -
468 * container. The wrapper is what enforces priority-based sorting
│ │ │ -
469 * and %queue behavior. Very few of the standard container/sequence
│ │ │ -
470 * interface requirements are met (e.g., iterators).
│ │ │ -
471 *
│ │ │ -
472 * The second template parameter defines the type of the underlying
│ │ │ -
473 * sequence/container. It defaults to std::vector, but it can be
│ │ │ -
474 * any type that supports @c front(), @c push_back, @c pop_back,
│ │ │ -
475 * and random-access iterators, such as std::deque or an
│ │ │ -
476 * appropriate user-defined type.
│ │ │ -
477 *
│ │ │ -
478 * The third template parameter supplies the means of making
│ │ │ -
479 * priority comparisons. It defaults to @c less<value_type> but
│ │ │ -
480 * can be anything defining a strict weak ordering.
│ │ │ -
481 *
│ │ │ -
482 * Members not found in @a normal containers are @c container_type,
│ │ │ -
483 * which is a typedef for the second Sequence parameter, and @c
│ │ │ -
484 * push, @c pop, and @c top, which are standard %queue operations.
│ │ │ -
485 *
│ │ │ -
486 * @note No equality/comparison operators are provided for
│ │ │ -
487 * %priority_queue.
│ │ │ -
488 *
│ │ │ -
489 * @note Sorting of the elements takes place as they are added to,
│ │ │ -
490 * and removed from, the %priority_queue using the
│ │ │ -
491 * %priority_queue's member functions. If you access the elements
│ │ │ -
492 * by other means, and change their data such that the sorting
│ │ │ -
493 * order would be different, the %priority_queue will not re-sort
│ │ │ -
494 * the elements for you. (How could it know to do so?)
│ │ │ -
495 */
│ │ │ -
496 template<typename _Tp, typename _Sequence = vector<_Tp>,
│ │ │ -
497 typename _Compare = less<typename _Sequence::value_type> >
│ │ │ -
│ │ │ - │ │ │ -
499 {
│ │ │ -
500#ifdef _GLIBCXX_CONCEPT_CHECKS
│ │ │ -
501 // concept requirements
│ │ │ -
502 typedef typename _Sequence::value_type _Sequence_value_type;
│ │ │ -
503# if __cplusplus < 201103L
│ │ │ -
504 __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
│ │ │ -
505# endif
│ │ │ -
506 __glibcxx_class_requires(_Sequence, _SequenceConcept)
│ │ │ -
507 __glibcxx_class_requires(_Sequence, _RandomAccessContainerConcept)
│ │ │ -
508 __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
│ │ │ -
509 __glibcxx_class_requires4(_Compare, bool, _Tp, _Tp,
│ │ │ -
510 _BinaryFunctionConcept)
│ │ │ -
511#endif
│ │ │ -
512
│ │ │ -
513#if __cplusplus >= 201103L
│ │ │ -
514 template<typename _Alloc>
│ │ │ -
515 using _Uses = typename
│ │ │ - │ │ │ -
517
│ │ │ -
518#if __cplusplus >= 201703L
│ │ │ -
519 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
520 // 2566. Requirements on the first template parameter of container
│ │ │ -
521 // adaptors
│ │ │ - │ │ │ -
523 "value_type must be the same as the underlying container");
│ │ │ -
524#endif // C++17
│ │ │ -
525#endif // C++11
│ │ │ -
526
│ │ │ -
527 public:
│ │ │ -
528 typedef typename _Sequence::value_type value_type;
│ │ │ -
529 typedef typename _Sequence::reference reference;
│ │ │ -
530 typedef typename _Sequence::const_reference const_reference;
│ │ │ -
531 typedef typename _Sequence::size_type size_type;
│ │ │ -
532 typedef _Sequence container_type;
│ │ │ -
533 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
534 // DR 2684. priority_queue lacking comparator typedef
│ │ │ -
535 typedef _Compare value_compare;
│ │ │ -
536
│ │ │ -
537 protected:
│ │ │ -
538 // See queue::c for notes on these names.
│ │ │ -
539 _Sequence c;
│ │ │ -
540 _Compare comp;
│ │ │ -
541
│ │ │ -
542 public:
│ │ │ -
543 /**
│ │ │ -
544 * @brief Default constructor creates no elements.
│ │ │ -
545 */
│ │ │ -
546#if __cplusplus < 201103L
│ │ │ -
547 explicit
│ │ │ -
548 priority_queue(const _Compare& __x = _Compare(),
│ │ │ -
549 const _Sequence& __s = _Sequence())
│ │ │ -
550 : c(__s), comp(__x)
│ │ │ -
551 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ -
552#else
│ │ │ -
553 template<typename _Seq = _Sequence, typename _Requires = typename
│ │ │ - │ │ │ -
555 is_default_constructible<_Seq>>::value>::type>
│ │ │ -
│ │ │ - │ │ │ -
557 : c(), comp() { }
│ │ │ -
│ │ │ -
558
│ │ │ -
559 explicit
│ │ │ -
560 priority_queue(const _Compare& __x, const _Sequence& __s)
│ │ │ -
561 : c(__s), comp(__x)
│ │ │ -
562 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ -
563
│ │ │ -
564 explicit
│ │ │ -
565 priority_queue(const _Compare& __x, _Sequence&& __s = _Sequence())
│ │ │ -
566 : c(std::move(__s)), comp(__x)
│ │ │ -
567 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ -
568
│ │ │ -
569 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ -
570 explicit
│ │ │ -
571 priority_queue(const _Alloc& __a)
│ │ │ -
572 : c(__a), comp() { }
│ │ │ -
573
│ │ │ -
574 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ -
575 priority_queue(const _Compare& __x, const _Alloc& __a)
│ │ │ -
576 : c(__a), comp(__x) { }
│ │ │ -
577
│ │ │ -
578 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
579 // 2537. Constructors [...] taking allocators should call make_heap
│ │ │ -
580 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ -
581 priority_queue(const _Compare& __x, const _Sequence& __c,
│ │ │ -
582 const _Alloc& __a)
│ │ │ -
583 : c(__c, __a), comp(__x)
│ │ │ -
584 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ -
585
│ │ │ -
586 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ -
587 priority_queue(const _Compare& __x, _Sequence&& __c, const _Alloc& __a)
│ │ │ -
588 : c(std::move(__c), __a), comp(__x)
│ │ │ -
589 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ -
590
│ │ │ -
591 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ -
592 priority_queue(const priority_queue& __q, const _Alloc& __a)
│ │ │ -
593 : c(__q.c, __a), comp(__q.comp) { }
│ │ │ -
594
│ │ │ -
595 template<typename _Alloc, typename _Requires = _Uses<_Alloc>>
│ │ │ -
596 priority_queue(priority_queue&& __q, const _Alloc& __a)
│ │ │ -
597 : c(std::move(__q.c), __a), comp(std::move(__q.comp)) { }
│ │ │ -
598#endif
│ │ │ -
599
│ │ │ -
600 /**
│ │ │ -
601 * @brief Builds a %queue from a range.
│ │ │ -
602 * @param __first An input iterator.
│ │ │ -
603 * @param __last An input iterator.
│ │ │ -
604 * @param __x A comparison functor describing a strict weak ordering.
│ │ │ -
605 * @param __s An initial sequence with which to start.
│ │ │ -
606 *
│ │ │ -
607 * Begins by copying @a __s, inserting a copy of the elements
│ │ │ -
608 * from @a [first,last) into the copy of @a __s, then ordering
│ │ │ -
609 * the copy according to @a __x.
│ │ │ -
610 *
│ │ │ -
611 * For more information on function objects, see the
│ │ │ -
612 * documentation on @link functors functor base
│ │ │ -
613 * classes@endlink.
│ │ │ -
614 */
│ │ │ -
615#if __cplusplus < 201103L
│ │ │ -
616 template<typename _InputIterator>
│ │ │ -
617 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ -
618 const _Compare& __x = _Compare(),
│ │ │ -
619 const _Sequence& __s = _Sequence())
│ │ │ -
620 : c(__s), comp(__x)
│ │ │ -
621 {
│ │ │ -
622 __glibcxx_requires_valid_range(__first, __last);
│ │ │ -
623 c.insert(c.end(), __first, __last);
│ │ │ -
624 std::make_heap(c.begin(), c.end(), comp);
│ │ │ -
625 }
│ │ │ -
626#else
│ │ │ -
627 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
628 // 3529. priority_queue(first, last) should construct c with (first, last)
│ │ │ -
629 template<typename _InputIterator,
│ │ │ - │ │ │ -
│ │ │ - │ │ │ -
632 const _Compare& __x = _Compare())
│ │ │ -
633 : c(__first, __last), comp(__x)
│ │ │ -
634 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ -
│ │ │ -
635
│ │ │ -
636 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
637 // 3522. Missing requirement on InputIterator template parameter
│ │ │ -
638 template<typename _InputIterator,
│ │ │ - │ │ │ - │ │ │ -
641 const _Compare& __x, const _Sequence& __s)
│ │ │ -
642 : c(__s), comp(__x)
│ │ │ -
643 {
│ │ │ -
644 __glibcxx_requires_valid_range(__first, __last);
│ │ │ -
645 c.insert(c.end(), __first, __last);
│ │ │ -
646 std::make_heap(c.begin(), c.end(), comp);
│ │ │ -
647 }
│ │ │ -
648
│ │ │ -
649 template<typename _InputIterator,
│ │ │ - │ │ │ -
651 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ -
652 const _Compare& __x, _Sequence&& __s)
│ │ │ -
653 : c(std::move(__s)), comp(__x)
│ │ │ -
654 {
│ │ │ -
655 __glibcxx_requires_valid_range(__first, __last);
│ │ │ -
656 c.insert(c.end(), __first, __last);
│ │ │ -
657 std::make_heap(c.begin(), c.end(), comp);
│ │ │ -
658 }
│ │ │ -
659
│ │ │ -
660 // _GLIBCXX_RESOLVE_LIB_DEFECTS
│ │ │ -
661 // 3506. Missing allocator-extended constructors for priority_queue
│ │ │ -
662 template<typename _InputIterator, typename _Alloc,
│ │ │ - │ │ │ -
664 typename _Requires = _Uses<_Alloc>>
│ │ │ -
665 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ -
666 const _Alloc& __alloc)
│ │ │ -
667 : c(__first, __last, __alloc), comp()
│ │ │ -
668 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ -
669
│ │ │ -
670 template<typename _InputIterator, typename _Alloc,
│ │ │ - │ │ │ -
672 typename _Requires = _Uses<_Alloc>>
│ │ │ -
673 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ -
674 const _Compare& __x, const _Alloc& __alloc)
│ │ │ -
675 : c(__first, __last, __alloc), comp(__x)
│ │ │ -
676 { std::make_heap(c.begin(), c.end(), comp); }
│ │ │ -
677
│ │ │ -
678 template<typename _InputIterator, typename _Alloc,
│ │ │ - │ │ │ -
680 typename _Requires = _Uses<_Alloc>>
│ │ │ -
681 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ -
682 const _Compare& __x, const _Sequence& __s,
│ │ │ -
683 const _Alloc& __alloc)
│ │ │ -
684 : c(__s, __alloc), comp(__x)
│ │ │ -
685 {
│ │ │ -
686 __glibcxx_requires_valid_range(__first, __last);
│ │ │ -
687 c.insert(c.end(), __first, __last);
│ │ │ -
688 std::make_heap(c.begin(), c.end(), comp);
│ │ │ -
689 }
│ │ │ -
690
│ │ │ -
691 template<typename _InputIterator, typename _Alloc,
│ │ │ -
692 typename _Requires = _Uses<_Alloc>>
│ │ │ -
693 priority_queue(_InputIterator __first, _InputIterator __last,
│ │ │ -
694 const _Compare& __x, _Sequence&& __s,
│ │ │ -
695 const _Alloc& __alloc)
│ │ │ -
696 : c(std::move(__s), __alloc), comp(__x)
│ │ │ -
697 {
│ │ │ -
698 __glibcxx_requires_valid_range(__first, __last);
│ │ │ -
699 c.insert(c.end(), __first, __last);
│ │ │ -
700 std::make_heap(c.begin(), c.end(), comp);
│ │ │ -
701 }
│ │ │ -
702#endif
│ │ │ -
703
│ │ │ -
704 /**
│ │ │ -
705 * Returns true if the %queue is empty.
│ │ │ -
706 */
│ │ │ -
707 _GLIBCXX_NODISCARD bool
│ │ │ -
│ │ │ -
708 empty() const
│ │ │ -
709 { return c.empty(); }
│ │ │ -
│ │ │ -
710
│ │ │ -
711 /** Returns the number of elements in the %queue. */
│ │ │ -
712 _GLIBCXX_NODISCARD
│ │ │ -
713 size_type
│ │ │ -
│ │ │ -
714 size() const
│ │ │ -
715 { return c.size(); }
│ │ │ -
│ │ │ -
716
│ │ │ -
717 /**
│ │ │ -
718 * Returns a read-only (constant) reference to the data at the first
│ │ │ -
719 * element of the %queue.
│ │ │ -
720 */
│ │ │ -
721 _GLIBCXX_NODISCARD
│ │ │ -
722 const_reference
│ │ │ -
│ │ │ -
723 top() const
│ │ │ -
724 {
│ │ │ -
725 __glibcxx_requires_nonempty();
│ │ │ -
726 return c.front();
│ │ │ -
727 }
│ │ │ -
│ │ │ -
728
│ │ │ -
729 /**
│ │ │ -
730 * @brief Add data to the %queue.
│ │ │ -
731 * @param __x Data to be added.
│ │ │ -
732 *
│ │ │ -
733 * This is a typical %queue operation.
│ │ │ -
734 * The time complexity of the operation depends on the underlying
│ │ │ -
735 * sequence.
│ │ │ -
736 */
│ │ │ -
737 void
│ │ │ -
│ │ │ -
738 push(const value_type& __x)
│ │ │ -
739 {
│ │ │ -
740 c.push_back(__x);
│ │ │ -
741 std::push_heap(c.begin(), c.end(), comp);
│ │ │ -
742 }
│ │ │ -
│ │ │ -
743
│ │ │ -
744#if __cplusplus >= 201103L
│ │ │ -
745 void
│ │ │ -
746 push(value_type&& __x)
│ │ │ -
747 {
│ │ │ -
748 c.push_back(std::move(__x));
│ │ │ -
749 std::push_heap(c.begin(), c.end(), comp);
│ │ │ -
750 }
│ │ │ -
751
│ │ │ -
752 template<typename... _Args>
│ │ │ -
753 void
│ │ │ -
754 emplace(_Args&&... __args)
│ │ │ -
755 {
│ │ │ -
756 c.emplace_back(std::forward<_Args>(__args)...);
│ │ │ -
757 std::push_heap(c.begin(), c.end(), comp);
│ │ │ -
758 }
│ │ │ -
759#endif
│ │ │ -
760
│ │ │ -
761 /**
│ │ │ -
762 * @brief Removes first element.
│ │ │ -
763 *
│ │ │ -
764 * This is a typical %queue operation. It shrinks the %queue
│ │ │ -
765 * by one. The time complexity of the operation depends on the
│ │ │ -
766 * underlying sequence.
│ │ │ -
767 *
│ │ │ -
768 * Note that no data is returned, and if the first element's
│ │ │ -
769 * data is needed, it should be retrieved before pop() is
│ │ │ -
770 * called.
│ │ │ -
771 */
│ │ │ -
772 void
│ │ │ -
│ │ │ - │ │ │ -
774 {
│ │ │ -
775 __glibcxx_requires_nonempty();
│ │ │ -
776 std::pop_heap(c.begin(), c.end(), comp);
│ │ │ -
777 c.pop_back();
│ │ │ -
778 }
│ │ │ -
│ │ │ -
779
│ │ │ -
780#if __cplusplus >= 201103L
│ │ │ -
781 void
│ │ │ -
782 swap(priority_queue& __pq)
│ │ │ -
783 noexcept(__and_<
│ │ │ -
784#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ - │ │ │ -
786#else
│ │ │ - │ │ │ -
788#endif
│ │ │ - │ │ │ -
790 >::value)
│ │ │ -
791 {
│ │ │ -
792 using std::swap;
│ │ │ -
793 swap(c, __pq.c);
│ │ │ -
794 swap(comp, __pq.comp);
│ │ │ -
795 }
│ │ │ -
796#endif // __cplusplus >= 201103L
│ │ │ -
797 };
│ │ │ -
│ │ │ -
798
│ │ │ -
799#if __cpp_deduction_guides >= 201606
│ │ │ -
800 template<typename _Compare, typename _Container,
│ │ │ -
801 typename = _RequireNotAllocator<_Compare>,
│ │ │ -
802 typename = _RequireNotAllocator<_Container>>
│ │ │ -
803 priority_queue(_Compare, _Container)
│ │ │ -
804 -> priority_queue<typename _Container::value_type, _Container, _Compare>;
│ │ │ -
805
│ │ │ -
806 template<typename _InputIterator, typename _ValT
│ │ │ -
807 = typename iterator_traits<_InputIterator>::value_type,
│ │ │ -
808 typename _Compare = less<_ValT>,
│ │ │ -
809 typename _Container = vector<_ValT>,
│ │ │ -
810 typename = _RequireInputIter<_InputIterator>,
│ │ │ -
811 typename = _RequireNotAllocator<_Compare>,
│ │ │ -
812 typename = _RequireNotAllocator<_Container>>
│ │ │ -
813 priority_queue(_InputIterator, _InputIterator, _Compare = _Compare(),
│ │ │ -
814 _Container = _Container())
│ │ │ -
815 -> priority_queue<_ValT, _Container, _Compare>;
│ │ │ -
816
│ │ │ -
817 template<typename _Compare, typename _Container, typename _Allocator,
│ │ │ -
818 typename = _RequireNotAllocator<_Compare>,
│ │ │ -
819 typename = _RequireNotAllocator<_Container>>
│ │ │ -
820 priority_queue(_Compare, _Container, _Allocator)
│ │ │ -
821 -> priority_queue<typename _Container::value_type, _Container, _Compare>;
│ │ │ -
822#endif
│ │ │ -
823
│ │ │ -
824 // No equality/comparison operators are provided for priority_queue.
│ │ │ -
825
│ │ │ -
826#if __cplusplus >= 201103L
│ │ │ -
827 template<typename _Tp, typename _Sequence, typename _Compare>
│ │ │ -
828 inline
│ │ │ -
829#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
│ │ │ -
830 // Constrained free swap overload, see p0185r1
│ │ │ -
831 typename enable_if<__and_<__is_swappable<_Sequence>,
│ │ │ -
832 __is_swappable<_Compare>>::value>::type
│ │ │ -
833#else
│ │ │ -
834 void
│ │ │ -
835#endif
│ │ │ -
836 swap(priority_queue<_Tp, _Sequence, _Compare>& __x,
│ │ │ -
837 priority_queue<_Tp, _Sequence, _Compare>& __y)
│ │ │ -
838 noexcept(noexcept(__x.swap(__y)))
│ │ │ -
839 { __x.swap(__y); }
│ │ │ -
840
│ │ │ -
841 template<typename _Tp, typename _Sequence, typename _Compare,
│ │ │ -
842 typename _Alloc>
│ │ │ -
843 struct uses_allocator<priority_queue<_Tp, _Sequence, _Compare>, _Alloc>
│ │ │ -
844 : public uses_allocator<_Sequence, _Alloc>::type { };
│ │ │ -
845#endif // __cplusplus >= 201103L
│ │ │ -
846
│ │ │ -
847_GLIBCXX_END_NAMESPACE_VERSION
│ │ │ -
848} // namespace
│ │ │ -
849
│ │ │ -
850#endif /* _STL_QUEUE_H */
│ │ │ - │ │ │ - │ │ │ -
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
Definition move.h:97
│ │ │ -
void swap(any &__x, any &__y) noexcept
Exchange the states of two any objects.
Definition any:429
│ │ │ +
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
│ │ │ +